@thruputchain/client
    Preparing search index...

    Interface ContractMethod<TArgs, TResult, TDeclaredException>

    Complete generated method API.

    interface ContractMethod<TArgs, TResult, TDeclaredException> {
        effect: ContractMethodEffect | null;
        entrypoint: ContractEntrypointID;
        name: string;
        call(
            options: ContractCallOptions<TArgs>,
        ): ContractCall<TResult, TDeclaredException>;
        decodeArgs(data: Uint8Array): TArgs;
        decodeException(data: Uint8Array): ContractException<TDeclaredException>;
        decodeReceipt(receipt: RpcTransactionReceipt): ContractReceipt<TResult>;
        decodeReceiptOutcome(
            receipt: RpcTransactionReceipt,
        ): ContractReceiptOutcome<TResult, ContractException<TDeclaredException>>;
        decodeReturn(data: Uint8Array): TResult;
        decodeView(response: RpcSimulationResult): ContractView<TResult>;
        decodeViewOutcome(
            response: RpcSimulationResult,
        ): ContractViewOutcome<TResult, ContractException<TDeclaredException>>;
        invocation(
            contract: ContractAddress,
            gasLimit: GasAmount,
            ...args: MethodArgs<TArgs>,
        ): Invocation;
        view(options: ContractViewOptions<TArgs>): Promise<ContractView<TResult>>;
        viewOutcome(
            options: ContractViewOptions<TArgs>,
        ): Promise<
            ContractViewOutcome<TResult, ContractException<TDeclaredException>>,
        >;
        viewRequest(
            options: ContractViewRequestOptions<TArgs>,
        ): ContractViewRequest<TResult, TDeclaredException>;
    }

    Type Parameters

    • TArgs
    • TResult
    • TDeclaredException
    Index

    Properties

    effect: ContractMethodEffect | null

    Author-declared effects, including nested calls. Pure excludes state/context reads; read-only excludes application effects (including events); state-changing means effects may occur. Null means unannotated and gives no read-only assurance. These declarations are not compiler/runtime enforced and never restrict invocation or view APIs.

    entrypoint: ContractEntrypointID
    name: string

    Qualified method name, or entrypoint when generated identity is absent.

    Methods

    • Decode complete calldata using the generated public argument names. Returns undefined for no-argument methods; rejects incomplete or trailing bytes. Select the descriptor after checking the invocation's entrypoint. ABI decoding does not verify the target contract's behavior.

      Parameters

      • data: Uint8Array

      Returns TArgs

      const { receiver, amount } = ERC20.v0_1.transfer.decodeArgs(invocation.calldata);
      
    • Decode complete return data; reject incomplete or trailing bytes.

      Parameters

      • data: Uint8Array

      Returns TResult

    • Parameters

      Returns Invocation