Skip to main content

/api/v1/contracts/call REST API Endpoint

Invoke a smart contract

Updated on
Aug 23, 2024

/api/v1/contracts/call REST API Endpoint

Please note that this method is currently available only on the testnet and will be accessible on the mainnet soon.

Body Parameters

block
string
The hexadecimal block number or the string 'latest', 'pending', 'earliest'. Defaults to 'latest'
data
integer
Hexadecimal method signature and encoded parameters. Up to 24656 bytes as at most 49152 hexidecimal digits plus optional leading 0x
estimate
boolean
Whether gas estimation is called. Defaults to false
from
string
The 20-byte hexadecimal EVM address the transaction is sent from
gas
integer
The gas provided for the transaction execution. Defaults to 15000000
gasPrice
integer
The gas price used for each paid gas
to
string
REQUIRED
The 20-byte hexadecimal EVM address the transaction is directed to
value
integer
The value sent with this transaction. Defaults to 0

Returns

result
string
The result in hexadecimal from executed contract call.
Request
1
curl --location 'https://docs-demo.hedera-mainnet.quiknode.pro/api/v1/contracts/call' \
2
--header 'Content-Type: application/json' \
3
--data '{
4
"to": "0x9fe15ad3c02dae7a1e4a31ebb805ea9d0b33a4d6"
5
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free