25 lines
869 B
Python
25 lines
869 B
Python
from pydantic_settings import BaseSettings
|
|
|
|
class IndexerSettings(BaseSettings):
|
|
CHAIN_ID: int = 46630 # Robinhood Testnet
|
|
RPC_URL: str = "https://rpc.testnet.chain.robinhood.com"
|
|
START_BLOCK: int = 0
|
|
BATCH_SIZE: int = 100
|
|
POLL_INTERVAL_SECONDS: float = 2.0
|
|
CONFIRMATIONS: int = 1 # Testnet 确认数
|
|
|
|
# 数据库与 Redis
|
|
DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/wtfx"
|
|
REDIS_URL: str = "redis://localhost:6379/0"
|
|
|
|
# 已部署合约地址 (Robinhood Testnet)
|
|
CONTROLLER_ADDRESS: str = "0xc0E24E152771C588B21AEB654b30B1cBAf381c1a"
|
|
COLLATERAL_ADDRESS: str = "0xe776e957953EA69b7Eaa9d7d4098aBC076bDD5E7"
|
|
CURVE_ADDRESS: str = "0xF0E189974c413506098AFB6Bc6Bf4C6715fBf7B1"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
extra = "ignore"
|
|
|
|
indexer_settings = IndexerSettings()
|