Skip to main content
POST
/
networks
/
{network}
/
call-function
Call Function
curl --request POST \
  --url https://api.dfns.io/networks/{network}/call-function \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contract": "<string>",
  "abi": {
    "type": "<string>",
    "name": "<string>",
    "stateMutability": "<string>",
    "inputs": [
      {
        "name": "<string>",
        "type": "<string>",
        "components": [
          {}
        ]
      }
    ],
    "outputs": [
      {
        "name": "<string>",
        "type": "<string>",
        "components": [
          {}
        ]
      }
    ]
  },
  "calldata": {}
}
'

Authentication

✅ Organization User (CustomerEmployee)
✅ Delegated User (EndUser)
✅ Service Account

Required Permissions

No permission required.

Authorizations

Authorization
string
header
required

Bearer Token: Used to authenticate API requests. More details how to generate the token: Authentication flows

Path Parameters

network
string
required

Network name formatted in kebab case

Body

application/json

Calls an on-chain read function.

contract
string
required

Address of the contract to call

abi
object
required

ABI of the read-only function to invoke

calldata
object

Function call arguments

Response

200 - application/json

Success