Last active
August 6, 2021 11:26
-
-
Save percybolmer/724e8a8688cb165a073d55bda2e3a8ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// getUserProfile will fetch account information from the block chain network | |
async function getUserProfile() { | |
// Let's grab the tokens total supply, the method is named the same as in the Solidity code, and add call() to execute it. | |
// We will add the keyword await to let the code know that it should block until the reponse arrives. | |
const devTokenSupply = await devToken.methods.totalSupply().call(); | |
console.log(devTokenSupply); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment