Pinax Logo/Datasets
PolygonStorage Changes

Column Descriptions

for polygon.storage_changes

10 rows
NameTypeDescription
tx_hashTEXTHash of the transaction that caused the storage change
old_valueTEXTOld value of the storage key
new_valueTEXTNew value of the storage key
addressTEXTAddress whose storage changed
block_hashTEXTHash of the block in which the storage change occurred
block_dateDATEDate of the block in which the storage change occurred
block_numberNUMBERBlock number in which the storage change occurred
keyTEXTStorage key that was changed
block_timeTIMESTAMP_NTZTimestamp of the block in which the storage change occurred
ordinalNUMBEROrdinal of the storage change within the block

Sample Queries

Top 10 Modified Addresses
Lists the 10 addresses with the most storage changes in November 2024
SELECT
  address,
  COUNT(*) AS change_count
FROM
  polygon.storage_changes
WHERE
  block_date BETWEEN '2024-11-01' AND '2024-11-30'
GROUP BY
  address
ORDER BY
  change_count DESC
LIMIT
  10;
Addresses With Most Distinct Storage Keys Changed
Lists the 10 addresses that modified the most distinct storage keys in November 2024
SELECT
  address,
  COUNT(DISTINCT key) AS distinct_key_count
FROM
  polygon.storage_changes
WHERE
  block_date BETWEEN '2024-11-01' AND '2024-11-30'
GROUP BY
  address
ORDER BY
  distinct_key_count DESC
LIMIT
  10;
Storage Changes by Block Showing New and Old Value Prefixes
Shows the first 10 characters of new and old values of the first 10 Storage changes for each block, for November 2024
SELECT
  block_number,
  SUBSTR (new_value, 1, 10) as new_value_prefix,
  SUBSTR (old_value, 1, 10) as old_value_prefix
FROM
  polygon.storage_changes
WHERE
  block_date BETWEEN '2024-11-01' AND '2024-11-30'  QUALIFY ROW_NUMBER() OVER (
    PARTITION BY
      block_number
    ORDER BY
      ordinal
  ) <= 10
ORDER BY
  block_number;