Pinax Logo/Datasets
PolygonCode Changes

Column Descriptions

for polygon.code_changes

9 rows
NameTypeDescription
block_hashTEXTHash of the block in which the code change occurred
block_dateDATEDate of the block in which the code change occurred
codeTEXTNew code of the contract (bytecode)
block_numberNUMBERBlock number in which the code change occurred
block_timeTIMESTAMP_NTZTimestamp of the block in which the code change occurred
factoryTEXTAddress of the contract that created this contract (if applicable)
fromTEXTOriginal creator of the contract
tx_hashTEXTHash of the transaction that caused the code change
addressTEXTAddress whose code changed

Sample Queries

Daily Code Change Count in Nov 2024
Number of code changes per day in November 2024
SELECT
  block_date,
  COUNT(*) AS code_change_count
FROM
  polygon.code_changes
WHERE
  block_date BETWEEN '2024-11-01' AND '2024-11-30'
GROUP BY
  block_date
ORDER BY
  block_date;
Top 10 Contracts by Code Change Count in Nov 2024
Lists the 10 contracts with the most code changes in November 2024
SELECT
  address,
  COUNT(*) AS change_count
FROM
  polygon.code_changes
WHERE
  block_date BETWEEN '2024-11-01' AND '2024-11-30'
GROUP BY
  address
ORDER BY
  change_count DESC
LIMIT
  10;
Code Change Transactions by Factory in Nov 2024
Lists the transactions grouped by factory contracts involved in code changes in November 2024
SELECT
  factory,
  COUNT(*) AS tx_count
FROM
  polygon.code_changes
WHERE
  block_date BETWEEN '2024-11-01' AND '2024-11-30'
GROUP BY
  factory
ORDER BY
  tx_count DESC
LIMIT
  10;