Closed Unique-Divine closed 2 weeks ago
These changes introduce several enhancements to the Ethereum Virtual Machine (EVM) module within the NibiruChain project. The primary updates include the addition of a FunToken
message for handling fungible tokens in Protobuf format, corresponding tests for the HexAddr
, updates to type handling, initializations in the Keeper
struct, and modifications to event attributes. This significantly improves how fungible tokens are managed, validated, and encoded within the system.
File(s) | Summary |
---|---|
CHANGELOG.md |
Documented the addition of the EVM fungible token protobufs and tests. |
e2e/evm/test/contract_send_nibi.test.ts |
Updated imports and type declarations for SendMethod . |
eth/hex.go , eth/hex_test.go |
Introduced HexAddr type and related functions, along with test cases for Ethereum hex addresses. |
eth/state_encoder.go |
Changed import paths and updated type aliases for Ethereum address and hash handling. |
proto/eth/evm/v1/evm.proto |
Added the FunToken message to represent fungible token mappings. |
proto/eth/evm/v1/genesis.proto |
Introduced funtoken_mappings in GenesisState to hold ERC-20 token mappings. |
x/evm/access_list_test.go |
Added a copyright notice. |
x/evm/const.go |
Added constants for FunToken mappings in the EVM module. |
x/evm/events.go |
Modified several event attribute key constants. |
x/evm/evm.go , x/evm/evm_test.go |
Introduced functions and tests for FunToken handling, including creation and validation. |
x/evm/keeper/evm_state.go |
Clarified the documentation for the SetAccState function. |
x/evm/keeper/funtoken_state.go |
Added FunTokenState struct and methods for managing fungible tokens. |
x/evm/keeper/keeper.go |
Included FunTokens field in Keeper struct and initialized it in NewKeeper function. |
sequenceDiagram
participant User
participant EVM
participant Keeper
participant FunTokenState
User->>EVM: Create FunToken
EVM->>FunTokenState: Validate and Insert FunToken
FunTokenState-->>EVM: Validation Result
EVM-->>User: FunToken Created
Whispers in bytes, the tokens flow, Ethereum's dance, with addresses aglow. Keeper of keys, with maps anew, FunTokens flourish, set in their cue. Nibiru's chain, the ledger's delight, Under rabbit's watch, systems take flight.
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 60.19417%
with 41 lines
in your changes missing coverage. Please review.
Project coverage is 64.71%. Comparing base (
4a73c37
) to head (ae624cb
). Report is 1 commits behind head on main.:exclamation: Current head ae624cb differs from pull request most recent head 351442a
Please upload reports for the commit 351442a to get more accurate results.
Purpose / Abstract
This pull request implements the
FunToken
type outline in the spec for #1898 along with related key-value stores for reading and writing these coin and ERC20 mappings.A special string type called
HexAddr
was added in order to maintain a safe, direct conversion between strings and thego-ethereum/common.Address
(ERC-55 Ethereum address) so that we can use Eth addresses as a gogoproto.customtypeSummary by CodeRabbit
New Features
Bug Fixes
Tests
HexAddr
) and fungible tokens.Documentation
CHANGELOG.md
to include recent additions related to EVM fungible tokens.Chores