Call read function
Execute a read-only contract call (no gas).
POST
/
api
/
v1
/
contract-interactions
/
network
/
{networkId}
/
contract-address
/
{contractAddress}
/
functions
/
read
Call read function
curl --request POST \
--url https://sandbox.oumla.com/api/v1/contract-interactions/network/{networkId}/contract-address/{contractAddress}/functions/read \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-sdk-version: <x-sdk-version>' \
--data '
{
"abiFunction": {
"inputs": [
{
"name": "<string>",
"type": "<string>",
"value": {},
"description": "<string>",
"internalType": "<string>",
"components": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"internalType": "<string>"
}
],
"indexed": true
}
],
"name": "<string>",
"outputs": [
{
"name": "<string>",
"type": "<string>",
"value": {},
"description": "<string>",
"internalType": "<string>",
"components": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"internalType": "<string>"
}
],
"indexed": true
}
],
"description": "<string>",
"anonymous": true
}
}
'{
"result": {
"data": {
"result": {},
"functionName": "<string>",
"contractAddress": "<string>",
"network": "<string>",
"encodedData": "<string>"
},
"success": true,
"status": 123
}
}Authorizations
API key for authentication
Headers
SDK version header
Body
application/json
Show child attributes
Show child attributes
Response
Read call result
Show child attributes
Show child attributes
Was this page helpful?
Previous
Call write functionStart a write/send transaction workflow. Requires interact contract policy.
Next
⌘I
Call read function
curl --request POST \
--url https://sandbox.oumla.com/api/v1/contract-interactions/network/{networkId}/contract-address/{contractAddress}/functions/read \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-sdk-version: <x-sdk-version>' \
--data '
{
"abiFunction": {
"inputs": [
{
"name": "<string>",
"type": "<string>",
"value": {},
"description": "<string>",
"internalType": "<string>",
"components": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"internalType": "<string>"
}
],
"indexed": true
}
],
"name": "<string>",
"outputs": [
{
"name": "<string>",
"type": "<string>",
"value": {},
"description": "<string>",
"internalType": "<string>",
"components": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"internalType": "<string>"
}
],
"indexed": true
}
],
"description": "<string>",
"anonymous": true
}
}
'{
"result": {
"data": {
"result": {},
"functionName": "<string>",
"contractAddress": "<string>",
"network": "<string>",
"encodedData": "<string>"
},
"success": true,
"status": 123
}
}