API spec for Contract
:
new Contract(addressOrName: string, contractInterface: ethers.ethers.ContractInterface, signerOrProvider?: ethers.ethers.providers.Provider | ethers.ethers.Signer | undefined):
- With respect to the second parameter(
contractInterface
), can I literally just click the Copy ABI to Clipboard button for a contract on Etherscan and provide that to Contract?
https://goerli.etherscan.io/address/0x7dc68b7d0915ba5816e617528d6a0576f4143916#code
And would the JSON format of the ABI work as well? (https://api-goerli.etherscan.io/api?module=contract&action=getabi&address=0x0441ff033652bcEB75a011887F17B5dfC84Ddc6f)
- With respect to the third parameter, in what scenarios would you input the
signer
vsprovider
since Contract can accept both?