Interacting with the blockchain
Quantum Coin testnet is based on Ethereum code base with Quantum Resistance and other updates added on top of it. The node client software GETH of Ethereum was modified to achieve this functionality. The steps to interact with the blockchain including checking account balance, sending and receiving coins etc. remain the same. For more information, see Geth Console.
-
Ensure that your account is connected to the blockchain.
If you open a new command prompt or terminal, you will need to run the set (Windows) or export (Linux) commands again as described in the above link. -
For Windows: Connect to the geth console; this is a pre-requisite for all further commands. Open a command prompt and change to the folder where geth is located. Then run the following command:
If the command is successful, you should see a prompt show up, waiting for keyboard input. You will also see your account-address printed on screen, with the label "coinbase".geth attach \\.\pipe\geth.ipc
-
Find account balance; from inside geth console, run the following command, replacing YourAccountAddressGoesHere with your account address. Your account address should be listed with the label "coinbase" in the previous step.
You can also pass any account-address to check the balance in that account.web3.fromWei(eth.getBalance("YourAccountAddressGoesHere"))
-
To send coins to another account; from inside geth console, run the following command. Replace FromAddressGoesHere, ToAddressGoesHere and NumberOfCoinsGoesHere with appropriate values.
You will see the transaction id being output after the above command is executed. Note down this transaction id.eth.sendTransaction({from: 'FromAddressGoesHere', to: 'ToAddressGoesHere', value: web3.toWei(NumberOfCoinsGoesHere, "ether")})
-
To get the transaction status; from inside geth console, run the following command. Replace TransactionIdGoesHere with the transaction id from the previous step.
You will see the transaction details being output after the above command is executed. Note that the number of coins sent are shown in wei unit, which is 1000000000000000000 times the number coins sent in the previous command.eth.getTransaction("TransactionIdGoesHere")
-
To check status of a transaction that got successfully included in a block; from inside geth console, run the following command. Replace TransactionIdGoesHere with the transaction id from the previous step.
You will see the transaction details being output after the above command is executed. Note that the number of coins sent are shown in wei unit, which is 1000000000000000000 times the number coins sent in the previous command.eth.getTransactionReceipt("TransactionIdGoesHere")
- About Testnet T3
- Requirements
- Setting up blockchain node client
- Connecting to the blockchain
- Interacting with the blockchain
- Staking in the proof-of-stake blockchain