Skip to content

Latest commit

 

History

History
31 lines (16 loc) · 805 Bytes

File metadata and controls

31 lines (16 loc) · 805 Bytes

@grainlify/contracts-sdk


@grainlify/contracts-sdk / parseContractErrorByCode

Function: parseContractErrorByCode()

parseContractErrorByCode(numericCode, contract): ContractError

Defined in: src/errors.ts:268

Resolve a numeric on-chain error code to a typed ContractError.

Parameters

numericCode

number

The u32 error discriminant from the contract.

contract

"program_escrow" | "bounty_escrow" | "governance" | "circuit_breaker"

Which contract produced the error — determines the look-up table.

Returns

ContractError