PolygonCode Changes
Column Descriptions
for polygon.code_changes
9 rows
Name | Type | Description |
---|---|---|
block_hash | TEXT | Hash of the block in which the code change occurred |
block_date | DATE | Date of the block in which the code change occurred |
code | TEXT | New code of the contract (bytecode) |
block_number | NUMBER | Block number in which the code change occurred |
block_time | TIMESTAMP_NTZ | Timestamp of the block in which the code change occurred |
factory | TEXT | Address of the contract that created this contract (if applicable) |
from | TEXT | Original creator of the contract |
tx_hash | TEXT | Hash of the transaction that caused the code change |
address | TEXT | Address 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;