@dataclass decorator.
Database Models
These models represent entities stored in the SQLite database.Contract
Represents a deployed smart contract on the Base blockchain.Database primary key.
None for new contracts not yet saved.The contract’s Ethereum address (checksummed format).
Address of the account that deployed the contract.
Timestamp when the contract was deployed.
Transaction hash of the contract deployment transaction.
GitHub repository URL for the contract’s source code, if available.
Timestamp of the most recent audit performed on this contract.
Name of the contract (e.g., “MyToken”). Defaults to
None.Whether the contract source code is verified on Basescan. Defaults to
False.Audit
Represents an audit result for a specific contract.Database primary key.
None for new audits not yet saved.Foreign key reference to the Contract being audited.
Timestamp when the audit was performed.
Number of critical severity findings.
Number of high severity findings.
Number of medium severity findings.
Number of low severity findings.
Human-readable summary of the audit results.
Complete audit report in JSON format. Defaults to
None.Tweet
Represents a tweet posted by the bot.Database primary key.
None for new tweets not yet saved.Foreign key reference to the associated Audit, if applicable.
Twitter’s unique identifier for the posted tweet.
Timestamp when the tweet was posted.
Type of tweet:
'audit', 'update', or 'summary'.The text content of the tweet.
Scanner Models
These models are used by the blockchain scanner.ContractDeployment
Represents a detected contract deployment event from the blockchain.Address of the newly deployed contract.
Address of the account that deployed the contract.
Transaction hash of the deployment transaction.
Block number where the contract was deployed.
Block timestamp of the deployment.
Size of the contract bytecode in bytes. Used to filter out trivial contracts.
Auditor Models
These models represent audit findings and reports generated by the AI auditor.Finding
Represents a single security finding discovered during an audit.Severity level:
"Critical", "High", "Medium", or "Low".Brief title describing the security issue.
Detailed explanation of the vulnerability.
Function name, line reference, or file where the issue was found. Defaults to
None.Suggested fix or mitigation for the vulnerability. Defaults to
None.AuditResult
Result of auditing a single Solidity file.Path to the audited Solidity file.
List of security findings discovered in this file. Defaults to empty list.
Error message if the audit failed. Defaults to
None.FullAuditReport
Complete audit report for an entire repository or contract.URL of the audited repository, or
"direct_source" for source code audits.Timestamp when the audit was performed.
Number of Solidity files that were audited.
Total count of all findings across all severities.
Number of critical severity findings.
Number of high severity findings.
Number of medium severity findings.
Number of low severity findings.
List of all findings from the audit. Defaults to empty list.
Human-readable summary of the audit results. Defaults to empty string.
Error message if the audit failed. Defaults to
None.