"""
Constants for the f(x) Protocol SDK.
Includes contract addresses, chain IDs, and ABI paths.
"""

# Network configuration
ETHEREUM_MAINNET_CHAIN_ID = 1

# Contract Addresses
# V2 Core Contracts
FXUSD = "0x085780639CC2cACd35E474e71f4d000e2405d8f6"
FXUSD_BASE_POOL = "0x65C9A641afCEB9C0E6034e558A319488FA0FA3be"
PEG_KEEPER = "0x50562fe7e870420F5AAe480B7F94EB4ace2fcd70"
POOL_MANAGER = "0x250893CA4Ba5d05626C785e8da758026928FCD24"
RESERVE_POOL = "0x297dD69725911FE5F08B8F8C5EDdDb724D7D11df"
REVENUE_POOL = "0x361f88157073B8522deF857761484CA7b1D5c8be"
LIQUIDITY_GAUGE = "0xF62F458D2F6dd2AD074E715655064d7632e136D6"
GAUGE_REWARDER = "0x5Ac1A882E6CeDc58511b7e42b02BAB42E2c02956"
FXUSD_BASE_POOL_GAUGE = "0xEd92dDe3214c24Ae04F5f96927E3bE8f8DbC3289"

# V2 Router & Diamond
DIAMOND_ROUTER = "0x33636D49FbefBE798e15e7F356E8DBef543CC708"

# V2 Supporting & Markets
STETH_PRICE_ORACLE = "0x3716352d57C2e48EEdB56Ee0712Ef29E0c2f3069"
MULTI_PATH_CONVERTER = "0x12AF4529129303D7FbD2563E242C4a2890525912"
WSTETH_POOL = "0x6Ecfa38FeE8a5277B91eFdA204c235814F0122E8"
AAVE_FUNDING_POOL = "0x69Ea7311A33f4bFE39949b387d2347fFaC8C70b8"
STETH_GATEWAY = "0x9bF5fFABbF97De0a47843A7Ba0A9DDB40f2e2ed5"

# Savings & Stability Pool
SAVING_FXUSD = "0x7743e50F534a7f9F1791DdE7dCD89F7783Eefc39"
FXSP = "0x65C9A641afCEB9C0E6034e558A319488FA0FA3be"  # Same as Base Pool Proxy

# Vesting Contracts
VESTING_FXN = "0x2290eeFEa24A6E43b26C27187742bD1FEDC10BDB"
VESTING_FETH = "0x1236193C71128f9e7b6BB56F506676adD8589009"
VESTING_FXUSD = "0xc054F64143CB04b765773D5B66992f611C497352"

# V1 Migration
SFRXETH_MARKET = "0x714B853b3bA73E439c652CfE79660F329E6ebB42"
WSTETH_MARKET = "0xAD9A0E7C08bc9F747dF97a3E7E7f620632CB6155"

# V1 Legacy - Tokens
FETH = "0x53805A76E1f5ebbFE7115F16f9c87C2f7e633726"
RUSD = "0x65D72AA8DA931F047169112fcf34f52DbaAE7D18"
ARUSD = "0xC752C6DaA143e1a0ba3E7Df06f3117182432b991"
BTCUSD = "0x9D11ab23d33aD026C466CE3c124928fDb69Ba20E"
CVXUSD = "0x9f0D5E33617A1Db6f1CBd5580834422684f09269"

# V1 Legacy - xTokens
XETH = "0xe063F04f280c60aECa68b38341C2eEcBeC703ae2"
XCVX = "0xB90D347e10a085B591955Cbd0603aC7866fCADC8"
XWBTC = "0x9f23562ec47249761222EF7Ac02b327a8C45Ba7D"
XEETH = "0xACB3604AaDF26e6C0bb8c720420380629A328d2C"  # xeETH
XEZETH = "0x2e5A5AF7eE900D34BCFB70C47023bf1d6bE35CF5"
XSTETH = "0x5a097b014C547718e79030a077A91Ae37679EfF5"
XFRXETH = "0x2bb0C32101456F5960d4e994Bac183Fe0dc6C82c"

# Collateral Assets (Used in V2 Pools)
STETH = "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84"
WSTETH = "0x7f39C581F595B53c5cb19bd0b3f8dA6c935E2Ca0"
FRXETH = "0x5E8422345238F34275888049021821E8E08CAa1f"
SFRXETH = "0xac3e018457b222d93114458476f3e3416abbe38f"

