• Calls a function of a smart contract deployed at a given address.

    Remarks

    The serialization of arguments must be handled by the caller and the callee.

    Returns

    The return value of the executed function, serialized as a 'StaticArray'.

    Throws

    • if the given address is not a valid address.
    • if the function doesn't exist in the contract to call.

    Parameters

    • at: Address

      The address of the contract where the function will be executed.

    • functionName: string

      The name of the function to be called in the contract.

    • args: Args

      The arguments of the function being called (type: Args).

    • coins: number

      The amount of coins to pass if it is a payable function (minimum value is 0).

    Returns StaticArray<u8>

Generated using TypeDoc