Skip to main content

Execute view function of a module

POST 

/view

Execute the Move function with the given parameters and return its execution result.

The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.

Request

Query Parameters

    ledger_version uint64

    Ledger version to get state of account

    If not provided, it will be the latest version

Body

required

    function EntryFunctionId (string)required

    Entry function id is string representation of a entry function defined on-chain.

    Format: {address}::{module name}::{function name}

    Both module name and function name are case-sensitive.

    type_arguments MoveType (string)[]required

    Possible values: Value must match regular expression ^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$

    Type arguments of the function

    arguments undefined[]required

    Arguments of the function

Responses

Response Headers

  • X-APTOS-CHAIN-ID

    integer

    Chain ID of the current chain

  • X-APTOS-LEDGER-VERSION

    integer

    Current ledger version of the chain

  • X-APTOS-LEDGER-OLDEST-VERSION

    integer

    Oldest non-pruned ledger version of the chain

  • X-APTOS-LEDGER-TIMESTAMPUSEC

    integer

    Current timestamp of the chain

  • X-APTOS-EPOCH

    integer

    Current epoch of the chain

  • X-APTOS-BLOCK-HEIGHT

    integer

    Current block height of the chain

  • X-APTOS-OLDEST-BLOCK-HEIGHT

    integer

    Oldest non-pruned block height of the chain

  • X-APTOS-GAS-USED

    integer

    The cost of the call in terms of gas

  • X-APTOS-CURSOR

    string

    Cursor to be used for endpoints that support cursor-based pagination. Pass this to the start field of the endpoint on the next call to get the next page of results.

Schema

  • Array [

  • anyOf

    integer

  • ]

Loading...