sanitizeAbi

Function in @sentio/sdk/eth

Defined in @sentio/sdk/eth

function sanitizeAbi(abi: InterfaceAbi): InterfaceAbi;

Recursively drop indexed: false from ABI fragment objects.

Upstream ethers' ParamType.from throws "parameter cannot be indexed" when a non-event parameter (function/error/constructor input) carries an explicit indexed: false — some real-world ABIs do. The retired @sentio/ethers fork tolerated this; we replicate it here by stripping the redundant flag before the ABI reaches ethers. Dropping indexed: false is safe: it is the default for event params (non-indexed) and meaningless elsewhere; indexed: true is kept.

Parameters

ParameterType
abiInterfaceAbi

Returns

InterfaceAbi

On this page