Function: evmConfig()
function evmConfig<N>(config): EvmConfig<N>;
Defined in: evm-client/src/config.ts:244
Build a complete EvmConfig from a partial one.
The chain is resolved first, because everything else is keyed off it:
EvmConfig.chain (if given) supplies the id and RPC URL it was defined
with, so { chain: sepolia } needs nothing else, while an explicit chainId /
rpcUrl still wins over both. The contract addresses then default to the
canonical deployment on that chain rather than to a hard-coded anvil address
— pointing at a different chain without restating them used to silently keep
the local ones.
Type Parameters
| Type Parameter |
|---|
N extends string |
Parameters
| Parameter | Type |
|---|---|
config | InputConfig<EvmConfig<N>, N> |
Returns
EvmConfig<N>
Throws
when the resolved chain has no generated deployment and the addresses
were not supplied — the alternative is a client addressed at undefined, which
fails later as an unrelated parse error.