Difference between Contract and ContractFactory ??? #350
-
Hi all, Since both require For contract :- const contract = new.ethers.Contract(abi, address, Signer); For ContractFactory :- const contractFactory = new.ethers.ContractFactory(abi, address, Signer); Can somebody please help me?? Another question In same lesson at Code :- const transactionReceipt = await transactionResponce.wait(1); But at Now my question is ... How did you get the output for* transactionReceipt.confirmations without declaring??? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
A Contract is an abstraction of code that has been deployed to the blockchain. Which only requires ABI, address, and signerOrProvider. But in order to deploy that contract additional information is needed that is not available on a Contract object itself. Mainly, the bytecode of a contract is required. |
Beta Was this translation helpful? Give feedback.
-
Contract is a const contract = new.ethers.Contract(abi, address, Signer); ContractFactory is a const contractFactory = new.ethers.ContractFactory(abi, address, Signer); ContractFactory: Deploys Contracts |
Beta Was this translation helpful? Give feedback.
Contract is a
Contract
object, and it allows you to call functions and interact with a contract.ContractFactory is a
ContractFactory
object, and allows you to deploy contracts.ContractFactory: Deploys Contracts
Contract: Is a contract