Closed zakir-code closed 2 weeks ago
The pull request introduces significant modifications across several test files and the implementation of the MsgServer
and Keeper
structs. Key changes include the simplification of token handling logic, particularly for bridge tokens, by replacing existing methods with new ones that streamline the creation and minting processes. Additionally, the test suites have been restructured to enhance clarity and maintainability, with some tests being temporarily disabled. Overall, the changes focus on improving the handling of tokens, particularly in cross-chain scenarios, and refining the associated test cases.
File Path | Change Summary |
---|---|
x/crosschain/keeper/genesis_test.go | Modified TestBatchAndTxImportExport to replace GenHexAddress() with AddRandomBaseToken() , simplifying minting logic. |
x/crosschain/keeper/grpc_query_v1_test.go | Restructured CrossChainGrpcTestSuite to inherit from KeeperTestSuite . Commented out TestCrossChainGrpcTestSuite_bsc . Updated TestCrossChainGrpcTestSuite_eth . |
x/crosschain/keeper/keeper_v1_test.go | Added AddRandomBaseToken and MintBaseToken methods to KeeperTestSuite . |
x/crosschain/keeper/msg_server.go | Removed fxtypes import; simplified SendToExternal method by eliminating denomination conversion logic. |
x/crosschain/keeper/msg_server_test.go | Restructured tests for message types, enhanced error handling, and added new test cases. |
x/crosschain/keeper/outgoing_pool.go | Replaced GetContractByBridgeDenom with BaseCoinToBridgeToken . Rewrote handleCancelRefund for simplicity. |
x/crosschain/keeper/outgoing_pool_test.go | Updated TestKeeper_OutgoingPool to simplify logic and focus on base tokens. |
x/crosschain/precompile/cancel_send_to_external_test.go | Added suite.T().SkipNow() to TestCancelSendToExternal and TestDeleteOutgoingTransferRelation . |
x/crosschain/precompile/crosschain_test.go | Added SkipNow() to TestCrossChain and structured various cross-chain tests. |
x/crosschain/precompile/increase_bridgefee_test.go | Added SkipNow() to TestIncreaseBridgeFee . |
x/crosschain/precompile/keeper.go | Removed denomination conversion logic from handlerCrossChain . |
x/tron/keeper/grpc_query_test.go | Removed TestKeeper_BatchFees function and its associated test cases. |
AttestationHandler
, relevant to token handling and bridge token logic.HasBridgeToken
, directly related to bridge token management.BaseCoinToBridgeToken
, relevant to bridge token logic.SendToFxExecuted
, intersecting with token processing changes.BaseSuite
, indirectly relating to impacted functionalities.BaseSuite
, also relating to bridge token handling.🐇 In the meadow, tokens play,
With bridges built, they find their way.
No more fuss, just mint and send,
A simpler path, around the bend.
Tests may skip, but soon they'll run,
For every change, there's joy and fun! 🌼
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
New Features
Bug Fixes
Documentation
Refactor
Chores