crosschain.evm Table: dim_contracts Type: View
What
This table provides comprehensive metadata for all smart contracts deployed on EVM blockchains. It includes contract names, symbols, decimals, and deployment details read directly from the blockchain. It contains a column for the blockchain the contract is deployed on, which is an important filter and join key. See evm.dim_chains for a list of all supported EVM chains.Key Use Cases
- Identifying contracts by name, symbol, or address
- Understanding token properties (decimals, symbols)
- Tracking contract deployment patterns and trends
- Finding contracts deployed by specific factories or deployers
- Filtering protocol-specific data across other tables
Important Relationships
- Join with evm.fact_transactions: Use
address = to_addressandblockchainfor contract interactions - Join with evm.fact_event_logs: Use
address = contract_addressandblockchainfor contract events - Join with evm.ez_token_transfers: Use
address = contract_addressandblockchainfor token movements
Commonly-used Fields
address: The deployed contract’s blockchain address (lowercase)name: Human-readable contract name from the name() functionsymbol: Token/contract symbol from the symbol() functiondecimals: Number of decimal places for token amountscreator_address: Address that deployed this contractcreated_block_timestamp: When the contract was createdblockchain: The blockchain the contract is deployed on
Sample queries
Find All Uniswap V3 Pool ContractsColumns
| Column Name | Data Type | Description |
|---|---|---|
| BLOCKCHAIN | TEXT | The blockchain the record occurred on. See evm.dim_chains for a list of all EVM chains. Format: VARCHAR Example: ‘ethereum’ Usage: Filtering by blockchain Joining across tables Analyzing chain-specific patterns |
| ADDRESS | TEXT | Unique identifier - the deployed contract’s blockchain address. Example: ‘0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48’ |
| SYMBOL | TEXT | Token/contract symbol from the symbol() function. Example: ‘USDC’ |
| NAME | TEXT | Human-readable contract name from the name() function. Example: ‘USD Coin’ |
| DECIMALS | NUMBER | Number of decimal places for token amounts, read directly from the contract code. Example: 6 |
| CREATED_BLOCK_NUMBER | NUMBER | Block number when contract was created. Example: 17500000 |
| CREATED_BLOCK_TIMESTAMP | TIMESTAMP_NTZ | Timestamp when contract was created. Example: 2023-06-15 14:30:00.000 |
| CREATED_TX_HASH | TEXT | Transaction hash of the contract deployment. Example: ‘0x4f01db1f857e711af502ad6fa8b5b3ccd9e36b5f8c8a7b2c1d3e4f5a6b7c8d9e’ |
| CREATOR_ADDRESS | TEXT | Address that deployed this contract (transaction from_address). Example: ‘0x95ba4cf87d6723ad9c0db21737d862be80e93911’ |
| DIM_CONTRACTS_ID | TEXT | Primary key - unique identifier for each row ensuring data integrity. Format: Usually VARCHAR containing composite key generated using MD5 hash of the relevant columns. Example: MD5(blocknumber, txhash, trace_index) Usage: Deduplication in incremental loads Join operations for data quality checks Troubleshooting specific records Important: Implementation varies by table - check table-specific documentation. |
| INSERTED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp when the record was first added to the Flipside database. Format: TIMESTAMP_NTZ Use Cases: Data freshness monitoring Incremental processing markers Debugging data pipeline issues SLA tracking Query Example: |
| MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp of the most recent update to this record. Format: TIMESTAMP_NTZ Triggers for Updates: Data corrections Enrichment additions Reprocessing for accuracy Schema migrations Monitoring Usage: |