Skip to main content

Variable: EVM_CONFIG_SCHEMA

const EVM_CONFIG_SCHEMA: ZodObject<{
ackTimeoutMs: ConfigField<number, {
describe: "how long to wait for an RFQ server ack, in milliseconds";
env: "ACK_TIMEOUT_MS";
scope: "host";
}>;
apiKey: ConfigField<string, {
arg: "<key>";
describe: "Overcast backend API key";
env: "API_KEY";
flag: "--api-key";
scope: "host";
secret: true;
}>;
backend: ConfigField<string, {
arg: "<url>";
describe: "Overcast backend url";
env: "BACKEND_URL";
flag: "--backend";
scope: "host";
}>;
chainId: ConfigField<number, {
arg: "<id>";
describe: "chain id of the targeted deployment";
env: "CHAIN_ID";
flag: "--chain-id";
}>;
chainlinkSettlementFactoryAddress: ConfigField<string, {
arg: "<address>";
describe: "ChainlinkSettlementFactory address, likewise";
env: "CHAINLINK_SETTLEMENT_FACTORY_ADDRESS";
flag: "--chainlink-settlement-address";
}>;
domain: ConfigField<number, {
arg: "<n>";
describe: "protocol domain separator of the deployment; read from chain when omitted";
env: "DOMAIN";
flag: "--domain";
}>;
finality: ConfigField<EvmFinality, {
describe: "how the finalized head is resolved: \"finalized\" for the block tag, or a confirmation depth";
env: "FINALITY";
}>;
logBlockRange: ConfigField<number, {
describe: "widest block span the indexer passes to a single eth_getLogs";
env: "LOG_BLOCK_RANGE";
}>;
overcastCoreAddress: ConfigField<string, {
arg: "<address>";
describe: "Core proxy address, for a chain id with no generated deployment";
env: "CORE_ADDRESS";
flag: "--core-address";
}>;
owner: ConfigField<string, {
arg: "<address>";
describe: "the wallet this app acts as when it holds no key of its own";
env: "OWNER";
flag: "--owner";
}>;
physicalSettlementFactoryAddress: ConfigField<string, {
arg: "<address>";
describe: "PhysicalSettlementFactory address, likewise";
env: "PHYSICAL_SETTLEMENT_FACTORY_ADDRESS";
flag: "--physical-settlement-address";
}>;
privateKey: ConfigField<string, {
describe: "the wallet's signing key, as 0x-prefixed hex";
env: "PRIVATE_KEY";
secret: true;
}>;
receiptPollInterval: ConfigField<number, {
describe: "how often to re-check for a transaction receipt, in milliseconds";
env: "RECEIPT_POLL_INTERVAL";
}>;
rpcUrl: ConfigField<string, {
arg: "<url>";
describe: "the chain's JSON-RPC endpoint";
env: "RPC_URL";
flag: "--rpc";
}>;
socketConfig: ConfigField<{
transports: ("polling" | "websocket")[];
}, {
arg: "<transport>";
describe: "pin the RFQ socket to one transport instead of negotiating";
env: "TRANSPORT";
flag: "--transport";
scope: "host";
}>;
txConfirmations: ConfigField<number, {
describe: "blocks to wait before reporting a submitted transaction back";
env: "TX_CONFIRMATIONS";
}>;
wsUrl: ConfigField<string, {
arg: "<url>";
describe: "websocket endpoint the indexer subscribes to Core logs on";
env: "WS_URL";
flag: "--ws";
}>;
}, $strip>;

Defined in: evm-client/src/schema.ts:30

How an EVM deployment is configured from strings — a --flag, an environment variable, a secret manager — for any host that has to read one: the CLI's global flags, a backend's per-chain environment.

The counterpart to evmConfig, which turns these overrides into a complete config: this says what an operator may state, that says what the defaults are. The fields absent from here are the ones no string can express — publicClient, walletClient, account, chain, rpcTransport are objects a program constructs — plus chainName, which is the host's own naming decision rather than a value it reads. The satisfies is what enforces that: a field that is not on EvmConfig, or whose parser produces the wrong type for the one it names, fails to compile here rather than downstream.

Imports nothing from viem, and reaches EvmConfig through import type, so this module stays free of the chain runtime — which is what lets a host import it (@overcast-xyz/evm-client/schema) to build its flags without paying for the client it may not end up constructing.