Skip to content

Log

Zig struct representation of the log RPC response.

Properties

struct {
  blockHash: ?Hash
  address: Address
  logIndex: ?usize
  data: Hex
  removed: bool
  topics: []const ?Hash
  blockNumber: ?u64
  transactionIndex: ?usize
  transactionHash: ?Hash
  transactionLogIndex: ?usize = null
  blockTimestamp: ?u64 = null
}

Logs

Slice of the struct log

[]const Log

LogRequest

Its default all null so that when it gets stringified Logs request struct used by the RPC request methods. we can use ignore_null_fields to omit these fields

Properties

struct {
  fromBlock: ?u64 = null
  toBlock: ?u64 = null
  address: ?Address = null
  topics: ?[]const ?Hex = null
  blockHash: ?Hash = null
}

LogTagRequest

Same as LogRequest but fromBlock and toBlock are tags.

Properties

struct {
  fromBlock: ?BalanceBlockTag = null
  toBlock: ?BalanceBlockTag = null
  address: ?Address = null
  topics: ?[]const ?Hex = null
  blockHash: ?Hash = null
}

WatchLogsRequest

Options for watchLogs websocket request.

Properties

struct {
  address: Address
  topics: ?[]const ?Hex = null
}