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

use create2 in BridgeCreator #265

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

godzillaba
Copy link
Contributor

@godzillaba godzillaba commented Nov 18, 2024

the salt includes all the createBridge args in case it is called with a rollup that wasn't created by RollupCreator. If all args aren't included in this scenario, you could frontrun a bridge creation with different arguments, preventing the proper deployment through the bridge creator.

@cla-bot cla-bot bot added the s label Nov 18, 2024
}

// use create2 salt to ensure deterministic addresses
bytes32 create2Salt = keccak256(abi.encode(adminProxy, rollup, nativeToken, maxTimeVariation));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

technically adminProxy isn't required in the salt since it's a constructor arg. can't hurt to include it though IMO

@godzillaba godzillaba changed the base branch from docs-reorg to develop November 18, 2024 21:07
@godzillaba godzillaba marked this pull request as ready for review November 18, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants