Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Last active December 2, 2019 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelmota/289aaa5b45a8517bbd07bc2fe2ba9789 to your computer and use it in GitHub Desktop.
Save miguelmota/289aaa5b45a8517bbd07bc2fe2ba9789 to your computer and use it in GitHub Desktop.
Web3 ethers.js contract instance
const contract = new ethers.Contract(address, abi, provider)
const result = await contract.myMethod(data)
// equivalent of
//const contract = await new web3.eth.Contract(abi, address)
//const result = await contract.methods.myMethod(data).call()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment