-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: rename MsgBridgeCall OutgoingBridgeCall receiver to refund #525
Conversation
WalkthroughThe changes focus on renaming the Changes
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
x/crosschain/types/tx.pb.go
is excluded by!**/*.pb.go
x/crosschain/types/types.pb.go
is excluded by!**/*.pb.go
Files selected for processing (16)
- proto/fx/crosschain/v1/tx.proto (1 hunks)
- proto/fx/crosschain/v1/types.proto (1 hunks)
- x/crosschain/client/cli/flags.go (1 hunks)
- x/crosschain/client/cli/tx.go (2 hunks)
- x/crosschain/keeper/bridge_call_out.go (2 hunks)
- x/crosschain/keeper/bridge_call_out_test.go (1 hunks)
- x/crosschain/keeper/bridge_call_refund.go (2 hunks)
- x/crosschain/keeper/bridge_call_refund_test.go (1 hunks)
- x/crosschain/keeper/msg_server.go (1 hunks)
- x/crosschain/tests/bridge_call_out_test.go (2 hunks)
- x/crosschain/tests/msg_server_test.go (1 hunks)
- x/crosschain/types/msgs.go (2 hunks)
- x/crosschain/types/msgs_test.go (4 hunks)
- x/crosschain/types/types.go (1 hunks)
- x/crosschain/types/types_test.go (1 hunks)
- x/tron/types/checkpoint.go (1 hunks)
Files skipped from review due to trivial changes (1)
- x/crosschain/keeper/bridge_call_out.go
Additional comments not posted (37)
x/crosschain/client/cli/flags.go (1)
1-5
: Removal ofFlagTo
constant aligns with the renaming strategy in the PR. Ensure all references to this flag are updated or removed in the codebase.x/crosschain/keeper/bridge_call_refund_test.go (1)
22-23
: The test correctly initializes and uses the newRefund
field, aligning with the changes in the keeper functions.x/crosschain/keeper/bridge_call_refund.go (1)
15-16
: The functionHandleOutgoingBridgeCallRefund
correctly uses therefund
address, and the logic remains consistent with the intended functionality. Ensure comprehensive testing to verify the behavior with the new field.Also applies to: 24-24, 42-42, 46-46
x/tron/types/checkpoint.go (1)
114-114
: The inclusion of therefund
address inGetCheckpointBridgeCall
is consistent with the renaming strategy. Verify the correctness of the generated checkpoint to ensure it meets the expected format and values.x/crosschain/tests/bridge_call_out_test.go (1)
48-54
: The test correctly initializes and uses the newRefund
field, aligning with the changes in the message handling functions.x/crosschain/keeper/bridge_call_out_test.go (1)
48-48
: The test correctly initializes and uses the newRefund
field, aligning with the changes in the keeper functions.proto/fx/crosschain/v1/types.proto (1)
260-260
: Renamingreceiver
torefund
inOutgoingBridgeCall
aligns with the PR objectives.x/crosschain/types/types_test.go (1)
67-68
: The test caseTestOutgoingBridgeCall_Checkpoint
correctly reflects the renaming ofreceiver
torefund
.proto/fx/crosschain/v1/tx.proto (1)
378-378
: TheMsgBridgeCall
message correctly updates thereceiver
field torefund
.x/crosschain/client/cli/tx.go (1)
195-197
: UpdatedCmdBridgeCall
to includerefund
parameter.Ensure that the
refund
parameter is correctly documented and tested in associated unit tests.Also applies to: 205-217, 225-226
x/crosschain/types/types.go (1)
479-479
: UpdatedGetCheckpoint
to includerefund
parameter in the ABI encoding process.Ensure that the
refund
parameter is correctly documented and tested in associated unit tests.x/crosschain/keeper/msg_server.go (1)
601-601
: The renaming ofreceiver
torefund
in theBridgeCall
function aligns with the PR objectives and is correctly implemented.x/crosschain/types/msgs.go (2)
718-718
: Renamingreceiver
torefund
inMsgBridgeCallClaim.validateBasic
aligns with the PR objectives and maintains the validation logic.
1184-1185
: Conditionally validating therefund
address inMsgBridgeCall.validateBasic
based on the presence ofCoins
is a logical change and aligns with the PR objectives.x/crosschain/tests/msg_server_test.go (13)
1334-1334
: Ensure theRefund
field is correctly used in theMsgBridgeCall
test case.
Line range hint
10-133
: The test cases inTestMsgBondedOracle
are well-structured and cover a variety of scenarios.
Line range hint
135-235
: The test cases inTestMsgAddDelegate
effectively validate the conditions under which delegation can occur, including proper error handling.
Line range hint
237-287
: Comprehensive tests forMsgEditBridger
ensure that the function behaves as expected under various conditions.
Line range hint
289-389
: TheTestMsgSetOracleSetConfirm
function thoroughly tests the oracle set confirmation process, including signature verification and error handling.
Line range hint
391-431
: TheTestClaimWithOracleOnline
function correctly tests the claim process under the condition that the oracle is online, ensuring proper functionality.
Line range hint
433-533
: TheTestClaimMsgGasConsumed
function provides valuable insights into the gas consumption of various claim messages, ensuring efficiency.
Line range hint
535-585
: TheTestClaimTest
function effectively tests the claim functionality, including comprehensive error handling and successful processing.
Line range hint
587-687
: TheTestRequestBatchBaseFee
function provides important insights into how different base fee values affect the profitability and processing of request batches.
Line range hint
689-709
: TheTestMsgUpdateChainOracles
function effectively tests the addition and removal of oracles, ensuring correct processing and state consistency.
Line range hint
711-761
: TheTestBridgeCallClaim
function effectively tests the bridge call claim functionality, including comprehensive error handling and successful processing.
Line range hint
763-813
: TheTestMsgBridgeCall
function effectively tests the processing of bridge calls, ensuring correct handling and state consistency.
Line range hint
815-865
: TheTestAddPendingPoolRewards
function effectively tests the addition of rewards to the pending pool, including comprehensive error handling and successful addition.x/crosschain/types/msgs_test.go (10)
1949-1949
: Ensure theRefund
field is correctly used in theMsgBridgeCall
struct.
1966-1966
: TheRefund
field is correctly initialized in the test case setup.
1986-1986
: TheRefund
field is correctly initialized in the test case setup for the error scenario.
1988-1988
: TheTo
field is correctly initialized in the test case setup for the error scenario.
2000-2000
: TheRefund
field is correctly initialized in the test case setup for the error scenario.
2002-2002
: TheTo
field is correctly initialized in the test case setup for the error scenario.
2007-2007
: The error scenario for an emptyRefund
address is correctly handled.
2014-2014
: TheRefund
field is correctly initialized in the test case setup for the error scenario.
2016-2016
: TheTo
field is correctly initialized in the test case setup for the error scenario.
2029-2029
: TheRefund
field is correctly used in theMsgBridgeCall
struct.
mg |
Summary by CodeRabbit
receiver
field torefund
across various components and functions to improve clarity and consistency in handling refund addresses.CmdBridgeCall
to reflect the new structure.