Skip to content

[wave 2] core+deploy-server: preflight policy gates (chain-id assert, balance check, gas ceiling, simulate-first interlock) #156

Description

@robercano

What

Declarative safety checks that run before any transaction is sent, so mainnet mistakes are caught pre-broadcast.

Scope sketch

  • @redeploy/core: a preflight phase in deploy() — assert expected chainId matches the RPC, deployer balance ≥ threshold, gas price ≤ ceiling; checks declared in the spec (per-network overridable) or passed as options. Failing check aborts with a typed error before any tx.
  • deploy-server: enforce a "simulate must have passed for this spec hash" interlock for designated networks (e.g. requireSimulate: true in network config); surface preflight failures as structured SSE errors so the studio can render them.

Acceptance

Wrong chainId / underfunded deployer / stale simulate → deploy refuses with a clear, typed reason; happy path unaffected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    module:core@redeploy/core deployment enginemodule:deploy-server@redeploy/deploy-serverplannedOwner-approved for the autonomous loop (assigned ONLY by the owner)type:featureFeature work scoped to one module

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions