Docs

Docs

  • Develop
  • Validate
  • Integrate
  • Learn

โ€บREST API

Welcome to Elrond

  • Welcome to Elrond

Technology

  • Architecture Overview
  • Entities
  • Chronology
  • Secure Proof of Stake
  • Adaptive State Sharding
  • The Arwen WASM VM
  • Cross Shard Transactions

Wallet

  • Web Wallet
  • Ledger

Validators

  • Overview
  • System Requirements
  • Install a Mainnet Node

    • Scripts & User config
    • Installing a Validator Node
    • Optional Configurations
    • How to use the Docker Image

    Install a Testnet Node

    • Scripts & User config
    • Installing & updating
    • Manage your testnet node

    Install a Devnet Node

    • Scripts & User config
    • Installing & updating
    • Manage your devnet node

    Manage your keys

    • Validator Keys
    • Wallet Keys
    • Protecting your keys

    Staking, Unstaking, Unjailing

    • Staking, unstaking and unjailing
    • Staking
    • Unjailing
  • Rating
  • Node CLI
  • Useful Links & Tools
  • FAQs

Developers

    Tutorials

    • The Counter Smart Contract
    • Start Building - Crowdfunding Tutorial
    • The Crowdfunding Smart Contract (part 2)

    Signing Transactions

    • Signing Transactions
    • Tools for signing
    • Signing programmatically
  • ESDT tokens
  • The Staking Smart Contract
  • Developer reference

    • Mandos tests reference
    • The Elrond Serialization Format
  • Setup a Local Testnet
  • Setup a Local Testnet (advanced)
  • Creating Wallets

SDK and Tools

    REST API

    • REST API
    • Addresses
    • Transactions
    • Network
    • Nodes
    • Blocks
    • Virtual Machine
    • Versions and Changelog
  • Proxy
  • erdpy

    • erdpy
    • Installing erdpy
    • Configuring erdpy
    • erdpy CLI
    • Deriving the Wallet PEM file
    • Sending bulk transactions
    • Writing and running erdpy scripts
  • erdjs
  • erdgo
  • erdjava
  • erdwalletjs-cli

Integrators

  • Observing Squad
  • Accounts Management
  • Creating Transactions
  • Querying the Blockchain

Detailed comparison

  • Overview
  • Elrond vs. Ethereum Serenity
  • Elrond vs. Zilliqa
  • Elrond vs. Dfinity
  • Elrond vs. Algorand
  • Elrond vs. Harmony

Virtual Machine

Query values stored within Smart Contracts.

POST Compute Output of Pure Function

https://api.elrond.com/vm-values/query

This endpoint allows one to execute - with no side-effects - a pure function of a Smart Contract and retrieve the execution results (the Virtual Machine Output).

Request
Response

Body Parameters

ParamRequiredTypeDescription
scAddressREQUIREDstringThe Address (bech32) of the Smart Contract.
funcNameREQUIREDstringThe name of the Pure Function to execute.
argsREQUIREDarrayThe arguments of the Pure Function, as hex-encoded strings. The array can be empty.
callerOPTIONALstringThe Address (bech32) of the caller.
valueOPTIONALstringThe Value to transfer (can be zero).

๐ŸŸข 200: OK

The VM Output is retrieved successfully.

{
"data": {
"ReturnData": [
"eyJSZ... (base64)"
],
"ReturnCode": 0,
"ReturnMessage": "",
"GasRemaining": 1500000000,
"GasRefund": 0,
"OutputAccounts": {
"...": {
"Address": "... (base64)",
"Nonce": 0,
"Balance": null,
"BalanceDelta": 0,
"StorageUpdates": null,
"Code": null,
"CodeMetadata": null,
"Data": null,
"GasLimit": 0,
"CallType": 0
}
},
"DeletedAccounts": null,
"TouchedAccounts": null,
"Logs": null
}
}

Here's an example of a request:

POST https://api.elrond.com/vm-values/query HTTP/1.1
Content-Type: application/json

{
    "scAddress": "erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqllls0lczs7",
    "funcName": "get",
    "args": ["d98d..."],
    "caller": "erd1k2s324ww2g0yj38qn2ch2jwctdy8mnfxep94q9arncc6xecg3xaq6mjse8",
    "value": "0"
}

POST Compute Hex Output of Pure Function

https://api.elrond.com/vm-values/hex

This endpoint allows one to execute - with no side-effects - a pure function of a Smart Contract and retrieve the first output value as a hex-encoded string.

Request
Response

Body Parameters

ParamRequiredTypeDescription
scAddressREQUIREDstringThe Address (bech32) of the Smart Contract.
funcNameREQUIREDstringThe name of the Pure Function to execute.
argsREQUIREDarrayThe arguments of the Pure Function, as hex-encoded strings. The array can be empty.
callerOPTIONALstringThe Address (bech32) of the caller.
valueOPTIONALstringThe Value to transfer (can be zero).

๐ŸŸข 200: OK

The output value is retrieved successfully.

{
"data": "7b22..."
}

POST Compute String Output of Pure Function

https://api.elrond.com/vm-values/string

This endpoint allows one to execute - with no side-effects - a pure function of a Smart Contract and retrieve the first output value as a string.

Request
Response

Body Parameters

ParamRequiredTypeDescription
scAddressREQUIREDstringThe Address (bech32) of the Smart Contract.
funcNameREQUIREDstringThe name of the Pure Function to execute.
argsREQUIREDarrayThe arguments of the Pure Function, as hex-encoded strings. The array can be empty.
callerOPTIONALstringThe Address (bech32) of the caller.
valueOPTIONALstringThe Value to transfer (can be zero).

๐ŸŸข 200: OK

The output value is retrieved successfully.

{
"data": "foobar"
}

POST Get Integer Output of Pure Function

https://api.elrond.com/vm-values/int

This endpoint allows one to execute - with no side-effects - a pure function of a Smart Contract and retrieve the first output value as an integer.

Request
Response

Body Parameters

ParamRequiredTypeDescription
scAddressREQUIREDstringThe Address (bech32) of the Smart Contract.
funcNameREQUIREDstringThe name of the Pure Function to execute.
argsREQUIREDarrayThe arguments of the Pure Function, as hex-encoded strings. The array can be empty.
callerOPTIONALstringThe Address (bech32) of the caller.
valueOPTIONALstringThe Value to transfer (can be zero).

๐ŸŸข 200: OK

The output value is retrieved successfully.

{
"data": "2020"
}
โ† BlocksVersions and Changelog โ†’
  • POST Compute Output of Pure Function
  • POST Compute Hex Output of Pure Function
  • POST Compute String Output of Pure Function
  • POST Get Integer Output of Pure Function
Made withby the Elrond team.
GithubChat
Main siteWalletExplorerBridgeDocs