Closed zakir-code closed 1 week ago
The pull request involves significant modifications to the handling of bridge calls within the codebase. This includes the removal of specific RPC methods, message types, and associated test functions related to MsgBridgeCall
. Additionally, adjustments were made to tests and JSON configurations reflecting these removals. The expected count of implemented interfaces in a test was also updated. Overall, the changes indicate a shift in the architecture and functionality concerning cross-chain messaging and bridge calls.
File | Change Summary |
---|---|
app/encoding_test.go | Modified TestRegisterInterfaces to change expected interface count from 300 to 298 . |
app/interface_registry.json | Removed entries /fx.gravity.crosschain.v1.MsgBridgeCall and /fx.gravity.crosschain.v1.MsgBridgeCallResponse from TypeURLMap and Msgs . |
proto/fx/gravity/crosschain/v1/tx.proto | Removed BridgeCall RPC method and MsgBridgeCallResponse message; alternatives suggested for deprecated RPCs. |
tests/crosschain_suite.go | Removed methods BridgeCall and SendBridgeCallAndResponse from CrosschainTestSuite . |
tests/crosschain_test.go | Removed BridgeCallTest method from IntegrationTest struct. |
tests/integration_test.go | Updated TestRun method to remove invocation of BridgeCallTest . |
x/crosschain/client/cli/tx.go | Removed CmdBridgeCall function and associated CLI command. |
x/crosschain/keeper/bridge_call_out.go | Removed methods SetBridgeCallFromMsg , DeleteBridgeCallFromMsg , and HasBridgeCallFromMsg . |
x/crosschain/keeper/bridge_call_refund.go | Modified HandleOutgoingBridgeCallRefund and DeleteOutgoingBridgeCallRecord methods. |
x/crosschain/keeper/msg_server.go | Removed BridgeCall method; marked several methods as deprecated in favor of a unified Confirm method. |
x/crosschain/keeper/msg_server_router.go | Removed BridgeCall method from msgServer struct. |
x/crosschain/keeper/msg_server_test.go | Removed TestMsgBridgeCall function. |
x/crosschain/types/codec.go | Removed implementation registration for MsgBridgeCall from RegisterInterfaces and RegisterLegacyAminoCodec . |
x/crosschain/types/msgs.go | Removed MsgBridgeCall struct and associated methods. |
x/crosschain/types/msgs_test.go | Removed TestMsgBridgeCall_ValidateBasic function. |
TestRegisterInterfaces
function.🐇 In the meadow, where changes bloom,
The bridge calls fade, making room.
With tests refined and logic clear,
A simpler path now draws us near.
Hops of progress, swift and bright,
In code we trust, our future's light! 🌼
app/encoding_test.go (1)
`46-46`: **Verify the reason for the interface count reduction.** The change from 300 to 298 implemented interfaces aligns with the PR objective of removing cosmos bridge call messages. However, to ensure this change is intentional and correct: 1. Please confirm that this reduction is indeed due to the removal of the bridge call message types. 2. Consider adding a comment explaining the significance of this count, e.g.: ```go // 298 represents the total number of implemented interfaces after removal of cosmos bridge call messages assert.Equal(t, 298, count2) ``` This will help with future maintenance and understanding of the test. To verify the removed interfaces, run the following script: If the script returns no results, it confirms that the MsgBridgeCall implementations have been removed as expected.✅ Verification successful
**Interface count reduction verified.** The decrease from 300 to 298 implemented interfaces correctly reflects the removal of `MsgBridgeCall` interface implementations as intended by the PR. All relevant implementations have been successfully removed.🏁 Scripts executed
The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Check for removed interface implementations related to bridge calls # Test: Search for removed MsgBridgeCall implementations rg --type go -i 'MsgBridgeCall.*implements' -g '!app/encoding_test.go' ``` Length of output: 72 --- Script: ```shell #!/bin/bash # Description: Verify the removal of MsgBridgeCall implementations using ast-grep and rg # Using ast-grep to find implementations of MsgBridgeCall ast-grep --lang go --pattern $'interface $_ { ... MsgBridgeCall ... }' . # Using rg to search for any remaining mentions of MsgBridgeCall rg -i 'MsgBridgeCall' --type go ``` Length of output: 18886
Summary by CodeRabbit
New Features
MsgBridgeCall
functionality.Bug Fixes
Refactor
Chores