Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Last active August 6, 2021 11:26
Show Gist options
  • Save percybolmer/724e8a8688cb165a073d55bda2e3a8ae to your computer and use it in GitHub Desktop.
Save percybolmer/724e8a8688cb165a073d55bda2e3a8ae to your computer and use it in GitHub Desktop.
// 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