Skip to main content

Function: toProtocolConfig()

function toProtocolConfig(config): ProtocolConfig;

Defined in: evm-client/src/utils.ts:280

The contract's ProtocolConfig as the core domain shape — what the ProtocolInitialized and ProtocolConfigUpdated logs carry.

Two narrowings happen here. An unset optionCreationHook is the zero address on-chain and null in the core shape, which is the distinction every consumer actually branches on ("is a fee hook configured"); leaving it as a zero slot would make "no hook" indistinguishable from a hook that happens to read as zero. And both bitmasks are uint256 on the contract but number in the core shape: they are Action bit indices, so the live values sit in the low bits and Number is exact — a mask above 2^53 would lose precision, but that needs 53 distinct protocol actions to exist first.

Parameters​

ParameterType
configProtocolConfig

Returns​

ProtocolConfig