# Liquidity Gauges (Convex Dual Farms)
GAUGES = {
    "ETH_FXN": "0xA5250C540914E012E22e623275E290c4dC993D11",
    "FXN_CVXFXN": "0xfEFafB9446d84A9e58a3A2f2DDDd7219E8c94FbB",
    "FXN_SDFXN": "0x5b1D12365BEc01b8b672eE45912d1bbc86305dba",
    "CRVUSD_FXUSD": "0xF4Bd6D66bAFEA1E0500536d52236f64c3e8a2a84",
    "PYUSD_FXUSD": "0xeD113B925AC3f972161Be012cdFEE33470040E6a",
    "DOLA_FXUSD": "0x61F32964C39Cca4353144A6DB2F8Efdb3216b35B",
    "GRAI_FXUSD": "0xfa4761512aaf899b010438a10C60D01EBdc0eFcA",
    "FRAX_FXUSD": "0x31b630B21065664dDd2dBa0eD3a60D8ff59501F0",
    "GHO_FXUSD": "0xf0A3ECed42Dbd8353569639c0eaa833857aA0A75",
    "MKUSD_FXUSD": "0xDbA9a415bae1983a945ba078150CAe8b690c9229",
    "ULTRA_FXUSD": "0x0d3e9A29E856CF00d670368a7ab0512cb0c29FAC",
    "FXUSD_RUSD": "0x697DDb8e742047561C8e4bB69d2DDB1b8Bb42b60",
    "ALUSD_FXUSD": "0x9c7003bC16F2A1AA47451C858FEe6480B755363e",
    "EUSD_FXUSD": "0x5801Bb8f568979C722176Df36b1a74654A9C52b5",
    "RGUSD_FXUSD": "0x4CA79F4FE25BCD329445CDBE7E065427ACa98380",
    "MIM_FXUSD": "0xDF7fbDBAE50C7931a11765FAEd9fe1A002605B55",
    "ZUNUSD_FXUSD": "0x9516c367952430371A733E5eBb587E01eE082F99",
    "USDC_FXUSD": "0xf1E141C804BA39b4a031fDF46e8c08dBa7a0df60",
    "USD0_FXUSD": "0x0B700C60de435D522081cC5eB12B63875FE7e65a",
    "FXUSD_RUSD_BTCUSD": "0x7a505e920d5d7E4b402D9Ee345fB7E8Cdc265262",
    "FXUSD_USDN": "0xa295829c082C4d21fE37dbC8C96bFa0ef6dbaa92",
    "REUSD_FXUSD": "0x8d9186Fa822624bad50a5cB2545048CB26b4E65E",
    "FXSAVE_SCRVUSD": "0x6FcFe767c479ef1f2d8c7A4b27e2aBaDD355910F",
    "MSUSD_FXUSD": "0x2122a2bee97545595550b85379AC7676Fd21a5B4",
    "FXUSD_USDC_USDAF_BOLD": "0xE534E5e86382d64133ecd6b7f717C69BEC8B40CA",
    "DOLA_FXSAVE": "0x7d4674b837429c44914961cb9F21dD6dEFd0eee0",
    "FXUSD_GAUGE": "0xABc8cBbA768DA396626FAD97D0e61104aC1e7068",
    "YNUSDX_FXUSD": "0xeD9ED685F553B0827a58a918E64eC02E6FD55799",
    "YNRWAX_FXUSD": "0x0BbfD53Ec934e5d4d3d55dD860642aDD395De979",
    "FXUSD_FRXUSD": "0xA3c0f7360b922136cc8B89063BE1e8daF70427bD",
}

# Governance & Utility
FXN = "0x365AccFCa291e7D3914637ABf1F7635dB165Bb09"
VEFXN = "0xEC6B8A3F3605B083F7044C0F31f2cac0caf1d469"
GAUGE_CONTROLLER = "0xe60eB8098B34eD775ac44B1ddE864e098C6d7f37"

# V1 Infrastructure
FRACTIONAL_TOKEN_PROXY = "0x53805A76E1f5ebbFE7115F16f9c87C2f7e633726"
LEVERAGED_TOKEN_PROXY = "0xe063F04f280c60aECa68b38341C2eEcBeC703ae2"
STETH_TREASURY_PROXY = "0x0e5CAA5c889Bdf053c9A76395f62267E653AFbb0"
MARKET_PROXY = "0xe7b9c7c9cA85340b8c06fb805f7775e3015108dB"
REBALANCE_POOL_REGISTRY = "0x4eEfea49e4D876599765d5375cF7314cD14C9d38"
REBALANCE_POOL_IMPLEMENTATION = "0xD670175FD40D517da9f7529BAA11276b7011947C"

# Proxy Admins
FX_PROXY_ADMIN = "0x9B54B7703551D9d0ced177A78367560a8B2eDDA4"
CUSTOM_PROXY_ADMIN = "0xd41d29fc53fE5Ce9f0fB2328E54d35A2a03a324B"

# Address Map for Convenience
CONTRACTS = {
    "fxUSD": FXUSD,
    "fxUSD_BasePool": FXUSD_BASE_POOL,
    "PegKeeper": PEG_KEEPER,
    "PoolManager": POOL_MANAGER,
    "ReservePool": RESERVE_POOL,
    "RevenuePool": REVENUE_POOL,
    "DiamondRouter": DIAMOND_ROUTER,
    "stETH_Oracle": STETH_PRICE_ORACLE,
    "MultiPathConverter": MULTI_PATH_CONVERTER,
    "wstETH_Pool": WSTETH_POOL,
    "sfrxETH_Market": SFRXETH_MARKET,
    "wstETH_Market": WSTETH_MARKET,
    "fETH": FETH,
    "rUSD": RUSD,
    "arUSD": ARUSD,
    "btcUSD": BTCUSD,
    "cvxUSD": CVXUSD,
    "xETH": XETH,
    "xCVX": XCVX,
    "xWBTC": XWBTC,
    "xeETH": XEETH,
    "xezETH": XEZETH,
    "xstETH": XSTETH,
    "xfrxETH": XFRXETH,
    "FXN": FXN,
    "veFXN": VEFXN,
    "GaugeController": GAUGE_CONTROLLER,
    "RebalancePoolRegistry": REBALANCE_POOL_REGISTRY,
    "stETH_Treasury": STETH_TREASURY_PROXY,
    "stETH_Gateway": STETH_GATEWAY,
    "Vesting_FXN": VESTING_FXN,
    "Vesting_fETH": VESTING_FETH,
    "Vesting_fxUSD": VESTING_FXUSD,
    "Saving_fxUSD": SAVING_FXUSD,
    "fxSP": FXSP,
    "RebalancePoolImplementation": REBALANCE_POOL_IMPLEMENTATION,
    "stETH": STETH,
    "wstETH": WSTETH,
    "frxETH": FRXETH,
    "sfrxETH": SFRXETH,
}

