Expand description
Registry of deployment targets decdn config init --chain <name> can bake in.
Each KnownChain pairs a small hand-written descriptor (name, label,
chain id, public RPC endpoint) with the on-disk deployment manifest embedded
at compile time. Contract addresses are never written here — they are read
from the manifest the Foundry DeployProtocol script writes, so a redeploy
flows into config init automatically with no addresses to hand-sync.
The manifest is embedded from crates/cli/deployments/, not from
contracts/deployments/ where the deploy script writes it, because
include_str! may not escape the package: a path outside the crate is
unreachable from the published .crate and cargo install decdn-cli would
fail to build. contracts/deployments/ stays canonical and this is a
byte-identical mirror — the deployment-manifest-mirror pre-commit hook and
its CI counterpart cmp the two and fail on any drift, so re-copy the file
as part of a redeploy.
Structs§
- Chain
Addresses - Contract addresses read from a chain’s manifest, mapped to
[blockchain]config keys. Every field is an EIP-55 checksummed0xstring exactly as the deploy script recorded it. - Known
Chain - A deployment target
config initknows how to bake into a fresh config.
Constants§
- KNOWN_
CHAINS - Every chain
config initcan target. Adding an entry here — plus its manifest undercontracts/deployments/and a copy of that file incrates/cli/deployments/— is all it takes to offer a new network; today there is exactly one, so--chainmay be omitted entirely.
Functions§
- resolve
- Resolve a
--chainselector to the chain whose values to bake in.