Blockmates/smart-contracts-verified
π Database Structure: contracts Table This document describes the structure and purpose of the contracts table within the databases.The table stores metadata and deployment details of smart contracts. π Table Description Each record stored in the table has the following structure and fields, with described constraints. Column Name Type Constraints Description - address TEXT PRIMARY KEY Theβ¦ See the full description on the dataset page: https://huggingface.co/datasets/Blockmates/smart-contracts-verified.
π Database Structure: contracts Table
This document describes the structure and purpose of the contracts table within the databases. The table stores metadata and deployment details of smart contracts.
π Table Description
Each record stored in the table has the following structure and fields, with described constraints.
π Notes:
- The primary key
addressensures uniqueness for each deployed contract in the corresponding chain. creation_tx,creation_time, andcreation_blockstores contractβs deployment information, i.e. transaction id, timestamp, and block number.source_code,abi, andcompiler_versionare typically available when the contract has been verified.- Proxy patterns are identified through
is_proxyandimplementation.
π§± Table Definition
CREATE TABLE IF NOT EXISTS contracts (
address TEXT PRIMARY KEY,
creator TEXT NOT NULL,
creation_tx TEXT NOT NULL,
creation_time TIMESTAMP NOT NULL,
creation_block INTEGER NOT NULL,
name TEXT,
source_code TEXT,
abi TEXT,
compiler_version TEXT,
evm_version TEXT,
optimization_used BOOLEAN,
runs INTEGER,
constructor_args TEXT,
library TEXT,
license TEXT,
is_proxy BOOLEAN,
implementation TEXT,
swarm_source TEXT
);π§ Usage Example
SELECT address, name, compiler_version, source_code
FROM contracts
WHERE source_code IS NOT NULL AND source_code != ""
ORDER BY creation_block DESC
LIMIT 10;This query returns the 10 most recently deployed contracts with available source code along with their addresses, names and compiler versions.
license: mit ---
