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