-
Notifications
You must be signed in to change notification settings - Fork 196
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
feat(cli): deterministic deployer fallback #2261
Conversation
🦋 Changeset detectedLatest commit: 6688d66 The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
.changeset/tough-dolphins-bathe.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in the deterministic case, deployed Worlds have the same address for each account + salt, and in the non-deterministic case the address is just different every time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly true, yes!
the non-deterministic case deploys a deployer in a non-deterministic way, and that deployer determines the address of all the downstream (reusable) contracts like world factory, systems, modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that reminds me: I meant to add a CLI option for the deployer so you can get deterministic deploys on a chain with only EIP-155 txs
i.e. deploy the deployer once and manually specify it as the deployer to get determinism
readonly worldDeploy: WorldDeploy; | ||
readonly modules: readonly Module[]; | ||
}): Promise<readonly Hex[]> { | ||
if (!modules.length) return []; | ||
|
||
await ensureContractsDeployed({ | ||
client, | ||
contracts: uniqueBy(modules, (mod) => getAddress(mod.address)).map((mod) => ({ | ||
deployerAddress, | ||
contracts: uniqueBy(modules, (mod) => getAddress(mod.getAddress(deployerAddress))).map((mod) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who called this mod
instead of module
🙄
closes #1839