-
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: mark deprecated APIs #721
Conversation
WalkthroughThe pull request introduces significant modifications across multiple files, primarily focusing on the Changes
Possibly related PRs
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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: 3
🧹 Outside diff range and nitpick comments (13)
solidity/contracts/bridge/ICrossChain.sol (6)
Line range hint
10-18
: Approved with a minor suggestion.The deprecated
crossChain
function is correctly marked and provides a clear alternative. The function signature is appropriate for cross-chain operations.Consider adding a
@deprecated
tag in the NatSpec format for better documentation:/// @deprecated Use `IBridgeCall.bridgeCall` instead
This will improve IDE support and make the deprecation more visible in generated documentation.
20-24
: Approved with the same minor suggestion.The deprecated
cancelSendToExternal
function is correctly marked and provides a clear alternative. The function signature is appropriate for cancelling an external send operation.As with the previous function, consider adding a
@deprecated
tag in the NatSpec format:/// @deprecated Use `IBridgeCall.bridgeCall` instead
This will maintain consistency across all deprecated functions.
26-32
: Approved with the same minor suggestion.The deprecated
increaseBridgeFee
function is correctly marked and provides a clear alternative. The function signature is appropriate for increasing a bridge fee, and being payable allows it to handle fee increases.As with the previous functions, consider adding a
@deprecated
tag in the NatSpec format:/// @deprecated Use `IBridgeCall.bridgeCall` instead
This will maintain consistency across all deprecated functions and improve documentation.
Line range hint
54-64
: Approved with a minor suggestion for consistency.The deprecated
CrossChain
event is correctly marked. The event parameters cover all necessary information for a cross-chain operation, and the use of indexed parameters will help with efficient event filtering.For consistency with the deprecated functions, consider adding a comment to indicate the replacement:
// Deprecated: use `BridgeCallEvent` instead
This will provide clear guidance on which event to use instead.
Line range hint
66-80
: Approved with the same minor suggestion for consistency.The deprecated
CancelSendToExternal
andIncreaseBridgeFee
events are correctly marked. The event parameters are appropriate for their respective operations, and the use of indexed parameters will help with efficient event filtering.For consistency with the previous suggestion and the deprecated functions, consider adding comments to indicate the replacement for both events:
// Deprecated: use `BridgeCallEvent` instead
This will provide clear guidance on which event to use instead and maintain consistency across all deprecated elements in the interface.
Deprecated functions are still in use within test files and need to be updated.
- File:
solidity/contracts/test/CrossChainTest.sol
- Functions
crossChain
,cancelSendToExternal
, andincreaseBridgeFee
are still being called. Please update these to useIBridgeCall.bridgeCall
.No usages of deprecated events were found in external JavaScript/TypeScript files.
🔗 Analysis chain
Line range hint
1-105
: Summary: Approved changes with suggestions for improved documentation and impact analysis.The changes to the
ICrossChain
interface, including the addition of deprecated functions and events, are consistent and well-implemented. The deprecation notices provide clear alternatives, which should help in the transition to the newIBridgeCall
interface.To ensure a smooth transition and maintain backwards compatibility:
- Verify that all contracts implementing
ICrossChain
are updated to use the newIBridgeCall.bridgeCall
function instead of the deprecated methods.- Check for any external contracts or scripts that might be listening to the deprecated events and update them to use
BridgeCallEvent
instead.- Consider adding a migration guide or documentation to help users transition from the old interface to the new one.
Run the following script to identify potential areas that need updating:
This script will help identify areas of the codebase that may need updating due to the deprecations.
To address the issues found with the previous script, please run the updated script below to identify usages of deprecated functions and events:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Find usages of deprecated functions and events in the codebase echo "Searching for usages of deprecated functions:" rg --type solidity -i "crossChain\s*\(" -g '!ICrossChain.sol' rg --type solidity -i "cancelSendToExternal\s*\(" -g '!ICrossChain.sol' rg --type solidity -i "increaseBridgeFee\s*\(" -g '!ICrossChain.sol' echo "Searching for usages of deprecated events:" rg --type solidity -i "emit\s+CrossChain\s*\(" -g '!ICrossChain.sol' rg --type solidity -i "emit\s+CancelSendToExternal\s*\(" -g '!ICrossChain.sol' rg --type solidity -i "emit\s+IncreaseBridgeFee\s*\(" -g '!ICrossChain.sol' echo "Searching for potential event listeners:" rg --type javascript --type typescript -i "CrossChain|CancelSendToExternal|IncreaseBridgeFee"Length of output: 1054
Script:
#!/bin/bash # Description: Find usages of deprecated functions and events in the codebase echo "Searching for usages of deprecated functions:" rg -i "crossChain\s*\(" -g "*.sol" rg -i "cancelSendToExternal\s*\(" -g "*.sol" rg -i "increaseBridgeFee\s*\(" -g "*.sol" echo "Searching for usages of deprecated events:" rg -i "emit\s+CrossChain\s*\(" -g "*.sol" rg -i "emit\s+CancelSendToExternal\s*\(" -g "*.sol" rg -i "emit\s+IncreaseBridgeFee\s*\(" -g "*.sol" echo "Searching for potential event listeners in JavaScript/TypeScript files:" rg -i "CrossChain|CancelSendToExternal|IncreaseBridgeFee" -g "*.js" -g "*.ts"Length of output: 2326
x/crosschain/precompile/cancel_send_to_external.go (3)
17-20
: Approved: Clear deprecation notice added.The deprecation notice for
CancelSendToExternalMethod
is clear and provides an alternative (BridgeCallMethod
). This aligns with the PR objective of marking deprecated APIs.Consider the following suggestions to improve the deprecation process:
- Add a specific version or date when this API will be removed completely.
- Provide a brief explanation of why this API is being deprecated and the benefits of using
BridgeCallMethod
.- Update any documentation or README files to reflect this deprecation.
Line range hint
24-31
: Approved: Consistent deprecation notice added.The deprecation notice for
NewCancelSendToExternalMethod
is clear and consistent with the struct's deprecation notice. This change aligns with the PR objective of marking deprecated APIs.To ensure a smooth transition away from this deprecated API:
- Consider adding a warning log when this method is called, to alert developers using it at runtime.
- If possible, implement and document the
BridgeCallMethod
alternative to facilitate easier migration for users of this API.- Update any unit tests or integration tests that use this method to either use the new alternative or to expect the deprecation warning.
Action Required: Deprecated
CancelSendToExternalMethod
Still in UseThe deprecated
CancelSendToExternalMethod
is still being used inx/crosschain/precompile/contract.go
. This indicates that the deprecation process is not yet complete and further action is needed to fully migrate toBridgeCallMethod
.Next Steps:
- Refactor Production Code: Replace the usage of
CancelSendToExternalMethod
incontract.go
withBridgeCallMethod
.- Comprehensive Codebase Review: Conduct a thorough search to ensure no other production files are using the deprecated method.
- Update Documentation: Ensure all references to the deprecated method are removed or updated in the documentation.
- Plan for Removal: Schedule the removal of
CancelSendToExternalMethod
in a future release once all dependencies are migrated.🔗 Analysis chain
Line range hint
1-105
: Overall impact: Successful API deprecation with minimal risk.The changes in this file successfully mark the
CancelSendToExternalMethod
struct and its constructor as deprecated, meeting the PR objective. The modifications are non-breaking, allowing current users to continue using the API while being informed of its deprecated status.To complete this deprecation process:
- Conduct a codebase-wide search for usages of
CancelSendToExternalMethod
and plan their migration toBridgeCallMethod
.- Update relevant documentation, including API references and migration guides.
- Consider implementing the
BridgeCallMethod
if not already done, ensuring it provides equivalent or improved functionality.- Plan for the eventual removal of this deprecated API in a future release.
To assist in identifying usages of the deprecated API, you can run the following command:
This will help in planning the migration process and ensuring all instances are updated.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for usages of CancelSendToExternalMethod across the codebase rg "CancelSendToExternalMethod" --type goLength of output: 1829
Script:
#!/bin/bash # Search for usages of CancelSendToExternalMethod outside of test directories rg "CancelSendToExternalMethod" --type go --glob '!tests/*' --glob '!**/*_test.go'Length of output: 1615
x/crosschain/precompile/increase_bridge_fee.go (1)
Line range hint
1-146
: Summary of changes and next stepsThe deprecation notices for
IncreaseBridgeFeeMethod
and its constructor have been added correctly. These changes maintain backward compatibility while signaling the intention to move towards usingBridgeCallMethod
.To ensure a smooth transition:
- Implement
BridgeCallMethod
if not already done.- Update documentation, examples, and tests to reflect these deprecations.
- Plan for the eventual removal of the deprecated code in future releases.
- Consider adding migration guides for users of the deprecated methods.
To facilitate a smooth transition and maintain code quality:
- Create a tracking issue for the deprecation and eventual removal of
IncreaseBridgeFeeMethod
.- Set up deprecation warnings in the code to notify users at runtime.
- In the next major version, consider removing the deprecated code entirely.
Would you like me to create a GitHub issue to track these tasks?
x/crosschain/precompile/crosschain.go (1)
Line range hint
1-138
: Summary: Manage API transition fromCrossChainMethod
toBridgeCallMethod
This file shows the initial steps in deprecating
CrossChainMethod
in favor ofBridgeCallMethod
. While the approach maintains backward compatibility, several steps can be taken to ensure a smoother transition and clearer code.Recommendations for managing this API transition:
- Create a detailed migration guide explaining how to transition from
CrossChainMethod
toBridgeCallMethod
.- Add deprecation warnings that will be visible during compilation or runtime for all
CrossChainMethod
-related code.- Implement
BridgeCallMethod
with equivalent functionality toCrossChainMethod
.- Consider adding wrapper methods using
BridgeCallMethod
internally to allow for a more gradual transition.- Set a timeline for the complete removal of
CrossChainMethod
in a future release.- Update all relevant documentation to reflect these changes and guide users towards the new API.
By following these steps, you can ensure a cleaner codebase in the long term while providing users with a clear path forward.
proto/fx/gravity/crosschain/v1/legacy.proto (2)
126-126
: Approve new response message, suggest adding explanatory comment.The addition of
MsgIncreaseBridgeFeeResponse
is consistent with the previousMsgIncreaseBridgeFee
message.For consistency and clarity, consider adding a similar deprecation comment as suggested for
MsgIncreaseBridgeFee
. For example:// Deprecated: This message is the response type for the deprecated MsgIncreaseBridgeFee. // It will be removed along with MsgIncreaseBridgeFee in <version> scheduled for <date>. message MsgIncreaseBridgeFeeResponse { option deprecated = true; }This maintains consistency in documentation across related deprecated messages.
114-132
: Summary: Consistent API deprecation, but improvements needed in documentation and clarity.The changes in this file consistently implement the PR objective of marking deprecated APIs. The addition of new, immediately deprecated messages suggests a transition strategy in the API.
To improve the clarity and maintainability of this deprecation process, consider the following recommendations:
Add a file-level comment explaining the overall deprecation strategy, including:
- The reason for these changes
- The timeline for removal of deprecated messages
- Any replacement functionality or messages that should be used instead
Ensure that all deprecated messages have consistent, informative comments explaining their deprecated status and providing guidance for developers.
Clarify the status of the corresponding request messages for the new response messages added in this file. Are they defined in other files, or have they been removed as part of this deprecation process?
Consider grouping all deprecated messages together in the file, possibly in a separate section, to make it easier to manage and eventually remove them.
If this deprecation is part of a larger API change, consider creating or updating API migration documentation to guide users through the transition process.
These improvements will greatly enhance the clarity of the code and ease future maintenance efforts.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (2)
x/crosschain/types/legacy.pb.go
is excluded by!**/*.pb.go
x/crosschain/types/tx.pb.go
is excluded by!**/*.pb.go
📒 Files selected for processing (8)
- contract/ICrossChain.go (1 hunks)
- proto/fx/gravity/crosschain/v1/legacy.proto (1 hunks)
- proto/fx/gravity/crosschain/v1/tx.proto (1 hunks)
- solidity/contracts/bridge/ICrossChain.sol (4 hunks)
- tests/contract/CrossChainTest.go (1 hunks)
- x/crosschain/precompile/cancel_send_to_external.go (1 hunks)
- x/crosschain/precompile/crosschain.go (1 hunks)
- x/crosschain/precompile/increase_bridge_fee.go (1 hunks)
✅ Files skipped from review due to trivial changes (1)
- tests/contract/CrossChainTest.go
🧰 Additional context used
🔇 Additional comments (8)
x/crosschain/precompile/increase_bridge_fee.go (1)
Line range hint
27-33
: Constructor deprecation notice added correctly.The deprecation notice for
NewIncreaseBridgeFeeMethod
is consistent with the struct deprecation. The implementation remains unchanged, which is correct for maintaining backward compatibility.To ensure a smooth transition, please run the following script to identify other parts of the codebase that might need updating:
#!/bin/bash # Search for usages of NewIncreaseBridgeFeeMethod rg --type go "NewIncreaseBridgeFeeMethod" -C 3Consider the following:
- Ensure that a constructor for
BridgeCallMethod
exists and is properly implemented.- Update any documentation or examples that reference
NewIncreaseBridgeFeeMethod
.- Plan for the eventual removal of this deprecated code in future releases.
x/crosschain/precompile/crosschain.go (2)
Line range hint
34-138
: Clarify the relationship betweenCrossChainMethod
andBridgeCallMethod
While
CrossChainMethod
and its constructor are deprecated, all its methods remain unchanged. This maintains backward compatibility but may lead to confusion.To improve clarity and guide users towards the new API:
- Add comments to each method explaining how its functionality is handled in
BridgeCallMethod
.- If possible, add deprecation warnings to these methods as well.
- Consider creating wrapper methods that use
BridgeCallMethod
internally, allowing for a more gradual transition.Let's check if
BridgeCallMethod
exists and has similar methods:#!/bin/bash # Search for BridgeCallMethod definition and its methods rg --type go "type BridgeCallMethod struct" -A 20 rg --type go "func \(.*BridgeCallMethod\) .*\(" -C 3Would you like help in drafting comments that explain the relationship between
CrossChainMethod
andBridgeCallMethod
for each method?
Line range hint
26-32
: Update constructor usage and provide alternativeThe
NewCrossChainMethod
constructor has been deprecated along with its associated struct. This is consistent with the move towardsBridgeCallMethod
.To facilitate the transition:
- Ensure that there's a corresponding constructor or factory method for
BridgeCallMethod
.- Update the documentation to clearly indicate the deprecated status and provide examples of using the new
BridgeCallMethod
.- Consider adding a compiler warning or runtime deprecation notice when this constructor is used.
Let's check for any remaining usages of
NewCrossChainMethod
in the codebase:#!/bin/bash # Search for usages of NewCrossChainMethod rg --type go "NewCrossChainMethod" -C 3Would you like assistance in creating a migration guide or updating the documentation for the transition to
BridgeCallMethod
?proto/fx/gravity/crosschain/v1/legacy.proto (4)
115-124
: Approve new message, but clarification needed on deprecation strategy.The addition of
MsgIncreaseBridgeFee
is noted. However, it's unusual to add a new message and immediately mark it as deprecated.Could you please clarify:
- The rationale behind adding a new deprecated message?
- The timeline for its removal?
- Any replacement functionality?
Consider adding a comment explaining the deprecation reason and future plans. For example:
// Deprecated: This message is added for backwards compatibility during the transition to <new_feature>. // It will be removed in <version> scheduled for <date>. Use <alternative_message> instead. message MsgIncreaseBridgeFee { ... }This will help future maintainers understand the context and plan for this message's lifecycle.
128-128
: Approve new response message, suggest documentation and seek clarification.The addition of
MsgOracleSetConfirmResponse
is noted and appears to be part of the API deprecation effort.Please consider the following:
- Add a deprecation comment explaining the reason and future plans, similar to previous messages.
- Could you clarify where the corresponding request message (
MsgOracleSetConfirm
) is defined? It's not visible in this file, which could indicate incomplete refactoring or that it's defined elsewhere.Example comment:
// Deprecated: This message is the response type for the deprecated MsgOracleSetConfirm. // It will be removed in <version> scheduled for <date>. Use <alternative_message> instead. message MsgOracleSetConfirmResponse { option deprecated = true; }This documentation will help maintain consistency and provide context for future developers.
130-130
: Approve new response message, recommend documentation and seek clarification.The addition of
MsgConfirmBatchResponse
is noted and follows the pattern of API deprecation seen in previous messages.Please address the following points:
- Add a deprecation comment explaining the reason and future plans, maintaining consistency with previous messages.
- Clarify the location of the corresponding request message (
MsgConfirmBatch
). Is it defined in another file or has it been removed?Suggested comment:
// Deprecated: This message is the response type for the deprecated MsgConfirmBatch. // It will be removed in <version> scheduled for <date>. Use <alternative_message> instead. message MsgConfirmBatchResponse { option deprecated = true; }This documentation ensures consistency across the deprecated messages and provides valuable context for future maintenance.
132-132
: Approve new response message, suggest documentation improvements and seek clarification.The addition of
MsgBridgeCallConfirmResponse
is consistent with the ongoing API deprecation effort.Please address the following:
- Add a deprecation comment explaining the reason and future plans, similar to previous suggestions.
- Clarify the location of the corresponding request message (
MsgBridgeCallConfirm
). Is it defined elsewhere or has it been removed?Suggested comment:
// Deprecated: This message is the response type for the deprecated MsgBridgeCallConfirm. // It will be removed in <version> scheduled for <date>. Use <alternative_message> instead. message MsgBridgeCallConfirmResponse { option deprecated = true; }Given the repetitive nature of these deprecated message additions, consider a more general approach to documentation:
- Add a comment at the file level explaining the deprecation strategy, affected message types, and the timeline for removal.
- Use a consistent format for individual message comments, possibly with a shorter reference to the file-level comment.
This approach would reduce redundancy and provide a centralized location for deprecation information, making future maintenance easier.
proto/fx/gravity/crosschain/v1/tx.proto (1)
51-53
: Clarify the purpose of the newly added and deprecatedIncreaseBridgeFee
methodThe addition of the
IncreaseBridgeFee
method, which is immediately marked as deprecated, is unusual. This could indicate a recent design change or possibly an oversight. Could you please clarify:
- Why was this method added if it's immediately deprecated?
- Is there a replacement method for this functionality?
- Should this method be removed entirely instead of being added as deprecated?
Additionally, with the deprecation of multiple methods (
OracleSetConfirm
,SendToExternal
,CancelSendToExternal
,RequestBatch
,ConfirmBatch
,BridgeCallConfirm
, and nowIncreaseBridgeFee
), it would be helpful to provide documentation or comments explaining:
- The reasons for deprecating these methods.
- Any replacement methods or alternative approaches that should be used instead.
- The timeline for removing these deprecated methods, if applicable.
This information will help users of the API understand the changes and plan for migrations accordingly.
To ensure consistency across the codebase, let's check for any usages of these deprecated methods:
✅ Verification successful
Deprecated
IncreaseBridgeFee
Method Usage VerifiedThe
IncreaseBridgeFee
method is currently used exclusively within various test files. Deprecating it in the.proto
file should not impact the main production codebase. However, please ensure that all relevant tests are updated to reflect this deprecation and transition to any new methods if they are intended to replaceIncreaseBridgeFee
.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for usages of deprecated methods echo "Searching for usages of deprecated methods:" rg --type go "OracleSetConfirm|SendToExternal|CancelSendToExternal|RequestBatch|ConfirmBatch|BridgeCallConfirm|IncreaseBridgeFee" .Length of output: 173398
// Deprecated: please use BridgeCallMethod | ||
type IncreaseBridgeFeeMethod struct { | ||
*Keeper | ||
abi.Method |
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.
💡 Codebase verification
Deprecated method IncreaseBridgeFeeMethod
is still in use.
The usage of IncreaseBridgeFeeMethod
was found in the following locations:
-
x/crosschain/precompile/contract.go
:NewIncreaseBridgeFeeMethod(keeper)
-
x/crosschain/precompile/increase_bridgefee_test.go
:precompile.NewIncreaseBridgeFeeMethod(nil)
These instances should be updated to use BridgeCallMethod
as per the deprecation notice.
🔗 Analysis chain
Deprecation notice added correctly.
The deprecation notice for IncreaseBridgeFeeMethod
is clear and provides an alternative (BridgeCallMethod
). This change maintains backward compatibility while signaling future removal.
To ensure a smooth transition, please run the following script to identify other parts of the codebase that might need updating:
Consider updating the documentation and any relevant tests to reflect this deprecation.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for usages of IncreaseBridgeFeeMethod
rg --type go "IncreaseBridgeFeeMethod" -C 3
Length of output: 2862
// Deprecated: please use BridgeCallMethod | ||
type CrossChainMethod struct { | ||
*Keeper | ||
abi.Method |
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.
💡 Codebase verification
Deprecated CrossChainMethod
Still in Use Within Test Files
The CrossChainMethod
and NewCrossChainMethod
are still being utilized in crosschain_test.go
. To fully deprecate CrossChainMethod
, please update all test cases to use BridgeCallMethod
.
🔗 Analysis chain
Consider updating usage of CrossChainMethod
to BridgeCallMethod
The CrossChainMethod
struct has been marked as deprecated. While it's good practice to maintain backward compatibility, it's important to plan for the transition to BridgeCallMethod
.
To ensure a smooth transition:
- Document the deprecation in the project's changelog or release notes.
- If possible, add a deprecation warning that will be visible during compilation or runtime.
- Create a migration guide for users to transition from
CrossChainMethod
toBridgeCallMethod
. - Set a timeline for the complete removal of
CrossChainMethod
in a future release.
Let's check for any remaining usages of CrossChainMethod
in the codebase:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for usages of CrossChainMethod
rg --type go "CrossChainMethod" -C 3
Length of output: 1552
Script:
#!/bin/bash
# Corrected shell script to search for usages of CrossChainMethod and NewCrossChainMethod
rg --type go "CrossChainMethod|NewCrossChainMethod" -C 3
Length of output: 4989
@@ -31,7 +31,7 @@ var ( | |||
|
|||
// ICrossChainMetaData contains all meta data concerning the ICrossChain contract. | |||
var ICrossChainMetaData = &bind.MetaData{ | |||
ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"txID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"AddPendingPoolRewardsEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_txOrigin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_dstChain\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_memo\",\"type\":\"bytes\"}],\"name\":\"BridgeCallEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"txID\",\"type\":\"uint256\"}],\"name\":\"CancelPendingBridgeCallEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"txID\",\"type\":\"uint256\"}],\"name\":\"CancelSendToExternal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"receipt\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"target\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"name\":\"CrossChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"}],\"name\":\"ExecuteClaimEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"txID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"IncreaseBridgeFee\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_txID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_reward\",\"type\":\"uint256\"}],\"name\":\"addPendingPoolRewards\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_dstChain\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_refund\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_memo\",\"type\":\"bytes\"}],\"name\":\"bridgeCall\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_target\",\"type\":\"bytes32\"}],\"name\":\"bridgeCoinAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_txID\",\"type\":\"uint256\"}],\"name\":\"cancelPendingBridgeCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_txID\",\"type\":\"uint256\"}],\"name\":\"cancelSendToExternal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_receipt\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_target\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"_memo\",\"type\":\"string\"}],\"name\":\"crossChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"}],\"name\":\"executeClaim\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_externalAddress\",\"type\":\"address\"}],\"name\":\"hasOracle\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_txID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"}],\"name\":\"increaseBridgeFee\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_externalAddress\",\"type\":\"address\"}],\"name\":\"isOracleOnline\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", | |||
ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_txOrigin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_dstChain\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_memo\",\"type\":\"bytes\"}],\"name\":\"BridgeCallEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"txID\",\"type\":\"uint256\"}],\"name\":\"CancelSendToExternal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"receipt\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"target\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"name\":\"CrossChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"}],\"name\":\"ExecuteClaimEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"chain\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"txID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"IncreaseBridgeFee\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_dstChain\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_refund\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_memo\",\"type\":\"bytes\"}],\"name\":\"bridgeCall\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_target\",\"type\":\"bytes32\"}],\"name\":\"bridgeCoinAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_txID\",\"type\":\"uint256\"}],\"name\":\"cancelSendToExternal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_receipt\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_target\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"_memo\",\"type\":\"string\"}],\"name\":\"crossChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"}],\"name\":\"executeClaim\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_externalAddress\",\"type\":\"address\"}],\"name\":\"hasOracle\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_txID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"}],\"name\":\"increaseBridgeFee\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chain\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_externalAddress\",\"type\":\"address\"}],\"name\":\"isOracleOnline\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_result\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", |
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.
Consider deprecating APIs instead of removing them
The PR title suggests marking APIs as deprecated, but the methods and events related to AddPendingPoolRewards
and CancelPendingBridgeCall
have been entirely removed. Removing public APIs can introduce breaking changes for clients that depend on them. To maintain backward compatibility, consider marking these APIs as deprecated first before fully removing them in a future release.
Summary by CodeRabbit
New Features
Deprecations
Bug Fixes