Skip to content

Conversation

@nicholaspai
Copy link
Member

No description provided.

nicholaspai and others added 27 commits December 25, 2023 12:59
This function handles most of the fill logic and this PR adds useful test infrastructure for future testing
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com>
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
…into fillUSS functions

# Motivation

1. Reduce the number of params passed into fillUSS-related functions by 1 by removing `destinationChainId` from the passed in `struct`. This also has the added safety benefit of not allowing the caller to set the `destinationChainId` and instead forces them to reference a relay hash using the SpokePool's `chainId()`.

2. This additionally saves gas in these functions because it no longer needs to check the input `relayData.destinationChainId` against the contract's `chainId`.

# Side effects:

Changes implementation of how we construct relay hashes for USS fills by now hashing all of the `RelayData` params as a struct (i.e. as a DepositData struct) WITH the `chainId()` so that the destinationChainId is still hashed to protect against replay attacks
@nicholaspai nicholaspai changed the base branch from master to npai/request-slow-fill January 4, 2024 16:27
Base automatically changed from npai/request-slow-fill to master January 4, 2024 19:36
@nicholaspai nicholaspai marked this pull request as ready for review January 4, 2024 19:37
Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

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

LGTM!

@nicholaspai nicholaspai merged commit 79d2b71 into master Jan 4, 2024
@nicholaspai nicholaspai deleted the npai/fill-updated-uss branch January 4, 2024 22:26
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