Replies: 1 comment 3 replies
-
@heysourin These are all the function of ethers library that returns the instance of smart contract, but first you should know that The second line returns the ContractFactory instance that we can use to create a new instance for our smart contract, here that contract's JSON file should be available inside the artifacts folder. The thrid line same returns the ContractFactory instance but here we have to give abi, binary and wallet. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the difference among these 3, anyone please explain?
1. const contract = new ethers.Contract(contractAddress, contractABI, provider);
2. const contract = await ethers.getContractFactory("contractName");
3. const contractFactory = new ethers.ContractFactory(abi, binary, wallet);
Beta Was this translation helpful? Give feedback.
All reactions