Skip to content

Conversation

@mrice32
Copy link
Contributor

@mrice32 mrice32 commented Feb 20, 2023

No description provided.

Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 changed the title DRAFT: add message to across data DRAFT: add message to across Feb 20, 2023
import "@openzeppelin/contracts/utils/math/SignedMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";

interface AcrossMessageHandler {
Copy link
Member

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,
Copy link
Member

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(
Copy link
Member

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?

Copy link
Contributor Author

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(
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly!

Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 changed the title DRAFT: add message to across feat: add message to across Feb 21, 2023
@mrice32 mrice32 marked this pull request as ready for review February 21, 2023 10:04
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 merged commit c01d48c into master Feb 21, 2023
@mrice32 mrice32 deleted the data_bridge branch February 21, 2023 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants