Pinax Logo/Datasets
PolygonLogs

Column Descriptions

for polygon.logs

19 rows
NameTypeDescription
block_hashTEXTHash of the block in which the log was emitted
tx_indexNUMBERIndex of the transaction within the block
tx_hashTEXTHash of the transaction that emitted the log
topic2TEXTThird topic of the log (if any)
topic3TEXTFourth topic of the log (if any)
block_indexNUMBERIndex of the log within the block
tx_fromTEXTAddress of the sender of the transaction
topic1TEXTSecond topic of the log (if any)
tx_toTEXTAddress of the recipient of the transaction
block_dateDATEDate of the block in which the log was emitted
block_numberNUMBERBlock number in which the log was emitted
tx_successBOOLEANBoolean indicating whether the transaction was successful
dataTEXTData field of the log
block_timeTIMESTAMP_NTZTimestamp of the block in which the log was emitted
topic0TEXTFirst topic of the log (usually the event signature hash)
indexNUMBERIndex of the log within the transaction
tx_status_codeNUMBERNumeric code representing the status of the transaction
contract_addressTEXTAddress of the contract that emitted the log
tx_statusTEXTStatus of the transaction (e.g., 'Success', 'Failure')

Sample Queries

Daily Log Count
Number of logs emitted per day.
SELECT
  block_date,
  COUNT(*) AS log_count
FROM
  polygon.logs
GROUP BY
  block_date
ORDER BY
  block_date
LIMIT
  100;
Top 10 Contracts by Log Emission
Lists the 10 contracts that emit the most logs.
SELECT
  contract_address,
  COUNT(*) AS log_count
FROM
  polygon.logs
GROUP BY
  contract_address
ORDER BY
  log_count DESC
LIMIT
  10;
Log Count by Topic 0
Counts logs grouped by their primary topic.
SELECT
  topic0,
  COUNT(*) AS log_count
FROM
  polygon.logs
GROUP BY
  topic0
ORDER BY
  log_count DESC
LIMIT
  100;