Options used to initiate a function call (especially a change function call)

See

Account#viewFunction | viewFunction to initiate a view function call

interface ViewFunctionCallOptions {
    args?: object;
    attachedDeposit?: bigint;
    blockQuery?: BlockReference;
    contractId: string;
    gas?: bigint;
    jsContract?: boolean;
    methodName: string;
    parse?: ((response) => any);
    stringify?: ((input) => Buffer);
}

Hierarchy (view full)

Properties

args?: object

named arguments to pass the method { messageText: 'my message' }

attachedDeposit?: bigint

amount of NEAR (in yoctoNEAR) to send together with the call

blockQuery?: BlockReference
contractId: string

The NEAR account id where the contract is deployed

gas?: bigint

max amount of gas that method call can use

jsContract?: boolean

Is contract from JS SDK, automatically encodes args from JS SDK to binary.

methodName: string

The name of the method to invoke

parse?: ((response) => any)

Type declaration

    • (response): any
    • Parameters

      • response: Uint8Array

      Returns any

stringify?: ((input) => Buffer)

Convert input arguments into bytes array.

Type declaration

    • (input): Buffer
    • Parameters

      • input: any

      Returns Buffer