fix(deploy): make published scripts compatible with ethers v5/v6 and replay - #186
Open
mswilkison wants to merge 2 commits into
Open
mswilkison wants to merge 2 commits into
mswilkison wants to merge 2 commits into
Conversation
mswilkison
marked this pull request as ready for review
September 8, 2026 19:51
This was referenced Sep 8, 2026
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.
Consumers replay this package's published deployment scripts after copying existing deployment records. Today that can repeat the 4.5B T transfer, call an already-used initializer, or grant a timelock role after the deployer has relinquished administration. The mainnet proxy path also depends on ethers v5-only contract and Interface APIs.
Use on-chain balances, governance and role membership to skip completed work; fund only the vending-machine shortfall and fail if the deployer cannot cover it. Reuse TokenStaking records, recover an interrupted initialization, and save mainnet proxy addresses/ABI through hardhat-deploy using the consumer's HRE. Make the mainnet governance and proxy-admin handoffs replay-safe too. The producer remains on its existing ethers v5 dependencies.
The CI producer follows
.nvmrcwhen available (including #182's Node 22 toolchain) and otherwise retains Node 18 for the legacy lockfile. The new CI consumer matrix installs the actual prepacked tarball on ethers v5 and v6 (hardhat-ethers 3 / upgrades 2.5.1). Each lane runs both direct and mainnet-style proxy deployment on fresh local chains, then replays with distinct deployer/council accounts and asserts unchanged account nonces and deployment addresses. It also checks partial/excess funding, insufficient funds, initializer recovery, saved ABI and ownership handoffs.Validation: locked producer build and prepack, lint, formatting checks, and all four consumer scenarios pass locally. The full Solidity suite passed in CI. The producer integrated with #182 was also built and prepacked on Node 22; all four packed consumer scenarios passed on ethers 5.8.0 and 6.17.0. Workflow formatting and actionlint pass. No live network or npm publication is involved.
Addresses #184; sibling fix: threshold-network/keep-core#4320. Publishing the package, updating keep-core pins, and removing tbtc-v2's overrides remain release follow-ups.