Closed aleksuss closed 1 year ago
One bad moment of changing borsh to JSON is that it increases the number of functions and size of the smart contract. cc @birchmd
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?
How much bigger is the contract size? Will it be offset by the wasm opt improvement?
1166962
vs 1060706
(develop), diff: 106256 bytes. After applying wasm-opt
the size becomes 1041185
bytes.
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.