Skip to content

supportedNetworks() vs foundry.toml consistency test is not shipped, so no consumer has it #151

Description

@thedavidmeister

testSupportedNetworksAreFullyConfigured (test/src/lib/LibRainDeploy.t.sol:231) checks [rpc_endpoints] and [etherscan] against supportedNetworks() in both directions — but it lives in this repo's own test/, which .soldeerignore excludes from the published package. No consumer repo has it.

foundry.toml:90-92 claims "Adding a network is an edit to all three or a red test". That is true here and false in every consumer: adding a network downstream means three uncoordinated edits (supportedNetworks() upstream, plus the consumer's own [rpc_endpoints] and [etherscan]) with nothing red-lining a mismatch.

Consequences of a silent mismatch:

  • Missing [rpc_endpoints] entry: the chain test cannot fork that network, which surfaces as an RPC outage rather than a configuration error.
  • Missing [etherscan] entry: --verify fails. An entry with an alias foundry cannot resolve to a chain, carrying neither chain nor url, takes down verification for every entry, not just its own.

Ship the check so consumers inherit it: move the assertion into a shipped abstract under src/ (bound the way RainDeployVerifySnapshot/RainDeployVerifyChain are, so a repo binds one contract and gets the check), or provide a library function the consumers' existing test contracts can call. Then bind it in the exemplars.

Found while deriving the current deploy-repo standard from this repo and its four conforming consumers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions