chore: add mainnet deploy script - #22
Merged
sainathr19 merged 1 commit intoAug 19, 2026
Merged
Conversation
No mainnet deploy script existed — HANDOFF.md's M4 steps were manual commands. Adds keeper/deploy-mainnet.mjs: declares + deploys EkuboAdapter then Iceberg using the same mainnet constants test_ekubo_fork.cairo already verified against real Ekubo liquidity (pool, Ekubo router, ETH/USDC pool key). Direction is fixed to in_token=ETH, out_token=USDC (scheduled exit) — the exact direction the fork test exercises, so the deploy carries no new, previously-untested behavior. Safety: - Dry-run by default (prints the plan, touches nothing); needs --yes to actually declare+deploy and spend gas. - Reads deployed in_token/out_token back from the contract after deploy and asserts they match intent, rather than trusting constructor calldata ordering blindly. - DEPLOYER_PRIVATE_KEY only ever read from env / keeper/.env, which is already gitignored. Also: mainnet-deployment.json (this script's output) gitignored to match the existing devnet-deployment.json convention — the durable public record of addresses belongs in strk20.json, not this script-to-script handoff file. Verified: node --check passes, dry-run path exercised end to end with dummy env values (prints the plan, exits 0, no network touched). Not run for real — needs an actual funded deployer account, which isn't available in this session.
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.
Summary
No mainnet deploy script existed — HANDOFF.md's M4 steps were manual commands. Adds
keeper/deploy-mainnet.mjs: declares + deploysEkuboAdapterthenIcebergusing the same mainnet constantstest_ekubo_fork.cairoalready verified against real Ekubo liquidity.Direction fixed to in_token=ETH, out_token=USDC (scheduled exit) — the exact direction the fork test exercises, so this carries no new, previously-untested behavior.
INTERVAL_SECONDSdefaults to 300 (5 min, short for initial testing) — worth knowing it's permanent once deployed, same askeeper/pool_address/swap_router(no setter exists on any of them).Safety:
--yesto actually declare+deploy and spend gas.in_token/out_tokenback from the deployed contract afterward and asserts they match intent, rather than trusting constructor calldata ordering blindly.DEPLOYER_PRIVATE_KEYonly ever read from env /keeper/.env(already gitignored).mainnet-deployment.json(this script's output) gitignored to match the existingdevnet-deployment.jsonconvention — the durable public record belongs instrk20.json, not this handoff file.Test plan
node --checkpasses--yes.