Config dataclass to manage all configuration settings. Configuration is loaded from environment variables using the dotenv package.
Config Class
TheConfig dataclass contains all application settings organized by category.
Base Chain Configuration
RPC endpoint URL for connecting to the Base blockchain.Environment Variable:
BASE_RPC_URLDefault: "https://mainnet.base.org"API key for Basescan to fetch contract source code and verification status.Environment Variable:
BASESCAN_API_KEYRequired: Yes (no default)Anthropic Configuration
API key for Anthropic Claude to perform AI-powered smart contract audits.Environment Variable:
ANTHROPIC_API_KEYRequired: Yes (no default)Twitter Configuration
Twitter API key (Consumer Key) for posting tweets.Environment Variable:
TWITTER_API_KEYRequired: Yes (no default)Twitter API secret (Consumer Secret) for authentication.Environment Variable:
TWITTER_API_SECRETRequired: Yes (no default)Twitter access token for the bot’s account.Environment Variable:
TWITTER_ACCESS_TOKENRequired: Yes (no default)Twitter access token secret for authentication.Environment Variable:
TWITTER_ACCESS_SECRETRequired: Yes (no default)Twitter bearer token for read-only operations.Environment Variable:
TWITTER_BEARER_TOKENDefault: "" (empty string)Webhook Configuration
Secret token for validating GitHub webhook requests.Environment Variable:
WEBHOOK_SECRETDefault: "" (empty string)Port number for the webhook server to listen on.Environment Variable:
WEBHOOK_PORTDefault: 5000Bot Settings
How often (in minutes) to scan the blockchain for new contract deployments.Environment Variable:
SCAN_INTERVAL_MINUTESDefault: 15Validation: Must be at least 1Number of recent blocks to scan for contract deployments in each scan cycle.Environment Variable:
BLOCKS_TO_SCANDefault: 100Validation: Must be at least 1Minimum bytecode size (in bytes) for a contract to be considered for auditing. Filters out trivial contracts.Environment Variable:
MIN_CONTRACT_SIZEDefault: 100Logging level for the application.Environment Variable:
LOG_LEVELDefault: "INFO"Options: "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"Path Configuration
Path to the SQLite database file.Environment Variable:
DATABASE_PATHDefault: "./data/bot.db"Directory for temporarily cloning repositories during audits.Environment Variable:
TEMP_DIRDefault: "./temp_repos"