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 addressoneOf- RpcAddress
- (RpcAddress,...)[]
 type : stringPattern :- ^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$type : array- items[x]RpcAddresstype : stringPattern :- ^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
 
- blockHashes blockHashestype : array- items[x]H256type : stringPattern :- ^0x[0-9,a-f,A-F]{64}$
 
- fromBlock fromBlocktype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
- fromEpoch fromEpochoneOf- 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 toBlocktype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
- toEpoch toEpochoneOf- 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 topicstype : array- items[x]H256 XOR (H256,...)[]oneOf- H256
- (H256,...)[]
 type : stringPattern :- ^0x[0-9,a-f,A-F]{64}$type : array- items[x]H256type : stringPattern :- ^0x[0-9,a-f,A-F]{64}$
 
 
Result
Schema
type : array
- items[x]objecttype : object- address addresstype : stringPattern :- ^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
- blockHash blockHashtype : stringPattern :- ^0x[0-9,a-f,A-F]{64}$
- data datatype : stringPattern :- ^0x[0-9a-f]*$
- epochNumber epochNumbertype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,63}|0)$
- logIndex logIndextype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,63}|0)$
- space spacetype : stringPossible values :- native
- ethereum
 
- topics topicstype : array- items[x]H256type : stringPattern :- ^0x[0-9,a-f,A-F]{64}$
 
- transactionHash transactionHashtype : stringPattern :- ^0x[0-9,a-f,A-F]{64}$
- transactionIndex transactionIndextype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,63}|0)$
- transactionLogIndex transactionLogIndextype