Replies: 2 comments
-
class ContractWithName extends ethers.Contract {
name: string;
constructor(name, address, abi, signerOrProvider) {
this.name = name;
super(address, abi, signerOrProvider);
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
I understand that it does not include a contract name, I was saying that it would be useful if it did. |
Beta Was this translation helpful? Give feedback.
0 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.
-
I'm trying to build a React library that takes in an ethers Contract instance as a single argument, and generates a simple front end for your smart contract. Though the json object generated when compiling a contract with Hardhat includes a "contractName" field, only the ABI field is passed into the contract instance. It would be great if the whole object was included and the contract name was accessible via the contract instance.
Beta Was this translation helpful? Give feedback.
All reactions