const ADDRESSES = require('../helper/coreAssets.json');
const { sumTokensExport } = require("../helper/unwrapLPs");

// V1
const ETH_PUT_CONTROLLER_ADDRESS_V1 = "0x55E008E3b0Aa6808Ca8B8Ba1DC319EC132554aCd";
const ETH_CALL_CONTROLLER_ADDRESS_V1 =
  "0x2eEFcBCa065bE1763be58276AFA41627A82dfa2D";
const BTC_PUT_CONTROLLER_ADDRESS_V1 = "0x3273C69432b2B0D808499F4Cc56113Be6c7A673F";
const BTC_CALL_CONTROLLER_ADDRESS_V1 =
  "0x18AadF2a220D3FEb958Ed161263185f0805D11a1";
const PEPE_PUT_CONTROLLER_ADDRESS_V1 =
  "0x9c50C12d3A569cD4285c62cd7A889cE7BCfC12e9";
const PEPE_CALL_CONTROLLER_ADDRESS_V1 =
  "0x176a49747a97dD0735a2186aEbe1d1400E3eBf8b";
const WIF_PUT_CONTROLLER_ADDRESS_V1 = "0xA1269bF2F05aA11363352eA0cf4E5a071Ef9cF29";
const WIF_CALL_CONTROLLER_ADDRESS_V1 =
  "0x47D5710A4ABd8B47e9ec48f6cB04cDBcfBFCA382";
const DOGE_PUT_CONTROLLER_ADDRESS_V1 =
  "0x9c50C12d3A569cD4285c62cd7A889cE7BCfC12e9";
const DOGE_CALL_CONTROLLER_ADDRESS_V1 =
  "0x176a49747a97dD0735a2186aEbe1d1400E3eBf8b";
const FLOKI_PUT_CONTROLLER_ADDRESS_V1 =
  "0xA1269bF2F05aA11363352eA0cf4E5a071Ef9cF29";
const FLOKI_CALL_CONTROLLER_ADDRESS_V1 =
  "0x47D5710A4ABd8B47e9ec48f6cB04cDBcfBFCA382";

// V2
const ETH_PUT_CONTROLLER_ADDRESS_V2 = "0x1A17F62982c9ee969ba530e324c78238c6827a76";
const ETH_CALL_CONTROLLER_ADDRESS_V2 =
  "0xF52884E97D2A6a38306c2D3F31902198Bdc26C0d";
const BTC_PUT_CONTROLLER_ADDRESS_V2 = "0x4606F6494D8E6288bCd4ffCf69255D5847259908";
const BTC_CALL_CONTROLLER_ADDRESS_V2 =
  "0x699ac37B7F25c94E8FA8F5E929274860638fFf43";
const SOL_PUT_CONTROLLER_ADDRESS_V2 = "0xCF78C5BEdd31e6f8F27D20AA9DF9be638205D326";
const SOL_CALL_CONTROLLER_ADDRESS_V2 =
  "0xe95c6D6A0046993CceEB4DD13F03c6e7a3000a10";
const DOGE_PUT_CONTROLLER_ADDRESS_V2 =
  "0xF8D2e7072bBc42EA34A02b2797C1b465ED3b0728";
const DOGE_CALL_CONTROLLER_ADDRESS_V2 =
  "0x8EE3fD77a3DFC87cE0450df3027dE3965606891d";

// V3
const BTC_PUT_CONTROLLER_ADDRESS_V3 = "0x09B0aCB5522131d9DCF3DD39A5da7F0D284360E5";
const BTC_CALL_CONTROLLER_ADDRESS_V3 =
  "0xAe9600A7143c3F27E1A456B58C4168deF036814D";
const DOGE_PUT_CONTROLLER_ADDRESS_V3 =
  "0x39b8F2740028a1B3cD0ea6094FEC30a2DD8fd073";
const DOGE_CALL_CONTROLLER_ADDRESS_V3 =
  "0x0cf5E57E7e0EdA6e227c6eedd90260F7CB47A866";
const SOL_PUT_CONTROLLER_ADDRESS_V3 = "0x0E3B154aCC49aEE8a1E0c684c6C4130F6D9f85A8";
const SOL_CALL_CONTROLLER_ADDRESS_V3 =
  "0x2821198A42A88148cd0250433548b38e40981D82";
const FART_PUT_CONTROLLER_ADDRESS_V3 = "0x65519E9291102C080F12FF2f6ecb71292120a8c2";
const FART_CALL_CONTROLLER_ADDRESS_V3 =
  "0x4f4314e6CFEE6dcb6292937C9f2ef0B10D7b127A";

const USDC_ARB_ADDRESS = ADDRESSES.arbitrum.USDC_CIRCLE;
const USDC_BSC_ADDRESS = ADDRESSES.bsc.USDC;

module.exports = {
  methodology: "TVL counts the USDC held in the controller contracts.",
  start: '2024-05-14',
  arbitrum: {
    tvl: sumTokensExport({
      owners: [
        ETH_PUT_CONTROLLER_ADDRESS_V1,
        ETH_CALL_CONTROLLER_ADDRESS_V1,
        BTC_PUT_CONTROLLER_ADDRESS_V1,
        BTC_CALL_CONTROLLER_ADDRESS_V1,
        PEPE_PUT_CONTROLLER_ADDRESS_V1,
        PEPE_CALL_CONTROLLER_ADDRESS_V1,
        WIF_PUT_CONTROLLER_ADDRESS_V1,
        WIF_CALL_CONTROLLER_ADDRESS_V1,
        ETH_PUT_CONTROLLER_ADDRESS_V2,
        ETH_CALL_CONTROLLER_ADDRESS_V2,
        BTC_PUT_CONTROLLER_ADDRESS_V2,
        BTC_CALL_CONTROLLER_ADDRESS_V2,
        SOL_PUT_CONTROLLER_ADDRESS_V2,
        SOL_CALL_CONTROLLER_ADDRESS_V2,
        DOGE_PUT_CONTROLLER_ADDRESS_V2,
        DOGE_CALL_CONTROLLER_ADDRESS_V2,
        BTC_PUT_CONTROLLER_ADDRESS_V3,
        BTC_CALL_CONTROLLER_ADDRESS_V3,
        DOGE_PUT_CONTROLLER_ADDRESS_V3,
        DOGE_CALL_CONTROLLER_ADDRESS_V3,
        SOL_PUT_CONTROLLER_ADDRESS_V3,
        SOL_CALL_CONTROLLER_ADDRESS_V3,
        FART_PUT_CONTROLLER_ADDRESS_V3,
        FART_CALL_CONTROLLER_ADDRESS_V3,
      ],
      tokens: [USDC_ARB_ADDRESS],
    }),
  },
  bsc: {
    tvl: sumTokensExport({
      owners: [
        ETH_PUT_CONTROLLER_ADDRESS_V1,
        ETH_CALL_CONTROLLER_ADDRESS_V1,
        BTC_PUT_CONTROLLER_ADDRESS_V1,
        BTC_CALL_CONTROLLER_ADDRESS_V1,
        DOGE_CALL_CONTROLLER_ADDRESS_V1,
        DOGE_PUT_CONTROLLER_ADDRESS_V1,
        FLOKI_CALL_CONTROLLER_ADDRESS_V1,
        FLOKI_PUT_CONTROLLER_ADDRESS_V1,
      ],
      tokens: [USDC_BSC_ADDRESS],
    }),
  },
};



