Skip to content

Oracle contract calls silently no-op if contract IDs are misconfigured in production #8

Description

@pitah23

Problem

anchorRegistryFlag() and setCoverageStatus() (src/safetynet/oracle.ts) log a warn and return 'dev-noop-tx' when REGISTRY_ANCHOR_CONTRACT_ID / INSURANCE_POOL_CONTRACT_ID are unset — intentional for local dev. But nothing distinguishes "intentionally unset in dev" from "accidentally unset in production," so a misconfigured prod deploy would confirm registry flags and process insurance coverage changes that never actually anchor on-chain, with only a log line as evidence.

Location

src/safetynet/oracle.ts (anchorRegistryFlag, setCoverageStatus)

Suggested fix

Fail fast (throw, or refuse to boot) when config.isProduction is true and the relevant contract ID is unset, instead of silently returning a no-op tx hash.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions