Skip to content

Add StarkExchangeMigrationV2 to Ethereum deployment script#19

Merged
lfportal merged 5 commits intomainfrom
feat/deploy-starkex-migration-v2
Apr 20, 2026
Merged

Add StarkExchangeMigrationV2 to Ethereum deployment script#19
lfportal merged 5 commits intomainfrom
feat/deploy-starkex-migration-v2

Conversation

@lfportal
Copy link
Copy Markdown
Contributor

@lfportal lfportal commented Apr 20, 2026

Summary

  • Extends DeployEthContracts.s.sol to deploy StarkExchangeMigrationV2 as a third implementation contract (step 3), following the same idempotent pattern as V1
  • Adds v2_implementation_address field to stark_exchange_migration in all four eth config files (mainnet + sandbox, input + deployed), defaulting to the zero address
  • Updates script/README.md to reflect V2 in the scripts table, config structure, and output field list

Test plan

  • Run DeployEthContracts.s.sol in simulation mode against sandbox (no --broadcast) and confirm V2 implementation address is printed and written to output
  • Run with --broadcast against sandbox and confirm V2 is deployed; update sandbox/eth_deployed.json with the real address
  • Confirm re-running with the deployed address set skips deployment ("Using existing" log)

🤖 Generated with Claude Code


Note

Medium Risk
Updates the Ethereum deployment flow to select between two migration implementations and introduces a new config field that, if mis-set, could deploy or reference the wrong on-chain implementation for a proxy upgrade.

Overview
Adds versioned deployment support for StarkExchangeMigration on Ethereum. DeployEthContracts.s.sol now reads stark_exchange_migration.version, validates it is 1 or 2, and deploys either StarkExchangeMigration or StarkExchangeMigrationV2, with updated logging.

Updates deployment configs/docs accordingly. Mainnet and sandbox eth_config_input.json/eth_deployed.json gain a stark_exchange_migration.version field, and script/README.md documents the new version selection behavior.

Reviewed by Cursor Bugbot for commit 90ee64e. Bugbot is set up for automated code reviews on this repo. Configure here.

Extends DeployEthContracts to deploy StarkExchangeMigrationV2 as a
third implementation contract (implementation-only, no proxy). Adds
v2_implementation_address to all eth config files and updates the README.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@lfportal lfportal requested a review from a team as a code owner April 20, 2026 00:21
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@lfportal lfportal requested a review from ermyas April 20, 2026 00:31
Comment thread script/DeployEthContracts.s.sol Outdated
lfportal and others added 2 commits April 20, 2026 10:45
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Rather than deploying both V1 and V2 implementations, the script now
reads stark_exchange_migration.version from the config (1 or 2) and
deploys only the selected implementation. Config files updated to add
the version field; input configs set to version 2 (V2 not yet deployed),
deployed configs set to version 1 (V1 currently deployed).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Comment thread script/DeployEthContracts.s.sol Outdated
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@lfportal lfportal merged commit e69be09 into main Apr 20, 2026
5 checks passed
@lfportal lfportal deleted the feat/deploy-starkex-migration-v2 branch April 20, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants