cfx_getLogs
Returns logs matching the filter provided.
- CURL
curl --request POST \
--url https://main.confluxrpc.com \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": [{}],
"method": "cfx_getLogs"
}'
Params
filter required
Schema
type : object
address address
oneOf- RpcAddress
- (RpcAddress,...)[]
type : stringPattern :^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
type : arrayitems[x]
RpcAddresstype : stringPattern :^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
blockHashes blockHashes
type : arrayitems[x]
H256type : stringPattern :^0x[0-9,a-f,A-F]{64}$
fromBlock fromBlock
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,15}|0)$
fromEpoch fromEpoch
oneOf- U64
- string
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,15}|0)$
type : stringPossible values :earliest
latest_checkpoint
latest_finalized
latest_confirmed
latest_state
latest_mined
toBlock toBlock
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,15}|0)$
toEpoch toEpoch
oneOf- U64
- string
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,15}|0)$
type : stringPossible values :earliest
latest_checkpoint
latest_finalized
latest_confirmed
latest_state
latest_mined
topics topics
type : arrayitems[x]
H256 XOR (H256,...)[]oneOf- H256
- (H256,...)[]
type : stringPattern :^0x[0-9,a-f,A-F]{64}$
type : arrayitems[x]
H256type : stringPattern :^0x[0-9,a-f,A-F]{64}$
Result
Schema
type : array
items[x]
objecttype : objectaddress address
type : stringPattern :^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
blockHash blockHash
type : stringPattern :^0x[0-9,a-f,A-F]{64}$
data data
type : stringPattern :^0x[0-9a-f]*$
epochNumber epochNumber
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$
logIndex logIndex
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$
space space
type : stringPossible values :native
ethereum
topics topics
type : arrayitems[x]
H256type : stringPattern :^0x[0-9,a-f,A-F]{64}$
transactionHash transactionHash
type : stringPattern :^0x[0-9,a-f,A-F]{64}$
transactionIndex transactionIndex
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$
transactionLogIndex transactionLogIndex
type