decodeError

Decodes an error.

Example

import { decodeError } from "thirdweb/utils";
const data = "0x...";
const error = await decodeError({ contract, data });
function decodeError(options: {
contract: Readonly<ContractOptions<abi>>;
data: `0x${string}`;
}): Promise<unknown>;

Parameters

The options object.

Type

let options: {
contract: Readonly<ContractOptions<abi>>;
data: `0x${string}`;
};

Returns

let returnType: Promise<unknown>;

The decoded error.