decodeCallResult
A function to decode the response of a call result (or results of useCall and similar hooks).
Usage
import { decodeCallResult, call } from 'useink/core';
const result = await call<boolean>(contract, ...additionalArgs);
decodeCallResult(result); // { Ok: true, value: boolean } | { Ok: false, error: DispatchError }
Returns
{ Ok: true, value: T } | { Ok: false, error: DispatchError }
Last updated
Was this helpful?