Closed Unique-Divine closed 2 days ago
The recent changes introduce comprehensive updates to the Ethereum Virtual Machine (EVM) functionality, primarily focusing on facilitating the creation of FunToken
mappings from existing ERC20 tokens and bank coins. This includes renaming constants, updating structures and methods for compatibility, embedding Solidity contracts for enhanced token functionalities, and revamping testing mechanisms. These changes expand the EVM module's interoperability and functionality within the ecosystem.
File(s) | Change Summary |
---|---|
server_config.go |
Renamed DefaultGasCap to DefaultEthCallGasLimit and updated the gas limit value. |
eth/rpc/rpcapi/eth_api_test.go |
Updated imports and modified contract data assignment using embeds.CompiledEvmContract . |
proto/eth/evm/v1/tx.proto |
Added CreateFunToken RPC method, and new message types MsgCreateFunToken and MsgCreateFunTokenResponse . |
x/evm/const.go , x/evm/deps.go |
Updated import paths and function signatures for compatibility with gethcommon . |
x/evm/embeds/... |
Introduced new Solidity contract ERC20Minter , added Hardhat project samples, and embedded contract management. |
x/evm/evm_test.go |
Added new test function TestModuleAddressEVM for module address generation. |
x/evm/json_tx_args.go |
Updated JsonTxArgs struct to accept both "data" and "input" fields for backwards compatibility. |
x/evm/keeper/... |
Added functionality for creating ERC20 tokens from bank coins, new methods in keeper package, and unit tests. |
x/common/testutil/cli/network.go |
Adjusted timeout value in a time.Sleep call to address address-in-use errors more effectively. |
sequenceDiagram
participant User
participant Client
participant EVM Module
participant Bank Module
User->>Client: Request creation of FunToken from ERC20 token
Client->>EVM Module: Initiate CreateFunToken RPC
EVM Module->>EVM Module: Validate inputs and deploy FunToken contract
EVM Module->>Bank Module: Store ERC20 token metadata
Bank Module-->>EVM Module: Confirmation of metadata storage
EVM Module-->>Client: Response with FunToken details
Client-->>User: FunToken creation successful
Objective | Addressed | Explanation |
---|---|---|
Implement CreateFunTokenFromERC20 (Issue #1941) |
✅ | |
Implement CreateFunTokenFromCoin (Issue #1942) |
✅ |
In the world of blocks and chains,
A token's magic now remains.
From ERC20 seeds, it sprouts,
And bank coins, too, with joyous shouts.
The FunToken's dance, a sight to see,
Ethereum dreams in harmony.
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 64.59459%
with 131 lines
in your changes missing coverage. Please review.
Project coverage is 65.34%. Comparing base (
1b758bb
) to head (97f21cf
). Report is 1 commits behind head on main.
Purpose / Abstract
Summary of Changes
FunToken
mapping from an existing ERC20.DeployContract
helper function from theevmtest
package to accept variadic arguments that will be passed to the constructor of the EVM contract. This is useful for deploying more complex contract types in tests.Summary by CodeRabbit
New Features
Refactor
gethcommon
types instead ofcommon
for Ethereum addresses and hashes.Bug Fixes
eth_call/estimateGas
operations.