Skip to content
docs

createSettlerResolver

createSettlerResolver(config): SettlerResolver

Defined in: protocol-swap2-0x/src/settler.ts:184

Reads the Settler in force from the registry and caches it per chain. The registry address comes from the chain table; the answer comes from the integrator’s own RPC — that RPC is what this module trusts for “which contract is 0x’s Settler right now”, within hard bounds it cannot move: the answer must be a CREATE3 deployment of that registry, no older than the chain’s pinned ZeroExChain.previousLiveNonce and no newer than its ZeroExChain.newestLiveNonce plus ZEROEX_SETTLER_NONCE_MARGIN, with code at the address (read through the same RPC). Which of these a native-coin sale may use is narrower still (checkZeroExTransaction).

SettlerResolverConfig

SettlerResolver