Last active
December 2, 2019 01:41
-
-
Save miguelmota/289aaa5b45a8517bbd07bc2fe2ba9789 to your computer and use it in GitHub Desktop.
Web3 ethers.js contract instance
This file contains 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
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