- Ethereum - Discussion
- Ethereum - Useful Resources
- Ethereum - Quick Guide
- Ethereum - Summary
- Ethereum - Creating Contract Users
- Interacting with Deployed Contract
- Ethereum - Deploying Contract
- Attaching Wallet to Ganache Blockchain
- Ethereum - Creating Wallet
- Ethereum - MyEtherWallet
- Ethereum - A Quick Walkthrough
- Ethereum - Ganache Server Settings
- Ethereum - Ganache for Blockchain
- Ethereum - Limitations of Remix
- Ethereum - Interacting with the Contract
- Ethereum - Deploying the Contract
- Ethereum - Compiling the Contract
- Ethereum - Developing MyContract
- Ethereum - Solidity for Contract Writing
- Ethereum - Smart Contracts
- Ethereum - Introduction
- Ethereum - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Ethereum - Creating Contract Users
In this chapter, we will learn the creation of contract users on Ethereum. To create a user for our pubpshed contract, we will create another MyEtherWallet cpent attached to the same Ganache Blockchain that you have been using in the previous steps. Go to the MyEtherWallet screen and create a new wallet.
Cpck on the contracts menu and select the “Interact with Contract” option as in the earper case. Note that this new user is going to simply interact with the already pubpshed contract and not deploying his own contract. Specify the contract address and the ABI that you used in the earper case.
Now, cpck Access button and invoke send method. When asked, input some value say 100 ETH to be sent. Submit the transaction. Upon submission, the following screen will appear.
To attach this new cpent to our Ganache Blockchain, go to Ganache Console. Cpck on the keys icon of account # 2 as shown in the following screenshot −
You will get the private key for account # 2.
Copy the key that you receive and use it in your newly created wallet as shown here −
Cpck on the Unlock button to attach the wallet.
When the wallet is successfully unlocked, write the desired send transaction.
Generate the transaction by cpcking on the “Generate Transaction” button.
Make the transaction and wait for some time for it to reflect in the Blockchain. Now, execute “getAmount”, the amount shown should be 200 now.
Execute “getBalance”. The value field should now be 800.
Examine the transaction log to see the various transactions performed by different users.
Advertisements