Closed zakir-code closed 1 week ago
The pull request introduces significant modifications across multiple files, primarily enhancing the FxTarget
struct and its methods, as well as refactoring the token handling logic in the keeper
package. Key changes include the addition of a variadic parameter for hex decoding in the ParseFxTarget
function, the introduction of new methods for converting addresses, and a shift from ERC20 token handling to base coin handling in bridge call processes. Several methods have been updated or removed to streamline functionality and improve clarity in token conversions and bridge call management.
File | Change Summary |
---|---|
types/target.go |
Updated ParseFxTarget to accept a variadic boolean parameter isHex . Added method ReceiveAddrToStr to convert sdk.AccAddress to string based on Prefix . Updated import statements. |
x/crosschain/keeper/bridge_call_in.go |
Refactored BridgeCallHandler to use IsMemoSendCallTo() . Renamed receiverTokenAddr to receiverAddr . Shifted from types.NewERC20Tokens to base coins handling. Updated method signatures for BridgeCallFailedRefund and BridgeCallEvm . |
x/crosschain/keeper/bridge_call_out.go |
Updated AddOutgoingBridgeCall method to replace tokens with baseCoins . Created new tokens slice from baseCoins . |
x/crosschain/keeper/hook.go |
Removed PrecompileBridgeCall method from Keeper struct. |
x/crosschain/keeper/many_to_one.go |
Renamed BridgeTokenToBaseCoin to EvmToBaseCoin . Added BaseCoinToEvm . Updated method signatures for token conversion. |
x/crosschain/keeper/send_to_fx.go |
Modified SendToFxExecuted to use claim.Amount directly. Updated RelayTransferHandler to parse fxTarget directly from claim.TargetIbc . Changed logic for ibcReceiveAddress . |
x/crosschain/mock/expected_keepers_mocks.go |
Added ConvertERC20 method to MockErc20Keeper . |
x/crosschain/precompile/bridge_call.go |
Renamed variables and modified token handling logic. Updated method to invoke bridge calls. |
x/crosschain/types/expected_keepers.go |
Added ConvertERC20 method to Erc20Keeper interface. Moved GetTokenPair method. |
x/crosschain/types/types.go |
Removed NewERC20Tokens function. Other methods remain unchanged. |
gasLimit
parameter in bridge call functions, potentially impacting bridge call transaction processing.BridgeCall
function, possibly connecting to the BridgeCallHandler
changes.SendToFxExecuted
.BridgeCall
function, relevant to changes in BridgeCallHandler
.BridgeCallHandler
.BridgeCallHandler
.bridgeCall
function's return type, related to BridgeCallHandler
.BridgeCallHandler
.BridgeCallHandler
.BridgeCallHandler
.BridgeCallHandler
.🐰 In the meadow, changes abound,
With tokens and bridges, new paths are found.
Hex strings decoded, addresses in sight,
Simplified logic, everything feels right.
Hopping along, we embrace the new day,
For every small change, we cheer and we play! 🌼
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?
Summary by CodeRabbit
Release Notes
New Features
FxTarget
struct with improved parsing and address conversion capabilities.ConvertERC20
method in the mock keeper for testing ERC20 token conversions.Improvements
Bug Fixes
Refactor