Closed k-yang closed 3 months ago
The updates focus on refining the handling of Ethereum addresses within the EVM module by replacing the EthAddr
and EthHash
aliases with gethcommon.Address
and gethcommon.Hash
. The changes improve ID generation and error handling for FunToken
, ensuring more consistent and simplified address management while adding new test functions to ensure reliable conversions and functionality.
File | Change Summary |
---|---|
CHANGELOG.md |
Fixed FunToken state marshalling. No alterations to exported/public entities. |
eth/hex.go |
Updated NewHexAddr and ToAddr signatures to use gethcommon.Address . Modified MarshalTo . |
eth/hex_test.go |
Added TestHexAddrToString() to validate hex address conversion methods. |
eth/state_encoder.go |
Replaced EthAddr /EthHash with gethcommon.Address /gethcommon.Hash . Updated encoders. |
eth/state_encoder_test.go |
Changed given parameter to gethcommon.Address in TestEncoderEthAddr() . |
x/evm/evm.go |
Refactored NewFunTokenID and error handling in FunToken . Removed newFunTokenIDFromStr . |
x/evm/keeper/evm_state.go |
Updated SetAccState and GetState to use gethcommon.Address and gethcommon.Hash . |
x/evm/keeper/funtoken_state.go |
Modified FunTokenState structure to use []byte and evm.FunToken for indexing and encoding. |
x/evm/keeper/funtoken_state_test.go |
Added tests for FunToken operations: TestInsertAndGet , TestCollect , and TestDelete . |
Soft whispers through the code repository, Updating types with thoughtful clarity. Ethereum addresses now more clean, FunTokens validated, ensured to glean. Tests to guide, ensuring all abide, In this enhanced ether's tide. πβ¨
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 70.83333%
with 7 lines
in your changes missing coverage. Please review.
Project coverage is 64.80%. Comparing base (
422c676
) to head (f3ac2f0
).
Purpose / Abstract
FunToken
marshallingSummary by CodeRabbit
New Features
Refactor
Bug Fixes
Tests