Skip to main content
POST
/
api
/
v1
/
contracts
/
call
Invoke a smart contract
curl --request POST \
  --url https://mainnet.mirrornode.hedera.com/api/v1/contracts/call \
  --header 'Content-Type: application/json' \
  --data '{
  "block": "latest",
  "estimate": true,
  "gas": 15000000,
  "gasPrice": 100000000,
  "value": 0
}'
{}

Body

application/json
to
file
required

The 20-byte hexadecimal EVM address the transaction is directed to.

block
string | null

Hexadecimal block number or the string "latest", "pending", "earliest". Defaults to "latest".

Example:

"latest"

data
file | null

Hexadecimal method signature and encoded parameters. Up to 24656 bytes as at most 49152 hexidecimal digits plus optional leading 0x.

estimate
boolean | null

Whether gas estimation is called. Defaults to false.

Example:

true

from
file | null

The 20-byte hexadecimal EVM address the transaction is sent from.

gas
integer | null

Gas provided for the transaction execution. Defaults to 15000000.

Required range: x >= 0
Example:

15000000

gasPrice
integer | null

Gas price used for each paid gas.

Required range: x >= 0
Example:

100000000

value
integer | null

Value sent with this transaction. Defaults to 0.

Required range: x >= 0
Example:

0

Response

OK

result
file

Result in hexadecimal from executed contract call.