### Install pdp CLI Tool Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/README.md Installs the `pdp` command-line interface tool for managing Paradigm Data Portal datasets. This tool allows users to list, download, and manage various crypto datasets. ```bash pip install paradigm-data-portal ``` -------------------------------- ### Get Help for pdp download command Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_native_transfers/README.md This command displays the help message for the 'pdp download' command, providing information on available options and usage for downloading datasets. ```bash pdp download -h ``` -------------------------------- ### pdp CLI Tool Usage Examples Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/README.md Demonstrates common commands for the `pdp` CLI tool, including listing datasets, listing files within a dataset, and downloading a dataset. Detailed help for each command is available using the `-h` flag. ```bash pdp ls pdp ls pdp download pdp -h ``` -------------------------------- ### Download Ethereum Slots using pdp CLI Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_slots/README.md This command downloads the entire Ethereum Slots dataset using the 'pdp' command-line interface tool. Ensure the 'pdp' tool is installed and configured. ```bash pdp download ethereum_slots ``` -------------------------------- ### Contract Deployment Information (DAI Example) Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Retrieves deployment details for a specific contract address (DAI in this example). It converts the address to binary, filters the data, and then converts binary columns back to hex format. ```python DAI = '0x6b175474e89094c44da98b954eedeac495271d0f' ``` ```python binary_address = ctc.binary_convert(DAI, 'binary') result = ( pl.scan_parquet(data_path) .filter(pl.col('contract_address') == binary_address) .collect(streaming=True) ) pl_utils.binary_columns_to_prefix_hex(result) ``` -------------------------------- ### Download Ethereum Contracts using pdp CLI Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_contracts/README.md This snippet demonstrates how to download the entire Ethereum Contracts dataset using the `pdp` command-line interface tool. It assumes the `pdp` tool is installed and configured. ```bash pdp download ethereum_contracts # For more options, see: pdp download -h ``` -------------------------------- ### Get Unique Column Count Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb A utility function to calculate the number of unique values in a specified column of the scanned Parquet data. It uses Polars for efficient, streaming data processing. ```python def get_unique_column_count(column): result = pl.scan_parquet(data_path).select( pl.col(column).n_unique(), ).collect(streaming=True) return result[column][0] ``` -------------------------------- ### Get Top N Entities by Count Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb A function to retrieve the top N most frequent entities (like deployers, factories, etc.) from a specified column. It counts value occurrences, sorts them, and returns the top N. ```python def get_top_n(column, n): col = '0x' + (pl.col(column).struct.field(column).bin.encode('hex')) return ( pl.scan_parquet(data_path) .select(pl.col(column).value_counts()) .select([col.alias(column), pl.col(column).struct.field('counts')]) .sort('counts', descending=True) .head(n) .collect(streaming=True) ) ``` -------------------------------- ### Set Up Environment and Data Path Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Configures the display width for Polars columns and sets the data path for the Ethereum contracts Parquet files, expanding the user directory. ```python # set up env pl_utils.set_column_display_width() data_path = '~/pdp/ethereum_contracts/ethereum_contracts__v1_0_0__*.parquet' data_path = os.path.expanduser(data_path) ``` -------------------------------- ### Dataset Versioning Explained Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/README.md Details the versioning scheme for datasets in the Paradigm Data Portal, following a `..` format. Explains how schema changes, data modifications, and new block additions impact version increments. ```APIDOC Dataset Versioning: Format: .. - Major version increase: Schema updates. - Minor version increase: Rows added, removed, or modified. - Patch version increase: Rows added due to new blocks. Example: 1.2.8 ``` -------------------------------- ### Download Ethereum Native Transfers using pdp CLI Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_native_transfers/README.md This command downloads the entire Ethereum Native Transfers dataset using the 'pdp' command-line interface tool. It's a convenient way to acquire the full dataset for analysis. ```bash pdp download ethereum_native_transfers ``` -------------------------------- ### Ethereum Contracts Dataset Schema Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_contracts/README.md This documentation outlines the schema for the `contracts` table in the Ethereum Contracts Dataset. Each row represents a contract creation trace with details like block number, transaction hash, contract address, deployer, and bytecode. ```APIDOC contracts table: Each row corresponds to a contract create trace. Columns: block_number (INTEGER): Block number when contract was created. create_index (INTEGER): Increased by 1 for each contract created in block. transaction_hash (BINARY): Hash of transaction that created contract. contract_address (BINARY): Address of deployed contract. deployer (BINARY): EOA that deployed the contract. factory (BINARY): The `from` field in the creation trace. init_code (BINARY): Initialization bytecode of contract. code (BINARY): Bytecode of contract. init_code_hash (BINARY): Keccak hash of contract initialization code. code_hash (BINARY): Keccak hash of contract bytecode. ``` -------------------------------- ### Download Ethereum Slots Dataset via URLs Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_slots/README.md Provides direct URLs to download individual parquet files that constitute the Ethereum Slots Dataset. The dataset is split into multiple files based on contract address ranges. ```url https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0x00_to_0x0f.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0x10_to_0x1f.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0x20_to_0x2f.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0x30_to_0x3f.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0x40_to_0x4f.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0x50_to_0x5f.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0x60_to_0x6f.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0x70_to_0x7f.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0x80_to_0x8f.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0x90_to_0x9f.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0xa0_to_0xaf.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0xb0_to_0xbf.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0xc0_to_0xcf.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0xd0_to_0xdf.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0xe0_to_0xef.parquet https://datasets.paradigm.xyz/datasets/ethereum_slots/ethereum_slots__v1.0.0__0xf0_to_0xff.parquet ``` -------------------------------- ### Calculate Percentage of Contracts by Top 10 Deployers Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Calculates and prints the percentage of all Ethereum contracts deployed by the top 10 EOAs. ```python top_10_deployer_percent = toolstr.format( top_10_deployers['counts'].sum() / n_deployments, percentage=True, decimals=1, ) print('The top 10 deployers have deployed', top_10_deployer_percent, 'of all contracts on Ethereum') ``` -------------------------------- ### Import Libraries for Ethereum Contracts Analysis Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Imports necessary libraries including math, os, shutil, subprocess, ctc, polars, matplotlib, toolplot, numpy, and toolstr for data manipulation, plotting, and utility functions. ```python import math import os import shutil import subprocess import ctc import ctc.rpc from ctc.toolbox import pl_utils import polars as pl import matplotlib.pyplot as plt import toolplot import numpy as np import toolstr ``` -------------------------------- ### Calculate Percentage of Contracts by Top 10 Factories Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Calculates and displays the percentage of all Ethereum contracts deployed by the top 10 factories. ```python top_10_factory_percent = toolstr.format( top_10_factories['counts'].sum() / n_deployments, percentage=True, decimals=1, ) print('The top 10 factories have deployed', top_10_factory_percent, 'of all contracts on Ethereum') ``` -------------------------------- ### Python Script for Collecting Ethereum Slots Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_slots/README.md This snippet references a Python script used for collecting Ethereum slot data. The script is hosted on GitHub and is the source for generating the dataset. ```python https://github.com/paradigmxyz/paradigm-data-portal/blob/main/pdp/datasets/slots/slots_collect.py ``` -------------------------------- ### Count Total Contract Deployments Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Calculates the total number of contract deployments by counting the entries in the 'create_index' column of the dataset. ```python result = pl.scan_parquet(data_path).select(pl.col('create_index').count()).collect() n_deployments = result['create_index'][0] n_deployments ``` -------------------------------- ### Identify Top 10 Common Bytecodes Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Finds the 10 most common contract bytecodes (identified by `code_hash`) using the `get_top_n` function. ```python top_10_bytecodes = get_top_n("code_hash", 10) top_10_bytecodes ``` -------------------------------- ### Download Ethereum Native Transfers Data (Parquet) Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_native_transfers/README.md Provides direct download links for Parquet files containing Ethereum native transfer data. The data is segmented into files based on block ranges, allowing for efficient downloading of specific data subsets. Each link points to a .parquet file. ```parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__00000000_to_00199999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__00200000_to_00399999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__00400000_to_00599999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__00600000_to_00799999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__00800000_to_00999999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__01000000_to_01199999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__01200000_to_01399999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__01400000_to_01599999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__01600000_to_01799999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__01800000_to_01999999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__02000000_to_02199999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__02200000_to_02399999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__02400000_to_02599999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__02600000_to_02799999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__02800000_to_02999999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__03000000_to_03199999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__03200000_to_03399999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__03400000_to_03599999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__03600000_to_03799999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__03800000_to_03999999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__04000000_to_04199999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__04200000_to_04399999.parquet https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__04400000_to_04599999.parquet ``` -------------------------------- ### Calculate Percentage of Contracts by Top 10 Bytecodes Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Calculates and presents the percentage of all Ethereum contracts that utilize the top 10 most common bytecodes. ```python top_10_bytecode_percent = toolstr.format( top_10_bytecodes['counts'].sum() / n_deployments, percentage=True, decimals=1, ) print('The top 10 bytecodes represent', top_10_bytecode_percent, 'of all contracts on Ethereum') ``` -------------------------------- ### Calculate Percentage of Re-deployed Addresses Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Calculates and prints the percentage of contract addresses that have been deployed more than once, using the previously computed counts. ```python more_than_once_percent = toolstr.format( n_deployed_more_than_once / n_unique_contract_addresses, percentage=True, decimals=2, ) print(more_than_once_percent, 'of contract addresses have been deployed more than once') ``` -------------------------------- ### Download Ethereum Contracts Data (v1.0.0) Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_contracts/README.md Provides direct URLs to download Parquet files containing Ethereum contract data. The data is versioned as v1.0.0 and segmented into files based on block number ranges, from 00000000 to 16799999. These files are useful for large-scale data analysis and historical blockchain research. ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__00000000_to_00999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__01000000_to_01999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__02000000_to_02999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__03000000_to_03999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__04000000_to_04999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__05000000_to_05999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__06000000_to_06999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__07000000_to_07999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__08000000_to_08999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__09000000_to_09999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__10000000_to_10999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__11000000_to_11999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__12000000_to_12999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__13000000_to_13999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__14000000_to_14999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__15000000_to_15999999.parquet ``` ```URL https://datasets.paradigm.xyz/datasets/ethereum_contracts/ethereum_contracts__v1_0_0__16000000_to_16799999.parquet ``` -------------------------------- ### Ethereum Native Transfers Data Files Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_native_transfers/README.md This section lists the available Parquet files containing Ethereum native transfer data. Each file represents a specific range of block numbers and is provided for download. The data is partitioned to manage large datasets efficiently. ```parquet ethereum_native_transfers__v1_0_0__09200000_to_09399999.parquet ethereum_native_transfers__v1_0_0__09400000_to_09599999.parquet hereum_native_transfers__v1_0_0__09600000_to_09799999.parquet ethereum_native_transfers__v1_0_0__09800000_to_09999999.parquet ethereum_native_transfers__v1_0_0__10000000_to_10199999.parquet ethereum_native_transfers__v1_0_0__10200000_to_10399999.parquet ethereum_native_transfers__v1_0_0__10400000_to_10599999.parquet ethereum_native_transfers__v1_0_0__10600000_to_10799999.parquet ethereum_native_transfers__v1_0_0__10800000_to_10999999.parquet ethereum_native_transfers__v1_0_0__11000000_to_11199999.parquet ethereum_native_transfers__v1_0_0__11200000_to_11399999.parquet ethereum_native_transfers__v1_0_0__11400000_to_11599999.parquet ethereum_native_transfers__v1_0_0__11600000_to_11799999.parquet ethereum_native_transfers__v1_0_0__11800000_to_11999999.parquet ethereum_native_transfers__v1_0_0__12000000_to_12199999.parquet ethereum_native_transfers__v1_0_0__12200000_to_12399999.parquet ethereum_native_transfers__v1_0_0__12400000_to_12599999.parquet ethereum_native_transfers__v1_0_0__12600000_to_12799999.parquet ethereum_native_transfers__v1_0_0__12800000_to_12999999.parquet ethereum_native_transfers__v1_0_0__13000000_to_13199999.parquet ethereum_native_transfers__v1_0_0__13200000_to_13399999.parquet ethereum_native_transfers__v1_0_0__13400000_to_13599999.parquet ethereum_native_transfers__v1_0_0__13600000_to_13799999.parquet ``` -------------------------------- ### Identify Top 10 Deployers Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Uses the `get_top_n` function to find the 10 Externally Owned Accounts (EOAs) that have deployed the most contracts. ```python top_10_deployers = get_top_n('deployer', 10) top_10_deployers ``` -------------------------------- ### Ethereum Native Transfers v1.0.0 Parquet Files Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_native_transfers/README.md This section details the available Parquet files for Ethereum native transfers, version 1.0.0. Each file represents a contiguous range of Ethereum block numbers and is provided for download. The data is partitioned into segments of approximately 200,000 blocks each. ```parquet ethereum_native_transfers__v1_0_0__04600000_to_04799999.parquet ethereum_native_transfers__v1_0_0__04800000_to_04999999.parquet ethereum_native_transfers__v1_0_0__05000000_to_05199999.parquet ethereum_native_transfers__v1_0_0__05200000_to_05399999.parquet ethereum_native_transfers__v1_0_0__05400000_to_05599999.parquet ethereum_native_transfers__v1_0_0__05600000_to_05799999.parquet ethereum_native_transfers__v1_0_0__05800000_to_05999999.parquet ethereum_native_transfers__v1_0_0__06000000_to_06199999.parquet ethereum_native_transfers__v1_0_0__06200000_to_06399999.parquet ethereum_native_transfers__v1_0_0__06400000_to_06599999.parquet ethereum_native_transfers__v1_0_0__06600000_to_06799999.parquet ethereum_native_transfers__v1_0_0__06800000_to_06999999.parquet ethereum_native_transfers__v1_0_0__07000000_to_07199999.parquet ethereum_native_transfers__v1_0_0__07200000_to_07399999.parquet ethereum_native_transfers__v1_0_0__07400000_to_07599999.parquet ethereum_native_transfers__v1_0_0__07600000_to_07799999.parquet ethereum_native_transfers__v1_0_0__07800000_to_07999999.parquetethereum_native_transfers__v1_0_0__08000000_to_08199999.parquetethereum_native_transfers__v1_0_0__08200000_to_08399999.parquetethereum_native_transfers__v1_0_0__08400000_to_08599999.parquetethereum_native_transfers__v1_0_0__08600000_to_08799999.parquetethereum_native_transfers__v1_0_0__08800000_to_08999999.parquetethereum_native_transfers__v1_0_0__09000000_to_09199999.parquet ``` -------------------------------- ### Find Uniswap V2 Pools by Code Hash Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Identifies deployed Uniswap V2 pools by fetching the bytecode of a known pool, calculating its code hash, and then filtering the dataset for contracts with the same code hash. It returns results with binary columns converted to hex. ```python example_pool = '0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc' ``` ```python example_bytecode = await ctc.rpc.async_eth_get_code(example_pool) example_code_hash = ctc.keccak(example_bytecode, output_format='binary') result = ( pl.scan_parquet(data_path) .filter(pl.col('code_hash') == example_code_hash) .collect(streaming=True) ) pl_utils.binary_columns_to_prefix_hex(result) ``` -------------------------------- ### Count Unique Factories Used Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Calculates the number of unique factories used for contract creation by querying the 'factory' column. ```python get_unique_column_count('factory') ``` -------------------------------- ### Identify Top 10 Factories Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Identifies the 10 factories responsible for the highest number of contract deployments using the `get_top_n` function. ```python top_10_factories = get_top_n('factory', 10) top_10_factories ``` -------------------------------- ### Count Unique Contract Bytecodes Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Determines the number of unique contract bytecodes deployed by analyzing the 'code_hash' column. ```python get_unique_column_count('code_hash') ``` -------------------------------- ### Ethereum Native Transfers Data Files Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_native_transfers/README.md This section lists the available Parquet files for Ethereum native transfers. Each file corresponds to a specific range of Ethereum block numbers and is provided in Parquet format. These files are essential for accessing and analyzing historical Ethereum transaction data. ```parquet [ethereum_native_transfers__v1_0_0__13800000_to_13999999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__13800000_to_13999999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__14000000_to_14199999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__14000000_to_14199999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__14200000_to_14399999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__14200000_to_14399999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__14400000_to_14599999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__14400000_to_14599999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__14600000_to_14799999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__14600000_to_14799999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__14800000_to_14999999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__14800000_to_14999999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__15000000_to_15199999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__15000000_to_15199999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__15200000_to_15399999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__15200000_to_15399999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__15400000_to_15599999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__15400000_to_15599999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__15600000_to_15799999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__15600000_to_15799999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__15800000_to_15999999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__15800000_to_15999999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__16000000_to_16199999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__16000000_to_16199999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__16200000_to_16399999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__16200000_to_16399999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__16400000_to_16599999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__16400000_to_16599999.parquet) ``` ```parquet [ethereum_native_transfers__v1_0_0__16600000_to_16799999.parquet](https://datasets.paradigm.xyz/datasets/ethereum_native_transfers/ethereum_native_transfers__v1_0_0__16600000_to_16799999.parquet) ``` -------------------------------- ### Identify Most Frequently Deployed Contract Addresses Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Identifies the top 10 contract addresses that have been deployed the most number of times, using the `get_top_n` function. ```python top_10_contract_addresses = get_top_n('contract_address', 10) top_10_contract_addresses ``` -------------------------------- ### Count EOAs Deploying Contracts Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Counts the number of unique Externally Owned Accounts (EOAs) that have deployed contracts, using the 'deployer' column. ```python get_unique_column_count('deployer') ``` -------------------------------- ### Count Contract Addresses Deployed More Than Once Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Identifies and counts the number of contract addresses that have been deployed multiple times. It groups by 'contract_address', counts occurrences, and filters for counts greater than 1. ```python n_deployed_more_than_once = ( pl.scan_parquet(data_path) .groupby(pl.col("contract_address")) .agg(pl.count()) .filter(pl.col('count') > 1) .select(pl.count()) .collect(streaming=True) ).rows()[0][0] n_deployed_more_than_once ``` -------------------------------- ### Ethereum Slots Dataset Schema Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/datasets/ethereum_slots/README.md Defines the schema for the 'slots' table in the Ethereum Slots Dataset. Each row represents a slot of a contract, detailing its address, last known value, and update history. ```parquet contract_address | BINARY | contract of slot slot | BINARY | address of slot value | BINARY | last data stored in slot first_updated_block | INTEGER | first block where slot was used last_updated_block | INTEGER | last block where slot was updated n_tx_updates | INTEGER | number of transactions that updated slot ``` -------------------------------- ### Count Unique Contract Addresses Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Determines the number of unique contract addresses deployed by using the `get_unique_column_count` function on the 'contract_address' column. ```python n_unique_contract_addresses = get_unique_column_count('contract_address') n_unique_contract_addresses ``` -------------------------------- ### Top 10 Transactions by Deployed Contracts Source: https://github.com/paradigmxyz/paradigm-data-portal/blob/main/notebooks/explore_ethereum_contracts.ipynb Retrieves the top 10 transactions that deployed the most contracts. This function likely queries a data source for transaction information and ranks them. ```python top_10_transactions = get_top_n('transaction_hash', 10) top_10_transactions ```