-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat: possibility to set metadata for erc20 contracts #837
Conversation
8321d0f
to
ab6fa78
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Just a few comments.
be5a5b6
to
61dbd5a
Compare
One bad moment of changing borsh to JSON is that it increases the number of functions and size of the smart contract. |
Increasing the number of functions is ok in my opinion. The reason for counting them is because there is a hard limit on the number of functions Near allows in a contract. But this limit is 10000, so we are not close to exceeding it. How much bigger is the contract size? Will it be offset by the wasm opt improvment? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I think the increase in contract size is worth the utility these methods provide.
## Description The PR adds functions for setting (`set_erc20_metadata`) and getting (`get_erc20_metadata`) metadata of ERC-20 contracts deployed with `deploy_erc20_token` transaction. ## Performance / NEAR gas cost considerations There are no performance changes. ## Testing The corresponding test has been added. ## Additional information Probably, there should be a new role for `set_erc20_metadata` transaction. I guess it should be added in a new PR.
- Added the possibility to use native NEAR instead of wNEAR on Aurora by [@karim-en]. ([#750]) - Added hashchain integration by [@birchmd]. ([#831]) - Added functions for setting and getting metadata of ERC-20 contracts deployed with `deploy_erc20_token` transaction by [@aleksuss]. ([#837]) --------- Co-authored-by: Michael Birch <michael.birch@aurora.dev> Co-authored-by: Evgeny Ukhanov <evgeny@aurora.dev> Co-authored-by: Karim <karim@aurora.dev>
Description
The PR adds functions for setting (
set_erc20_metadata
) and getting (get_erc20_metadata
) metadata of ERC-20 contracts deployed withdeploy_erc20_token
transaction.Performance / NEAR gas cost considerations
There are no performance changes.
Testing
The corresponding test has been added.
Additional information
Probably, there should be a new role for
set_erc20_metadata
transaction. I guess it should be added in a new PR.