- Deploy the active→resting
amendOrderscontract patch to BSC mainnet. - Preserve all existing production DB data by archiving current live tables into
historical_*before any live-table reset. - Update all contract address references across Strike repos.
- Cut a new Rust SDK release tag after updating hardcoded mainnet addresses in
sdk/rust/src/config.rs.
memory/strike/addresses.mdis the canonical address registry; update it before declaring done.- Do not clear or truncate
historical_*tables. - Do not run
reset-deployment-stateuntil after:- production services are stopped/frozen,
- a DB backup exists,
- live tables are archived into
historical_*, and - archive counts match live counts.
- Use Ansible/source-of-truth deployment paths for production infra/frontend/MM; do not rely on ad-hoc prod edits.
- Push intended commits before Ansible deploy so remote hosts pull the right revision.
- Update
contracts/script/DeployMainnet.s.solso it deploys/wires the full current stack:- FeeModel, OutcomeToken, Vault, OrderBook, BatchAuction, MarketFactory, PythResolver, AIResolver, Redemption.
- Grant OrderBook/Vault/OutcomeToken roles.
- Grant Factory admin to PythResolver, AIResolver, keeper, and resolution keeper.
- Grant Factory market creator to deployer and keeper.
- Set Factory AIResolver.
- Grant AIResolver keeper role to keeper and resolution keeper.
- Print machine-readable JSON with all addresses.
- Run contract validation locally:
forge testfrom~/dev/strike/contracts.- compile/dry-run deploy script if possible without broadcasting.
- Deploy new mainnet contracts with mainnet deployer key.
- Capture first deploy block, final role/config tx/block, and all addresses.
- Update references:
memory/strike/addresses.md.~/dev/strike-infra/ansible/playbooks/group_vars/all.ymlwith new addresses +indexer_from_block.~/dev/strike-frontend/src/lib/contracts.tsmainnet entries.~/dev/strike/sdk/rust/src/config.rsmainnet hardcoded addresses.~/dev/strike-mmmainnet config/address references if present.- docs/README/CLAUDE references across Strike repos.
- Commit and push repo changes:
strikemaster.strike-inframain if Ansible vars changed.strike-frontendmain.strike-mmmain if changed.
- Freeze production services:
- Stop keeper, indexer, and MM. Keep frontend only if safe/read-only; otherwise deploy maintenance/brief downtime.
- Backup production state:
- DB dump from mainnet host.
- Copy current generated
/home/ubuntu/strike-infra/.env.mainnet. - Copy current MM config.
- Record
indexer_state.last_blockand live table counts.
- Archive current live DB into historical tables using old live addresses:
- deployment label:
mainnet-pre-active-resting-amend-20260428. - script:
scripts/archive-live-deployment.sql. - verify historical counts match live counts for markets/orders/batches/fills/events/positions.
- verify
all_filled_ordersstill includes archived fills.
- deployment label:
- Run
reset-deployment-stateonly after archive verification. - Deploy/restart production services via Ansible:
- infra/indexer/keeper with new addresses and start block.
- frontend with new contract map.
- MM from main with new addresses/config.
- Post-cutover smoke tests:
- indexer starts with new deployment fingerprint.
- keeper creates/clears a new market.
- API returns new live market(s).
- frontend HTTP 200 and mainnet contract map correct.
- MM quotes and uses
amendOrderswithout active→resting revert. - archived historical counts remain present.
- SDK release:
- bump SDK version if required by current release convention.
- run SDK checks.
- commit version/address changes.
- push a new SDK release tag after deployment is confirmed.
- note tag in
memory/2026-04-28.md.
- Completed 2026-04-28.
- Deployed mainnet contracts from block
95210316. - Archive label:
mainnet-pre-active-resting-amend-20260428. - DB dump:
/home/ubuntu/strike-mainnet-pre-active-resting-amend-20260428.dumpon mainnet host. - Archived counts matched live counts: markets 1214, orders 27757, batches 12665, fills 34800, events 206852, positions 181.
- Repos pushed:
strike:a66dd9daddress/SDK update, thencf8c889SDK gas-limit release fix.strike-infra:8642991address update, thenb6b8648optional empty address config fix.strike-frontend:0556442address update.
- SDK tags pushed:
sdk-v0.2.13(address update), thensdk-v0.2.14(superseding gas-limit fix for initialplaceOrders). - Smoke: services active; API returned fresh live market
2; MM placed initial 4 orders withgas_limit=1550000and confirmedamendOrdersafter deployment.