CoolFace
Datasetpublic

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.

sourceHugging Faceupdated 11mo agoView on Hugging Face
1likes32downloads
Dataset Card

πŸ“„ 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 NameTypeConstraintsDescription -
addressTEXTPRIMARY KEYThe unique address of the smart contract on the blockchain.
creatorTEXTNOT NULLThe address of the account that deployed the contract.
creation_txTEXTNOT NULLThe transaction hash that created the contract.
creation_timeTIMESTAMPNOT NULLThe timestamp when the contract was deployed.
creation_blockINTEGERNOT NULLThe block number in which the contract was created.
nameTEXTNULLABLEThe human-readable name of the contract, if available.
source_codeTEXTNULLABLEThe full Solidity source code of the contract.
abiTEXTNULLABLEThe Application Binary Interface (ABI) of the contract.
compiler_versionTEXTNULLABLEThe Solidity compiler version used to compile the contract.
evm_versionTEXTNULLABLEThe targeted Ethereum Virtual Machine (EVM) version.
optimization_usedBOOLEANNULLABLEIndicates whether compiler optimizations were enabled.
runsINTEGERNULLABLENumber of optimization runs used during compilation.
constructor_argsTEXTNULLABLEEncoded constructor arguments passed during deployment.
libraryTEXTNULLABLELinked library information, if any.
licenseTEXTNULLABLELicense type of the source code (e.g., MIT, GPL-3.0).
is_proxyBOOLEANNULLABLEFlag indicating whether the contract is a proxy.
implementationTEXTNULLABLEAddress of the implementation contract, if this is a proxy.
swarm_sourceTEXTNULLABLESwarm hash / metadata URL pointing to the source code bundle.

πŸ“ Notes:

  • β€”The primary key address ensures uniqueness for each deployed contract in the corresponding chain.
  • β€”creation_tx, creation_time, and creation_block stores contract’s deployment information, i.e. transaction id, timestamp, and block number.
  • β€”source_code, abi, and compiler_version are typically available when the contract has been verified.
  • β€”Proxy patterns are identified through is_proxy and implementation.

🧱 Table Definition

sql
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

sql
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 ---