Closed Unique-Divine closed 3 months ago
In a significant update to the Nibiru
project, the Ethereum Virtual Machine (EVM) functionalities have been enhanced with new fee deduction methods for FunToken
creation and several updates to ERC20 token management. Key changes include the introduction of deductCreateFunTokenFee
, modifications to contract and transaction parameters, and improved testing for fee coverage. Additionally, the ERC20 minting and burning processes have been restructured, and various improvements have been made to comments, imports, and error handling.
Files/Paths | Change Summaries |
---|---|
CHANGELOG.md |
Documented new feature for fee deduction during FunToken creation. |
proto/eth/evm/v1/evm.proto |
Added fee deduction field and updated comments for contract-related parameters. |
proto/eth/evm/v1/tx.proto |
Updated MsgUpdateParams message field declaration. |
x/evm/embeds/ERC20Minter.sol |
Replaced MINTER_ROLE with "owner" role and updated related functionality and comments. |
x/evm/embeds/ERC20MinterCompiled.json |
Renamed burnCoins function to burnFromAuthority . |
x/evm/errors.go |
Added ErrOwnable error constant. |
x/evm/evmtest/erc20.go |
Updated function signature and added logic to fund accounts before creating tokens. |
x/evm/evmtest/eth_test.go |
Modified AssertERC20BalanceEqual function call. |
x/evm/keeper/erc20.go |
Replaced FindERC20Metadata with ERC20 and added ERC20 methods like Mint , Transfer , etc. |
x/evm/keeper/erc20_test.go |
Added functionality for funding accounts for fees before operations. |
x/evm/keeper/funtoken_from_coin.go |
Added comment for validation requirements in CreateFunTokenFromCoin . |
x/evm/keeper/funtoken_from_erc20.go |
Introduced methods for creating FunToken from ERC20 and finding ERC20 metadata. |
x/evm/keeper/msg_server.go |
Updated CreateFunToken to include fee deduction logic and added related functions. |
x/evm/keeper/precompiles.go |
Removed AddEVMExtensions function and related imports. |
x/evm/params.go |
Added imports, replaced constant value, and introduced CreateFuntokenFee parameter. |
x/evm/precompile/funtoken.go |
Updated function call from OnStart to OnRunStart . |
x/evm/precompile/precompile.go |
Renamed function OnStart to OnRunStart . |
x/common/testutil/testnetwork/network.go |
Increased maxRetries value for validator stoppage check. |
x/common/testutil/testnetwork/validator_node.go |
Added error logging for gRPC web server closure. |
In the realm of code so vast, FunTokens now have fees amassed. ERC20 tokens reshaped anew, Mint and burn with ease, it's true. Nibiru's path, ever bright, In a coder's heart, pure delight.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 83.89831%
with 19 lines
in your changes missing coverage. Please review.
Project coverage is 65.91%. Comparing base (
187ad82
) to head (2c8f323
). Report is 1 commits behind head on main.
Purpose / Abstract
Part of #1898 and #1836
Summary by CodeRabbit
New Features
FunToken
mappings in the Ethereum Virtual Machine (EVM).Bug Fixes
TestCreateFunTokenFromERC20
,TestCreateFunTokenFromCoin
, andTestSendFunTokenToEvm
.Refactor
MINTER_ROLE
role with an "owner" role inERC20Minter
.OnStart
toOnRunStart
for clarity.Documentation