After a long searching, and trial and error experimenting, we decided to run and use an independent instance of the Ethereum blockchain — or we label it as ‘owned’ blockchain.
Another medium article describes in details how did we reach the current state.
As many of you — readers of this page know Ethereum blockchain is the most popular ‘smart contract’ enabled blockchain.
This tutorial aims to make ordinary users, who are not very familiar with technical details on the blockchain, aware of the features and the ways of use.
Most of the use of Ethereum and alike blockchains are based on Metamask — a browser plug-in, which provides wallet and transfer service for the user.
Even though I am a professional programmer, I find Metmask is pretty user un-friendly. I am sometimes unsure if I do the right thing, and I am afraid of making a costly mistake while using Metamask.
Through the explorer page we want you, the viewer/user to gain experience and confidence dealing with our independent/owned blockchain.
The blockchain explorer is available from this page — https://decentralized-web.tech/dw_chain.php
This tutorial gives ‘hands-on’ approach in dealing with our blockchain — through this blockchain access page.
We recommend having this page on one browser tab and opening the blockchain access — explorer page in another browser tab.
2. Main page, our main crypto-coin, and getting balances
The initial / main blockchain access page shows that the blockchain node runs geth (Ethereum node software), shows the its version, and the number of last mined block.
As a block is mined every 10–15s refreshing of the page after a time will show another number.
Just like ETH is produced on Ethereum mainnet through mining (adding blocks to the blockchain), our independent/owned blockchain produces coins as well.
We named the coin which the blockchain produces as — DWU , Decentralized web utility crypto-coin.
Every user in the Decentralized web project gets DWU coins through a variety of incentives:
- when running initially the user program and creating an identity
- when inviting new users
- when viewing ads run on the user program
- when running a bridge/node, and when forwarding packets for users
- and a variety of other incentives…
The user program menu and the bridge menu show the current crypto assets of the user.
A feature of almost every blockchain is access to balances of all assets on the blockchain. A major limitation of Metmask is that it shows only assets belonging to the user.
The top/default choice of the blockchain assess page is — eth_getBalance.
In p1 field type your assigned account address and then type run. The page which comes will show the balance of your DWU asset.
The blockchain access page is available for anyone. A person who does not yet use our program can type this account address — 0xe76fb46a66b41e3a5ac223d256c1bf12e1c6932c and push Submit and get current balances of this specific address.
3. Accessing blocks and transactions
Most of the blockchains have some kind of explorer of the blocks on the blockchain. For ex. for Ethereum blockchain blocks are listed on — ehterscan .
To view a block on our blockchain select eth_getBlockByNumber, type the decimal block number in p1 and push Submit.
If the block is empty it will show …”transactions”:…
If there are transactions on the block, the block info will show the transaction hash of each of the transactions.
The block info is followed by details for each of the listed transactions.
As an example of a block with multiple transactions, select eth_getBlockByNumber, type 328 in p1 and push Submit.
It takes time for a posted transaction to be placed in a block. After submitting a transaction is added to the group of pending transactions.
To view the list of current pending transactions select eth_pendingTransactions and push Submit.
If there are no transactions the result will be —  .
4. Cryptocurrency test token — balance, receive, send
We did create an ERC-20/BEP-20 like smart contract with a token named — ATST1, which has a smart contract address — 0xae58fe902ea68c710a73c2f4e8359d466494e7ee .
We plan to issue ERC-20/BEP-20 like tokens as well on our independent/owned blockchain.
The ATST1 token is used for test purposes only — does not have any value assigned.
Every token is created with an initial balance of tokens, some amount of which are then sent to valid blockchain account addresses.
To view the stats for the token and get token balances of any valid blockchain account address select token.balanceOf put account address in p1 — and push Submit.
If not yet being a user of the dWeb program and having no account address , select token.balanceOf type in p1 this account address — 0xe76fb46a66b41e3a5ac223d256c1bf12e1c6932c and click Submit.
The creator/owner of a token can send tokens to the account address of DWU coin users. This operation is equivalent of buying tokens.
The owner of the ATST1 token is the dWeb project. To receive ATST1 tokens select token.transfer put your dWeb account address in p1, and amount(from 1 to 9) in p2, and type Submit.
The maximum one time coin transfer is 9 tokens. If placing a bigger number in p2 the transaction will transfer only 9 tokens. If p2 is empty or 0 the command will return ‘Error’.
If not yet being a user of dWeb and having no account address , type in p1 this account address 0xe76fb46a66b41e3a5ac223d256c1bf12e1c6932c, type 9 in p2 and click Submit.
Blockchain ‘write’ type of operations take time — from being pending to get recorded on the blockchain. Check for command completion with — eth_pendingTransactions and/or token.balanceOf.
Having understanding of the receiving(buying process) the next step is to test and try sending (sell type) transaction. In ERC-20 alike contracts it is done usually in 2 steps — approve and transferFrom.
The approve transaction is done by the account owner. It gives the right to another account address to transfer up to a specified number of tokens. The other account address is usually a third party swap place.
The transferFrom transaction is done by the swap place on behalf of the owner who did approve the transfer. As a result the owner will receive some amount of another token.
To illustrate the pre-approved transferFrom process we offer example of transfer of 1 ATST1 token from this account — 0xe76fb46a66b41e3a5ac223d256c1bf12e1c6932c , to our DWU account which created the contract. Select token.transferFrom no parameters, and type Submit.
Even though the ERC-20 alike smart contract became standard in token issuing and handling it is pretty cumbersome, requiring multiple steps to get recorded on the blockchain, compared to placing buy and sell orders on centralized crypto-exchanges.
We plan to offer simplified transfer (receive/send , buy/sell) process.
5. DAO participation
Decentralized autonomous organization / DAO is a new type of organization where the members have a direct say in the direction of going of the organization.
This is done through submitting of proposals and voting on these proposals.
To illustrate the process we did create ballot smart contract, having this address —0x3bd3223b14dd88ae60109f9290d014e95ba06b97 .
The contract owner (dWeb project) has the right to submit a proposal with 2 or 3 choices.
Currently we did submit 2 choices. The topic of the proposal is — ‘How are you today?’.
To get the current choices select balot.getChoices, no parameters and type Submit.
This contract is time aware. A person can submit a vote only once in 24 hour period. And once in 24 hours votes are counted and stored.
To submit a vote select balot.vote type your account address in p1, and the choice 0 or 1 in p2, and push Submit.
To get the ongoing today’s (temporary) results select balot.getResult and type Submit.
To get the results of the (final) last day, select balot.getDayResult and type Submit.
Besides voting on a proposal, the purpose of this contract is to show the level active and daily participation of users.
6. Voter identification
In general, there has to be identification by the smart contract if the voter’s account address is valid or not.
One way to do this is when the program (Dapp) that the voter is using does sending of a transaction. The voter’s account has to have enough funds to pay for the gas for the transaction.
The cost for voting is paid by the voter themselves. Considering the high gas fees on Ethereum blockchain a voter is most likely not often or not at all participate in DAO.
Even on other Ethereum/EVM based blockchains voting on multiple proposals becomes costly as the fees add up.
The sample balot smart contract allows type of voting where the contract owner (dWeb project) submits the voter’s choice while covering the gas fee — the voter does not pay anything.
The program (Dapp) that the voter is using has to verify the voter — check that the voter has some DWU funds, and then submit the voter’s choice.
For test purposes currently the blockchain explorer page does not perform this verification. Any account address, belonging or not on our blockchain can submit a vote.
To submit a sample vote select balot.vote, in p1 type for ex. — 0x1234567890123456789012345678901234567890, and 1 in p2, and push Submit.
You are welcome to connect with me on:
Discord — https://discord.gg/Zwp3Vs65dk