{"id":20073,"date":"2022-10-02T18:25:00","date_gmt":"2022-10-02T18:25:00","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=9196"},"modified":"2022-10-02T18:25:00","modified_gmt":"2022-10-02T18:25:00","slug":"creating-contract-users","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/10\/02\/creating-contract-users\/","title":{"rendered":"Creating Contract Users"},"content":{"rendered":"\n<p>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&nbsp;<strong>MyEtherWallet<\/strong>&nbsp;client attached to the same Ganache Blockchain that you have been using in the previous steps. Go to the&nbsp;<strong>MyEtherWallet<\/strong>&nbsp;screen and create a new wallet.<\/p>\n\n\n\n<p>Click on the&nbsp;<strong>contracts<\/strong>&nbsp;menu and select the&nbsp;<strong>\u201cInteract with Contract\u201d<\/strong>&nbsp;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.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/ethereum\/images\/interact_with_contract_address.jpg\" alt=\"Interact with Contract Address\"\/><\/figure>\n\n\n\n<p>Now, click&nbsp;<strong>Access<\/strong>&nbsp;button and invoke&nbsp;<strong>send&nbsp;<\/strong>method. When asked, input some value say 100 ETH to be sent. Submit the transaction. Upon submission, the following screen will appear.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/ethereum\/images\/interact_with_contract_access.jpg\" alt=\"Interact with Contract Access\"\/><\/figure>\n\n\n\n<p>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 \u2212<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/ethereum\/images\/ganache_console_screenshot.jpg\" alt=\"Ganache Console Screenshot\"\/><\/figure>\n\n\n\n<p>You will get the private key for account # 2.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/ethereum\/images\/ganache_console_private_key.jpg\" alt=\"Ganache Console private key\"\/><\/figure>\n\n\n\n<p>Copy the key that you receive and use it in your newly created wallet as shown here \u2212<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/ethereum\/images\/newly_created_wallet.jpg\" alt=\"Newly Created Wallet\"\/><\/figure>\n\n\n\n<p>Click on the&nbsp;<strong>Unlock<\/strong>&nbsp;button to attach the wallet.<\/p>\n\n\n\n<p>When the wallet is successfully unlocked, write the desired send transaction.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/ethereum\/images\/wallet_successfully_unlocked.jpg\" alt=\"Wallet Successfully Unlocked\"\/><\/figure>\n\n\n\n<p>Generate the transaction by clicking on the&nbsp;<strong>\u201cGenerate Transaction\u201d<\/strong>&nbsp;button.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/ethereum\/images\/generate_transaction.jpg\" alt=\"Generate Transaction\"\/><\/figure>\n\n\n\n<p><strong>Make<\/strong>&nbsp;the transaction and wait for some time for it to reflect in the Blockchain. Now, execute&nbsp;<strong>\u201cgetAmount\u201d<\/strong>, the amount shown should be 200 now.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/ethereum\/images\/get_amount.jpg\" alt=\"Generate get Amount\"\/><\/figure>\n\n\n\n<p>Execute&nbsp;<strong>\u201cgetBalance\u201d<\/strong>. The&nbsp;<strong>value<\/strong>&nbsp;field should now be 800.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/ethereum\/images\/get_balance.jpg\" alt=\"Generate get Balance\"\/><\/figure>\n\n\n\n<p>Examine the transaction log to see the various transactions performed by different users.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/ethereum\/images\/examine_transaction.jpg\" alt=\"Examine The Transaction\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/www.tutorialspoint.com\/ethereum\/ethereum_interacting_with_deployed_contract.htm\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&nbsp;MyEtherWallet&nbsp;client attached to the same Ganache Blockchain that you have been using in the previous steps. Go to the&nbsp;MyEtherWallet&nbsp;screen and create a new wallet. Click on the&nbsp;contracts&nbsp;menu and select the&nbsp;\u201cInteract with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/20073"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=20073"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/20073\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=20073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=20073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=20073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}