Skip to content

Conversation

TucksonDev
Copy link
Contributor

@TucksonDev TucksonDev commented Aug 20, 2025

This PR adds the possibility of deploying the TokenBridgeCreator contract along with its templates to deterministic addresses using Create2.
Verification of contracts is done in #115 , so that PR should be merged before this one.

@cla-bot cla-bot bot added the cla-signed label Aug 20, 2025
// Upgrade Executor
// (Deployed using ABI and bytecode from @offchainlabs/upgrade-executor)
//
const upgradeExecutorTemplate = await deployContract(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that in the original script we used the UpgradeExecutor abi and bytecode from the UpgradeExecutor repo instead of the factory from the sdk (source)

Copy link
Contributor

Choose a reason for hiding this comment

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

i think we should keep that behavior, i left a comment about it

@TucksonDev TucksonDev marked this pull request as ready for review August 21, 2025 11:55
Signer,
Wallet,
} from 'ethers'
import { Interface, hexZeroPad, defaultAbiCoder } from 'ethers/lib/utils'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import { Interface, hexZeroPad, defaultAbiCoder } from 'ethers/lib/utils'
import { Interface, hexZeroPad } from 'ethers/lib/utils'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are some unused imports here, as well as some commented bits, that are used in #115 .

And I just realized that while separating the PRs, this one was left a bit messy, apologies for that 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Happy to clean this up, and move whatever is needed to the other PR if needed.

// Parent chain helper contracts
//
// Multicall2
const parentMulticall2 = await deployContract(
Copy link
Contributor

Choose a reason for hiding this comment

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

probably a nit but i think it'd be easier to review the diff if we left the variable / function names the same and left the deployments in the same order

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I see what you mean. We decided to start changing the terminology used from L1/L2 to Parent/Child, and I tried to keep the changes only to the function that I was working on, but seeing now the diff, I think this PR could have been split into 2: add create2, and changes in terminology.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants