Saltar al contenido principal

cfx_call

Call contract, returning the output data.

Params

(2)

1. tx (required)

accessList
array[CfxAccessListItem] or null
address
string
Match pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
storageKeys
array[string]
data
string or null
Match pattern:
^0x[0-9a-f]*$
from
string or null
Match pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
gas
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
gasPrice
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
maxFeePerGas
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
maxPriorityFeePerGas
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
nonce
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
storageLimit
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$
to
string or null
Match pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
transactionType
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$
value
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$

2. block_hash_or_epoch_number (required)

No schema defined

Result

(cfx_call_result)
string
Match pattern:
^0x[0-9a-f]*$

Endpoint

Params

tx

accessList

block_hash_or_epoch_number

Unsupported field schema for field root: Unknown field type undefined.

{
  "nullable": true
}

Request

curl -X POST --data \
'{
"method": "cfx_call",
"params": [
null,
null
],
"jsonrpc": "2.0",
"id": 1
}' \
-H "Content-Type: application/json" \
https://test.confluxrpc.com