-
Notifications
You must be signed in to change notification settings - Fork 15
/
models.py
63 lines (48 loc) · 1.53 KB
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from enum import StrEnum
from pathlib import Path
from pydantic import BaseModel
from pydantic_settings import BaseSettings, SettingsConfigDict
BASE_DIR = Path(__file__).resolve().parent.parent
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=Path(BASE_DIR, "settings", "env"))
DEBUG: bool = True
DEV: bool = False
WEB3_PROVIDER_URL: str
DEPLOYER_EOA_PRIVATE_KEY: str
class RollupType(StrEnum):
op_stack = "op_stack"
arb_orbit = "arb_orbit"
polygon_cdk = "polygon_cdk"
zksync = "zksync"
taiko = "taiko"
not_rollup = "_"
class CurveDAOSettings(BaseModel):
crv: str | None = None
crvusd: str | None = None
ownership_admin: str | None = None
parameter_admin: str | None = None
emergency_admin: str | None = None
vault: str | None = None
class ReferenceTokenAddresses(BaseModel):
usdc: str | None = None
usdt: str | None = None
weth: str | None = None
class ChainConfig(BaseSettings):
model_config = SettingsConfigDict(use_enum_values=True)
file_name: str
file_path: str
network_name: str
is_testnet: bool
chain_id: int
layer: int
rollup_type: RollupType
wrapped_native_token: str
dao: CurveDAOSettings | None = None
explorer_base_url: str
logo_url: str
native_currency_symbol: str
native_currency_coingecko_id: str
reference_token_addresses: ReferenceTokenAddresses
public_rpc_url: str
multicall2: str | None = None
multicall3: str = "0xcA11bde05977b3631167028862bE2a173976CA11"