Repository navigation
feat(factory): the genesis admin is a parameter, one factory per environment - #80
Merged
Merged
Conversation
…ronment
The factory's proxy init code baked one admin constant, so every network
shared one factory address and one deployer key. Each environment now has
its own deployer key (testnet in libid-testnet, mainnet in libid-mainnet),
so the admin becomes the one varying input: `FactoryDeployer.proxyInitCode(admin)`
in Solidity, `FactoryGenesis { admin }` in Rust with `address` and `ensure`.
Addresses stay a pure function of (admin, name), the same on every network
one deployer deploys to; testnet and mainnet get different tables.
Assisted-by: Claude Fable 5.1
Signed-off-by: Green Baneling <XgreenX9999@gmail.com>
Assisted-by: Claude Fable 5.1 Signed-off-by: Green Baneling <XgreenX9999@gmail.com>
This was referenced Oct 4, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Green (2026-10-04): the testnet deployer key moves to libid-testnet and mainnet gets its own; different contract addresses per environment are accepted. The factory baked one admin constant, which tied every network to one key.
Changes
FactoryGenesis.solremoved;FactoryDeployer.proxyInitCode(admin),predictFactoryAddress(admin),proxyDeployCalldata(admin).LibidFactoryand the factory README describe one factory per environment.FACTORY_GENESIS_ADMIN,factory_proxy_init_code,predict_factory_addressandensure_factorybecomeFactoryGenesis { admin }withproxy_init_code,address,ensure.Verified
forge build+ factory suite: 28 passed.cargo +nightly fmt,cargo clippy --all-targets -D warningsclean,cargo test -p libid-contracts: 14 + 7 anvil tests pass (bootstrap from a bare chain included)._offunctions).Not verified / known issues
[accounts].deployerper network and a fresh stack per environment.Assisted-by: Claude Fable 5.1