Skip to main content
POST
Invoke a smart contract

Body

application/json
to
file
required

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

Required string length: 40 - 42
Pattern: ^(0x)?[A-Fa-f0-9]{40}$
block
string | null

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

Pattern: ^((0x)?[0-9a-fA-F]+|(earliest|pending|latest))$
Example:

"latest"

data
file | null

Hexadecimal method signature and encoded parameters. Up to 131072 bytes as at most 262146 hexadecimal digits including optional leading 0x.

Maximum string length: 262146
Pattern: ^(0x)?[0-9a-fA-F]+$
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.

Required string length: 40 - 42
Pattern: ^(0x)?[A-Fa-f0-9]{40}$
gas
integer<int64> | null

Gas provided for the transaction execution. Defaults to 15000000.

Required range: x >= 0
Example:

15000000

gasPrice
integer<int64> | null

Gas price used for each paid gas.

Required range: x >= 0
Example:

100000000

value
integer<int64> | 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.

Pattern: ^0x[0-9a-fA-F]+$