Skip to content

Feat: Automate mainnet preflight checks in verify-deployment.sh#239

Open
Lansa-18 wants to merge 4 commits into
Neurowealth:mainfrom
Lansa-18:feature/issue-231-verify-deployment-preflight
Open

Feat: Automate mainnet preflight checks in verify-deployment.sh#239
Lansa-18 wants to merge 4 commits into
Neurowealth:mainfrom
Lansa-18:feature/issue-231-verify-deployment-preflight

Conversation

@Lansa-18

Copy link
Copy Markdown
Contributor

Closes #231

Feat: Mainnet Preflight Assertions in Deployment Script (#231)

Summary

Extends scripts/verify-deployment.sh with automated mainnet preflight assertions and back-links docs/MAINNET_CHECKLIST.md to the script with copy-paste commands.


New Checks in verify-deployment.sh

  • Accepts NETWORK env var for named networks (--network mainnet) in addition to the existing custom RPC path
  • Verifies get_owner() matches OWNER_ADDRESS
  • Asserts owner ≠ agent (key separation — labelled CRITICAL on failure)
  • Validates all four caps match expected values: TVL cap, user deposit cap, min deposit, max deposit — fails if any EXPECTED_* var is unset to prevent silent skips
  • Optionally verifies Blend pool address if BLEND_POOL_ADDRESS is set
  • Prints a structured pass/fail report; exits non-zero on any failure

docs/MAINNET_CHECKLIST.md

Added > Automated check callout blocks in:

  • Section 1 — key separation
  • Section 3 — caps
  • Section 4 — Blend pool

Each block includes full copy-paste commands.


Pre-existing Failures Fixed

Uncovered while running local checks — none introduced by this PR:

Fix Detail
Share-to-USDC conversion Corrected in deposit cap enforcement
get_user_info principal field Fixed incorrect field reference
Rebalance cooldown first-call behaviour Corrected edge case on initial invocation
Test panic expectations Updated to match VaultError numeric codes
cargo deny gaps Resolved license and advisory violations

Checklist

  • CHANGELOG.md updated for any contract version or on-chain behavior changes
  • Release entry matches the expected contract Version storage value (no contract version change — script and docs only, plus test/config fixes)
  • Tests or documentation updates included for new contract behavior (updated MAINNET_CHECKLIST.md; all 339 tests pass)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate mainnet preflight checks in scripts/verify-deployment.sh

1 participant