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

Account#viewFunction | viewFunction to initiate a view function call

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

Hierarchy (View Summary)

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

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

stringify?: (input: any) => Buffer

Convert input arguments into bytes array.