- Ethereum Tutorial
- Ethereum - Home
- Ethereum - Introduction
- Ethereum - Smart Contracts
- Ethereum - Solidity for Contract Writing
- Ethereum - Developing MyContract
- Ethereum - Compiling the Contract
- Ethereum - Deploying the Contract
- Ethereum - Interacting with the Contract
- Ethereum - Limitations of Remix
- Ethereum - Ganache for Blockchain
- Ethereum - Ganache Server Settings
- Ethereum - A Quick Walkthrough
- Ethereum - MyEtherWallet
- Ethereum - Creating Wallet
- Attaching Wallet to Ganache Blockchain
- Ethereum - Deploying Contract
- Interacting with Deployed Contract
- Ethereum - Creating Contract Users
- Ethereum - Summary
- Ethereum Useful Resources
- Ethereum - Quick Guide
- Ethereum - Useful Resources
- Ethereum - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ethereum - Creating Contract Users
In this chapter, we will learn the creation of contract users on Ethereum. To create a user for our published contract, we will create another MyEtherWallet client 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.
Click on the contracts menu and select the “Interact with Contract” option as in the earlier case. Note that this new user is going to simply interact with the already published contract and not deploying his own contract. Specify the contract address and the ABI that you used in the earlier case.
Now, click 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 client to our Ganache Blockchain, go to Ganache Console. Click 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 −
Click on the Unlock button to attach the wallet.
When the wallet is successfully unlocked, write the desired send transaction.
Generate the transaction by clicking 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.