-
Notifications
You must be signed in to change notification settings - Fork 75
feat: add message to across #239
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
Conversation
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
| import "@openzeppelin/contracts/utils/math/SignedMath.sol"; | ||
| import "@openzeppelin/contracts/utils/Address.sol"; | ||
|
|
||
| interface AcrossMessageHandler { |
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.
nit add comment here about whats expected of integrators before mergimg
| abi.encode( | ||
| keccak256("UpdateRelayerFeeMessage(int64 newRelayerFeePct,uint32 depositId,uint256 originChainId)"), | ||
| newRelayerFeePct, | ||
| UPDATE_DEPOSIT_DETAILS_HASH, |
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.
+1
| require(isValid, "invalid signature"); | ||
| } | ||
|
|
||
| function _verifySlowFill( |
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.
Moving it here just for readability?
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.
Yep. Just to make the flow super simple and similar in each of the fill methods -- check some single-line requirements and then process the fill.
| } | ||
|
|
||
| if (Address.isContract(relayData.recipient) && relayData.message.length > 0) { | ||
| AcrossMessageHandler(relayData.recipient).handleAcrossMessage( |
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.
So if this fails, then relay is not filled at all and depositor can update the recipient/data, right?
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.
Exactly!
No description provided.