-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow arbitrary metadata for contracts in the config #78
Comments
The general idea is that it would be useful to generate contract metadata statically as opposed to making numerous calls at runtime. The simplest example of this is for a frontend that is dependent on mainnet: {
dai: {
address: '0x0',
meta: {
decimals: "decimals()"
}
}
...
const sdk = getMainnetSDK()
sdk.dai.meta.decimals === 18 // true Another way we could do it that would be cleaner but maybe more obfuscating is by replacing the async call to mainnet: {
dai: {
address: '0x0',
meta: {
decimals: "decimals()"
}
}
...
const sdk = getMainnetSDK()
sdk.dai.decimals === 18 // true - changed from Promise<BigNumberish> to BigNumberish That may be opinionated and the meta or a Another idea would be to include a label or tagging scheme for each contract which could make categorisation easier - say tagging a number of tokens to the name of a pool contract for easier lookup. |
It's so nice to store everything in one place. It could be useful to enable arbitrary metadata stored for each contract.
The text was updated successfully, but these errors were encountered: