Skip to content
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

fix: couple swapper addresses to the chain ID (Finding 5) #40

Merged
merged 3 commits into from
Aug 11, 2024

Conversation

ARR4N
Copy link
Owner

@ARR4N ARR4N commented Jul 18, 2024

<T>Swapper constructors now require the current chain ID as their second parameter, which they assert() as correct because the <T>SwapperDeployer always sends the correct ID. Despite the redundant behaviour, the swapper address is now coupled to the particular chain because the ID (a constructor argument) is used in predicting the CREATE2 address.

ARR4N added 2 commits July 18, 2024 17:09
`<T>Swapper` constructors now require the current chain ID as their second parameter, which they `assert()` as correct because the `<T>SwapperDeployer` always sends the correct ID. Despite the redundant behaviour, the swapper address is now coupled to the particular chain because the ID is used in predicting the CREATE2 address.

Note: this still requires testing of the unhappy path.
@ARR4N ARR4N changed the title fix: couple swapper addresses to the chain ID fix: couple swapper addresses to the chain ID (Finding 5) Jul 22, 2024
@ARR4N ARR4N merged commit cbbade1 into main Aug 11, 2024
1 check passed
@ARR4N ARR4N deleted the arr4n/couple-chain-id branch August 11, 2024 15:29
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.

1 participant