tron.core Table: dim_contracts Type: Base Table
What
This table provides metadata for smart contracts deployed on the Tron blockchain. It includes contract names, symbols, decimals, and deployment details. Token metadata (name, symbol, decimals) is read directly from the contract when available.Key Use Cases
- Identifying contracts by name, symbol, or address
- Understanding TRC-20 token properties (decimals, symbols)
- Tracking contract deployment patterns and trends
- Finding contracts deployed by specific deployers or factories
- Enriching other tables with contract metadata
Important Relationships
- Join with fact_transactions: Use
address = to_addressfor contract interactions - Join with fact_event_logs: Use
address = contract_addressfor contract events - Join with ez_token_transfers: Use
address = contract_addressfor token metadata
Commonly-used Fields
address: The deployed contract’s blockchain address (0x hex, lowercase)name: Human-readable contract name from the name() functionsymbol: Token symbol from the symbol() function (e.g., USDT)decimals: Number of decimal places for token amountscreator_address: Address that deployed this contractcreated_block_timestamp: When the contract was created
Sample queries
Columns
| Column Name | Data Type | Description |
|---|---|---|
| ADDRESS | TEXT | The deployed contract’s blockchain address, in 0x-prefixed hex format (lowercase). Example: ‘0xa614f803b6fd780986a42c78ec9c7f77e6ded13c’ |
| SYMBOL | TEXT | Token symbol from the symbol() function. NULL if not a token or metadata unavailable. Example: ‘USDT’ |
| NAME | TEXT | Human-readable contract name from the name() function. NULL if not a token or metadata unavailable. Example: ‘Tether USD’ |
| DECIMALS | NUMBER | Number of decimal places for token amounts, read directly from the contract. TRX uses 6 decimals; most TRC-20 tokens use 18. NULL if not a token or metadata unavailable. Example: 6 |
| CREATED_BLOCK_NUMBER | NUMBER | Block number when the contract was created. Example: 54200000 |
| CREATED_BLOCK_TIMESTAMP | TIMESTAMP_NTZ | Timestamp when the 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), in 0x-prefixed hex format. Example: ‘0x95ba4cf87d6723ad9c0db21737d862be80e93911’ |
| DIM_CONTRACTS_ID | TEXT | Primary key — unique identifier for each row ensuring data integrity. Format: VARCHAR containing composite key generated using MD5 hash of the relevant columns. Usage: Deduplication in incremental loads Join operations for data quality checks Troubleshooting specific records |
| INSERTED_TIMESTAMP | TIMESTAMP_LTZ | 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 |
| MODIFIED_TIMESTAMP | TIMESTAMP_LTZ | UTC timestamp of the most recent update to this record. Format: TIMESTAMP_NTZ Use Cases: Tracking data corrections and reprocessing Monitoring incremental model updates Data quality audits |