PreiseGitHubDashboard

Aptos

/v1/view35 Credits

Execute a Move view function

Netzwerk: apt

Parameter

NameTypBeschreibung
ledger_versionstring (u64)Query. Ledger version to run the function at. Defaults to the latest version; pruned versions return 410. (optional)
functionstringBody. Function id: {address}::{module}::{function}, e.g. 0x1::coin::balance.
type_argumentsstring[]Body. Move type arguments of the function (empty array if none).
argumentsany[]Body. Function arguments in JSON form (empty array if none).

Rückgabewert

Typ

any[]

Array of the Move values returned by the view function (u64 values are strings).

Codebeispiele

curl 'https://holy-burned-sky-apt-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7/v1/view' \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "function": "0x1::coin::balance",
  "type_arguments": [
    "0x1::aptos_coin::AptosCoin"
  ],
  "arguments": [
    "0x1"
  ]
}'