@steerprotocol/sdk 1.30.8-test-algebra-plugins.2 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/base/PoolClient.js +137 -0
- package/dist/cjs/base/PoolClient.js.map +1 -1
- package/dist/cjs/base/VaultClient.js +111 -2
- package/dist/cjs/base/VaultClient.js.map +1 -1
- package/dist/cjs/const/feeManagerContracts.js +25 -0
- package/dist/cjs/const/feeManagerContracts.js.map +1 -0
- package/dist/cjs/const/network.js +7 -0
- package/dist/cjs/const/network.js.map +1 -1
- package/dist/cjs/const/protocol.js +68 -92
- package/dist/cjs/const/protocol.js.map +1 -1
- package/dist/cjs/scripts/processDeployments.js +1 -0
- package/dist/cjs/scripts/processDeployments.js.map +1 -1
- package/dist/esm/base/PoolClient.js +137 -0
- package/dist/esm/base/PoolClient.js.map +1 -1
- package/dist/esm/base/VaultClient.js +111 -2
- package/dist/esm/base/VaultClient.js.map +1 -1
- package/dist/esm/const/feeManagerContracts.js +25 -0
- package/dist/esm/const/feeManagerContracts.js.map +1 -0
- package/dist/esm/const/network.js +7 -0
- package/dist/esm/const/network.js.map +1 -1
- package/dist/esm/const/protocol.js +68 -92
- package/dist/esm/const/protocol.js.map +1 -1
- package/dist/esm/scripts/processDeployments.js +1 -0
- package/dist/esm/scripts/processDeployments.js.map +1 -1
- package/dist/types/base/PoolClient.d.ts +22 -0
- package/dist/types/base/PoolClient.d.ts.map +1 -1
- package/dist/types/base/VaultClient.d.ts +20 -0
- package/dist/types/base/VaultClient.d.ts.map +1 -1
- package/dist/types/const/feeManagerContracts.d.ts +6 -0
- package/dist/types/const/feeManagerContracts.d.ts.map +1 -0
- package/dist/types/const/network.d.ts +1 -0
- package/dist/types/const/network.d.ts.map +1 -1
- package/dist/types/const/protocol.d.ts +4 -19
- package/dist/types/const/protocol.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/__tests__/base/PoolClient.test.ts +355 -104
- package/src/__tests__/base/StakingClient.test.ts +72 -72
- package/src/__tests__/base/VaultClient.protocol-filter.test.ts +64 -137
- package/src/__tests__/base/VaultClient.test.ts +460 -60
- package/src/__tests__/base/vault/single-asset/calculateLimitPrice.test.ts +32 -14
- package/src/__tests__/base/vault/single-asset/calculateSwapAmount.test.ts +7 -4
- package/src/__tests__/base/vault/single-asset/estimateLpTokens.test.ts +105 -570
- package/src/__tests__/base/vault/single-asset/simulateSwap.test.ts +45 -66
- package/src/__tests__/base/vault/single-asset/singleAssetDepositClient.test.ts +178 -381
- package/src/__tests__/const/network.feeManager.test.ts +47 -0
- package/src/__tests__/fixtures/live/single-asset.fixture.json +116 -0
- package/src/__tests__/fixtures/live/staking-pools.fixture.json +353 -0
- package/src/__tests__/fixtures/live/vaults.fixture.json +5392 -0
- package/src/base/PoolClient.ts +200 -1
- package/src/base/VaultClient.ts +169 -2
- package/src/const/feeManagerContracts.ts +28 -0
- package/src/const/network.ts +10 -1
- package/src/const/protocol.ts +18 -39
- package/src/scripts/processDeployments.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.js","sourceRoot":"","sources":["../../../src/const/network.ts"],"names":[],"mappings":";;;AAwiBA,gGAYC;AAGD,kDAIC;AAaD,wDASC;AAaD,sCAKC;AAaD,sCAGC;AAGD,sEAIC;AA1nBD,yCAA4C;AAC5C,qDAAsqB;AACtqB,2DAA8D;AAC9D,yEAA4E;AAC5E,mDAAsD;AACtD,2DAA8D;AAC9D,yDAA4D;AAC5D,qEAAwE;AACxE,+DAAkE;AAClE,mDAAsD;AACtD,qDAAwD;AACxD,uDAA0D;AAC1D,2DAA8D;AA4EjD,QAAA,QAAQ,GAAa;IAEhC,CAAC,gBAAK,CAAC,OAAO,CAAC,EAAE;QACf,OAAO,EAAE,4CAA4C;QACrD,IAAI,EAAE,gBAAK,CAAC,OAAO;QACnB,iBAAiB,EAAE,IAAI;QACvB,kBAAkB,EAAE,QAAQ;QAC5B,OAAO,EAAE,kB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AC;AAC/C,CAAC","sourcesContent":["import { Chain, ChainId } from \"./chain.js\";\nimport { apechainAddresses, astarAddresses, astarzkevmAddresses, avalancheAddresses, baseAddresses, beraAddresses, blastAddresses, bscAddresses, celoAddresses, ethAddresses, evmosAddresses, fantomAddresses, filecoinAddresses, flareAddresses, hemiAddresses, katanaAddresses, kavaAddresses, lineaAddresses, mantaAddresses, mantleAddresses, metisAddresses, modeAddresses, moonbeamAddresses, okxtestnetAddresses, polyzkevmAddresses, rootstockAddresses, sagaAddresses, scrollAddresses, seiAddresses, soneiumAddresses, sonicAddresses, taikoAddresses, telosAddresses, thundercoreAddresses, uniAddresses, xlayerAddresses, zetaAddresses, zircuitAddresses } from \"./deployments/index.js\";\nimport { arbitrumAddresses } from \"./deployments/arbitrum.js\";\nimport { berachainbartioAddresses } from \"./deployments/berachainbartio.js\";\nimport { coreAddresses } from \"./deployments/core.js\";\nimport { optimismAddresses } from \"./deployments/optimism.js\";\nimport { polygonAddresses } from \"./deployments/polygon.js\";\nimport { tataratestnetAddresses } from \"./deployments/tataratestnet.js\";\nimport { zklinknovaAddresses } from \"./deployments/zklinknova.js\";\nimport { peaqAddresses } from \"./deployments/peaq.js\";\nimport { roninAddresses } from \"./deployments/ronin.js\";\nimport { nibiruAddresses } from \"./deployments/nibiru.js\";\nimport { hyperevmAddresses } from \"./deployments/hyperevm.js\";\n\n/**\n * Interface representing a smart contract with its address and optional start block\n */\nexport interface Contract {\n /** The contract's deployed address */\n address: string;\n /** The block number where the contract was deployed */\n startBlock?: number;\n}\n\n/**\n * Interface defining the structure of contract addresses for a protocol\n */\nexport interface ContractAddresses {\n /** Keeper Registry contract */\n KeeperRegistry: Contract;\n /** Orchestrator contract */\n Orchestrator: Contract;\n /** Strategy Registry contract */\n StrategyRegistry: Contract;\n /** Vault Registry contract */\n VaultRegistry: Contract;\n /** Bundle Registry contract */\n BundleRegistry: Contract;\n /** Steer Periphery contract */\n SteerPeriphery: Contract;\n /** Gas Vault contract */\n GasVault: Contract;\n /** Optional Runner Registry contract */\n RunnerRegistry?: Contract;\n /** Optional Pool Helper contract */\n PoolHelper?: Contract;\n /** Optional Whitelist Registry contract */\n WhitelistRegistry?: Contract;\n /** Optional Dynamic Jobs contract */\n DynamicJobs?: Contract;\n /** Optional Steer Token contract */\n SteerToken?: Contract;\n /** Optional Static Jobs contract */\n StaticJobs?: Contract;\n\n Helper?:Contract\n\n SingleAssetDeposit?:Contract\n}\n\n/**\n * Interface extending ContractAddresses with network-specific configuration\n */\nexport interface NetworkConfig extends ContractAddresses {\n /** Chain ID of the network */\n chainId: number;\n /** Transaction type used on the network (0 = legacy, 1 = EIP-2930, 2 = EIP-1559) */\n transactionType: number;\n /** Address of the network's native token wrapper contract */\n address: string;\n /** Optional chain name */\n name: Chain;\n /** Whether token wrapping is enabled on this network */\n isWrappingEnabled?: boolean;\n /** Symbol of the wrapped native token */\n wrappedNativeToken?: string;\n}\n\n/**\n * Type representing the contract name keys from ContractAddresses\n */\nexport type ContractName = keyof ContractAddresses;\n\n/**\n * Interface mapping Chain enum values to their NetworkConfig\n */\nexport interface Networks extends Record<Chain, NetworkConfig> {}\n\nexport const networks: Networks = {\n \n [Chain.Polygon]: {\n address: \"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270\",\n name: Chain.Polygon,\n isWrappingEnabled: true,\n wrappedNativeToken: \"WMATIC\",\n chainId: ChainId.Polygon,\n ...(polygonAddresses as unknown as ContractAddresses),\n PoolHelper: {\n address: \"0xa7da6196B871A53f6aEC27F9EA4BBC39C1390EF4\",\n startBlock: 59943299,\n },\n transactionType: 2,\n },\n [Chain.Optimism]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Optimism,\n ...(optimismAddresses as unknown as ContractAddresses),\n chainId: ChainId.Optimism,\n wrappedNativeToken: \"WETH\",\n transactionType: 0,\n },\n [Chain.Arbitrum]: {\n address: \"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1\",\n name: Chain.Arbitrum,\n isWrappingEnabled: true,\n wrappedNativeToken: \"WETH\",\n ...(arbitrumAddresses as unknown as ContractAddresses),\n chainId: ChainId.Arbitrum,\n transactionType: 2,\n PoolHelper: {\n address: \"0x657bB5fD00e6D6BdA438988DcaF5B62Ef16F6163\",\n startBlock: 256472779,\n },\n },\n [Chain.BSC]: {\n address: \"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c\",\n name: Chain.BSC,\n wrappedNativeToken: \"WBNB\",\n ...(bscAddresses as unknown as ContractAddresses),\n chainId: ChainId.BSC,\n transactionType: 2,\n },\n [Chain.Evmos]: {\n address: \"0xD4949664cD82660AaE99bEdc034a0deA8A0bd517\",\n name: Chain.Evmos,\n wrappedNativeToken: \"WEVMOS\",\n ...(evmosAddresses as unknown as ContractAddresses),\n chainId: ChainId.Evmos,\n transactionType: 0,\n },\n [Chain.Metis]: {\n address: \"0x75cb093e4d61d2a2e65d8e0bbb01de8d89b53481\",\n name: Chain.Metis,\n wrappedNativeToken: \"METIS\",\n isWrappingEnabled: true,\n ...(metisAddresses as unknown as ContractAddresses),\n chainId: ChainId.Metis,\n transactionType: 0,\n },\n [Chain.Avalanche]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Avalanche,\n wrappedNativeToken: \"WETH\",\n ...(avalancheAddresses as unknown as ContractAddresses),\n chainId: ChainId.Avalanche,\n transactionType: 0,\n },\n \n [Chain.PolygonzkEVM]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.PolygonzkEVM,\n wrappedNativeToken: \"WMATIC\",\n ...(polyzkevmAddresses as unknown as ContractAddresses),\n chainId: ChainId.PolygonzkEVM,\n transactionType: 0,\n },\n [Chain.Celo]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Celo,\n wrappedNativeToken: \"CELO\",\n ...(celoAddresses as unknown as ContractAddresses),\n chainId: ChainId.Celo,\n transactionType: 0,\n },\n [Chain.Base]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Base,\n wrappedNativeToken: \"WETH\",\n isWrappingEnabled: true,\n ...(baseAddresses as unknown as ContractAddresses),\n chainId: ChainId.Base,\n transactionType: 0,\n PoolHelper: {\n address: \"0x603823Ad53c1C7D402c5A20CD1B05488Dafc2646\",\n startBlock: 20147258,\n },\n ...(baseAddresses as unknown as ContractAddresses),\n },\n\n [Chain.Kava]: {\n address: \"0xc86c7C0eFbd6A49B35E8714C5f59D99De09A225b\",\n name: Chain.Kava,\n wrappedNativeToken: \"WKAVA\",\n ...(kavaAddresses as unknown as ContractAddresses),\n chainId: ChainId.Kava,\n PoolHelper: {\n address: \"0x4B76fE1D77faD404e4AFD7Fa9797cDCC84Aa2469\",\n startBlock: 12934741,\n },\n ...(kavaAddresses as unknown as ContractAddresses),\n transactionType: 0,\n },\n [Chain.Linea]: {\n address: \"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f\",\n name: Chain.Linea,\n wrappedNativeToken: \"WETH\",\n ...(lineaAddresses as unknown as ContractAddresses),\n chainId: ChainId.Linea,\n transactionType: 0,\n },\n [Chain.Scroll]: {\n address: \"0x5300000000000000000000000000000000000004\",\n name: Chain.Scroll,\n wrappedNativeToken: \"WETH\",\n ...(scrollAddresses as unknown as ContractAddresses),\n chainId: ChainId.Scroll,\n transactionType: 0,\n },\n [Chain.Manta]: {\n address: \"0x0dc808adce2099a9f62aa87d9670745aba741746\",\n name: Chain.Manta,\n wrappedNativeToken: \"WETH\",\n ...(mantaAddresses as unknown as ContractAddresses),\n chainId: ChainId.Manta,\n transactionType: 0,\n },\n [Chain.Astar]: {\n address: \"0xAeaaf0e2c81Af264101B9129C00F4440cCF0F720\",\n name: Chain.Astar,\n wrappedNativeToken: \"WASTAR\",\n ...(astarAddresses as unknown as ContractAddresses),\n chainId: ChainId.Astar,\n transactionType: 0,\n },\n [Chain.Mantle]: {\n address: \"0xCD88431107B72b1a1aa13DE27Ab894e27C7D1a61\",\n name: Chain.Mantle,\n wrappedNativeToken: \"MNT\",\n ...(mantleAddresses as unknown as ContractAddresses),\n chainId: ChainId.Mantle,\n transactionType: 0,\n },\n [Chain.Fantom]: {\n wrappedNativeToken: \"WFTM\",\n address: \"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83\",\n name: Chain.Fantom,\n ...(fantomAddresses as unknown as ContractAddresses),\n chainId: ChainId.Fantom,\n transactionType: 0,\n },\n [Chain.AstarZkevm]: {\n wrappedNativeToken: \"WETH\",\n address: \"0xE9CC37904875B459Fa5D0FE37680d36F1ED55e38\",\n name: Chain.AstarZkevm,\n ...(astarzkevmAddresses as unknown as ContractAddresses),\n chainId: ChainId.AstarZkevm,\n transactionType: 0,\n },\n [Chain.Blast]: {\n wrappedNativeToken: \"WETH\",\n address: \"0x4300000000000000000000000000000000000004\",\n name: Chain.Blast,\n ...(blastAddresses as unknown as ContractAddresses),\n chainId: ChainId.Blast,\n transactionType: 0,\n },\n [Chain.Mode]: {\n wrappedNativeToken: \"WETH\",\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Mode,\n PoolHelper: {\n address: \"0xA9d55eb3fBEE553db12cB25C8cF8ADbdB6d74541\",\n startBlock: 13458174,\n },\n ...(modeAddresses as unknown as ContractAddresses),\n chainId: ChainId.Mode,\n transactionType: 0,\n },\n [Chain.XLayer]: {\n wrappedNativeToken: \"OKB\",\n address: \"0x5A77f1443D16ee5761d310e38b62f77f726bC71c\",\n name: Chain.XLayer,\n ...(xlayerAddresses as unknown as ContractAddresses),\n chainId: ChainId.XLayer,\n transactionType: 0,\n },\n [Chain.Telos]: {\n wrappedNativeToken: \"TELOS\",\n address: \"0xA0fB8cd450c8Fd3a11901876cD5f17eB47C6bc50\",\n name: Chain.Telos,\n ...(telosAddresses as unknown as ContractAddresses),\n chainId: ChainId.Telos,\n transactionType: 0,\n },\n [Chain.Taiko]: {\n wrappedNativeToken: \"ETH\",\n address: \"0xA0fB8cd450c8Fd3a11901876cD5f17eB47C6bc50\",\n name: Chain.Taiko,\n ...(taikoAddresses as unknown as ContractAddresses),\n chainId: ChainId.Taiko,\n transactionType: 0,\n },\n [Chain.Rootstock]: {\n wrappedNativeToken: \"RBTC\",\n address: \"0x542fda317318ebf1d3deaf76e0b632741a7e677d\",\n name: Chain.Rootstock,\n ...(rootstockAddresses as unknown as ContractAddresses),\n chainId: ChainId.Rootstock,\n transactionType: 0,\n },\n [Chain.Moonbeam]: {\n wrappedNativeToken: \"WGLMR\",\n address: \"0x7507c1dc16935B82698e4C63f2746A2fCf994dF8\",\n name: Chain.Moonbeam,\n PoolHelper: {\n address: \"0xDA6BA21f39d33e922ecC43d41E7068988dc36C6A\",\n startBlock: 9389000,\n },\n ...(moonbeamAddresses as unknown as ContractAddresses),\n chainId: ChainId.Moonbeam,\n transactionType: 0,\n },\n [Chain.Thundercore]: {\n wrappedNativeToken: \"WETH\",\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Thundercore,\n ...(thundercoreAddresses as unknown as ContractAddresses),\n chainId: ChainId.Thundercore,\n transactionType: 0,\n \n },\n [Chain.OkxTestnet]: {\n wrappedNativeToken: \"WETH\",\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.OkxTestnet,\n ...(okxtestnetAddresses as unknown as ContractAddresses),\n chainId: ChainId.OkxTestnet,\n transactionType: 0,\n },\n [Chain.ZklinkNova]: {\n wrappedNativeToken: \"ETH\",\n address: \"0x8280a4e7D5B3B658ec4580d3Bc30f5e50454F169\",\n name: Chain.ZklinkNova,\n ...(zklinknovaAddresses as unknown as ContractAddresses),\n chainId: ChainId.ZklinkNova,\n transactionType: 0,\n },\n [Chain.Flare]: {\n wrappedNativeToken: \"FLR\",\n // https://flarescan.com/address/0x1d80c49bbbcd1c0911346656b529df9e5c2f783d\n address: \"0x1d80c49bbbcd1c0911346656b529df9e5c2f783d\",\n name: Chain.Flare,\n isWrappingEnabled: true,\n chainId: ChainId.Flare,\n transactionType: 0,\n ...(flareAddresses as unknown as ContractAddresses),\n },\n [Chain.BeraChainBartio]: {\n wrappedNativeToken: \"BERA\",\n address: \"0x7507c1dc16935B82698e4C63f2746A2fCf994dF8\",\n name: Chain.BeraChainBartio,\n chainId: ChainId.BeraChainBartio,\n transactionType: 0,\n ...(berachainbartioAddresses as unknown as ContractAddresses),\n },\n [Chain.Filecoin]: {\n wrappedNativeToken: \"WFIL\",\n address: \"0x60e1773636cf5e4a227d9ac24f20feca034ee25a\",\n name: Chain.Filecoin,\n isWrappingEnabled: true,\n chainId: ChainId.Filecoin,\n transactionType: 0,\n ...(filecoinAddresses as unknown as ContractAddresses),\n },\n [Chain.Apechain]: {\n wrappedNativeToken: \"APE\",\n address: \"0x48b62137edfa95a428d35c09e44256a739f6b557\",\n // https://apescan.io/address/0x48b62137edfa95a428d35c09e44256a739f6b557\n name: Chain.Apechain,\n isWrappingEnabled: true,\n chainId: ChainId.Apechain,\n transactionType: 0,\n ...(apechainAddresses as unknown as ContractAddresses),\n },\n [Chain.Zircuit]: {\n chainId: 48900,\n wrappedNativeToken: \"ETH\",\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Zircuit,\n isWrappingEnabled: true,\n transactionType: 0,\n ...(zircuitAddresses as unknown as ContractAddresses),\n },\n [Chain.Sei]: {\n wrappedNativeToken: \"WSEI\",\n // https://seitrace.com/address/0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7?chain=pacific-1\n address: \"0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7\",\n name: Chain.Sei,\n isWrappingEnabled: true,\n chainId: ChainId.Sei,\n transactionType: 0,\n ...(seiAddresses as unknown as ContractAddresses),\n },\n [Chain.Sonic]: {\n wrappedNativeToken: \"WS\",\n address: \"0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38\",\n name: Chain.Sonic,\n isWrappingEnabled: true,\n chainId: ChainId.Sonic,\n transactionType: 0,\n ...(sonicAddresses as unknown as ContractAddresses),\n },\n [Chain.Zeta]: {\n wrappedNativeToken: \"WZETA\",\n isWrappingEnabled: true,\n name: Chain.Zeta,\n // https://zetachain.blockscout.com/address/0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf\n address: \"0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf\",\n chainId: ChainId.Zeta,\n transactionType: 0,\n ...(zetaAddresses as unknown as ContractAddresses),\n },\n [Chain.Soneium]: {\n wrappedNativeToken: \"ETH\",\n address: \"0x7507c1dc16935B82698e4C63f2746A2fCf994dF8\",\n chainId: ChainId.Soneium,\n transactionType: 0,\n ...(soneiumAddresses as unknown as ContractAddresses),\n name: Chain.Soneium,\n },\n [Chain.Mainnet]: {\n chainId: ChainId.Mainnet,\n transactionType: 0,\n ...(ethAddresses as unknown as ContractAddresses),\n \n address: \"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\",\n name: Chain.Mainnet,\n },\n [Chain.Bera]: {\n chainId: ChainId.Bera,\n wrappedNativeToken: \"WBERA\",\n address: \"0x6969696969696969696969696969696969696969\",\n name: Chain.Bera,\n isWrappingEnabled: true,\n transactionType: 0,\n ...(beraAddresses as unknown as ContractAddresses),\n },\n [Chain.Unichain]: {\n chainId: ChainId.Unichain,\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Unichain,\n wrappedNativeToken: \"WETH\",\n isWrappingEnabled: true,\n transactionType: 0,\n ...(uniAddresses as unknown as ContractAddresses),\n \n },\n [Chain.TataraTestnet]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.TataraTestnet,\n wrappedNativeToken: \"WETH\",\n isWrappingEnabled: true,\n chainId: ChainId.TataraTestnet,\n transactionType: 0,\n ...(tataratestnetAddresses as unknown as ContractAddresses),\n },\n [Chain.Hemi]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Hemi,\n wrappedNativeToken: \"WETH\",\n isWrappingEnabled: true,\n ...(hemiAddresses as unknown as ContractAddresses),\n chainId: ChainId.Hemi,\n transactionType: 0,\n },\n [Chain.Core]: {\n address: \"0x191E94fa59739e188dcE837F7f6978d84727AD01\",\n name: Chain.Core,\n wrappedNativeToken: \"Core\",\n isWrappingEnabled: true,\n chainId: ChainId.Core,\n transactionType: 0,\n ...(coreAddresses as unknown as ContractAddresses),\n },\n [Chain.Peaq]: {\n address: \"0x3cd66d2e1fac1751b0a20bebf6ca4c9699bb12d7\",\n name: Chain.Peaq,\n wrappedNativeToken: \"WPEAQ\",\n isWrappingEnabled: false,\n chainId: ChainId.Peaq,\n transactionType: 0,\n ...(peaqAddresses as unknown as ContractAddresses),\n },\n [Chain.Katana]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Katana,\n wrappedNativeToken: \"WETH\",\n isWrappingEnabled: true,\n chainId: ChainId.Katana,\n transactionType: 0,\n ...(katanaAddresses as unknown as ContractAddresses),\n },\n [Chain.Ronin]: {\n address: \"0xe514d9deb7966c8be0ca922de8a064264ea6bcd4\",\n name: Chain.Ronin,\n wrappedNativeToken: \"WRON\",\n isWrappingEnabled: true,\n chainId: ChainId.Ronin,\n transactionType: 0,\n ...(roninAddresses as unknown as ContractAddresses),\n },\n [Chain.Saga]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Saga,\n wrappedNativeToken: \"WGAS\",\n isWrappingEnabled: false,\n chainId: ChainId.Saga,\n transactionType: 0,\n ...(sagaAddresses as unknown as ContractAddresses),\n },\n [Chain.Nibiru]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Nibiru,\n wrappedNativeToken: \"NIBI\",\n isWrappingEnabled: false,\n chainId: ChainId.Nibiru,\n transactionType: 0,\n ...(nibiruAddresses as unknown as ContractAddresses),\n },\n [Chain.Hyperevm]: {\n address: \"0x5555555555555555555555555555555555555555\",\n name: Chain.Hyperevm,\n wrappedNativeToken: \"WHYPE\",\n isWrappingEnabled: false,\n chainId: ChainId.Hyperevm,\n transactionType: 0,\n ...(hyperevmAddresses as unknown as ContractAddresses),\n }\n};\n\n\n/**\n * Retrieves a contract address for a specific chain ID and contract name.\n * \n * @param chainId - The numeric identifier of the blockchain network\n * @param contractName - The name of the contract to look up\n * @returns The contract address if found, undefined otherwise\n * @example\n * ```typescript\n * const address = getContractAddressByChainIdAndContractName(1, 'KeeperRegistry');\n * ```\n */\nexport function getContractAddressByChainIdAndContractName(\n chainId: number,\n contractName: ContractName\n): string | undefined {\n const network = Object.values(networks).find(\n (net): net is NetworkConfig => (net as NetworkConfig).chainId === chainId\n );\n if (network && contractName in network) {\n const contract = network[contractName];\n return contract?.address;\n }\n return undefined;\n}\n\n\nexport function getNetworkByChainId(chainId: number): NetworkConfig | undefined {\n return Object.values(networks).find(\n (net): net is NetworkConfig => (net as NetworkConfig).chainId === chainId\n );\n}\n\n\n/**\n * Retrieves the Pool Helper contract information for a specific chain ID.\n * \n * @param chainId - The numeric identifier of the blockchain network\n * @returns The Pool Helper contract information if found, undefined otherwise\n * @example\n * ```typescript\n * const poolHelper = getPoolHelperByChainId(1);\n * ```\n */\nexport function getPoolHelperByChainId(chainId: number): Contract | undefined {\n const contractName = \"PoolHelper\" as const;\n const network = Object.values(networks).find(\n (net): net is NetworkConfig => (net as NetworkConfig).chainId === chainId\n );\n if (network && contractName in network) {\n return network[contractName];\n }\n return undefined;\n}\n\n/**\n * Converts a chain ID to its corresponding chain name.\n * \n * @param chainId - The numeric identifier of the blockchain network\n * @returns The chain name if found, undefined otherwise\n * @example\n * ```typescript\n * const chainName = chainIdToName(137); // Returns \"Polygon\"\n * const chainName = chainIdToName(1); // Returns \"Mainnet\"\n * ```\n */\nexport function chainIdToName(chainId: number): Chain | undefined {\n const network = Object.values(networks).find(\n (net): net is NetworkConfig => (net as NetworkConfig).chainId === chainId\n );\n return network?.name;\n}\n\n/**\n * Converts a chain name to its corresponding chain ID.\n * \n * @param chainName - The chain name to look up\n * @returns The chain ID if found, undefined otherwise\n * @example\n * ```typescript\n * const chainId = chainNameToId(Chain.Polygon); // Returns 137\n * const chainId = chainNameToId(Chain.Mainnet); // Returns 1\n * ```\n */\nexport function chainNameToId(chainName: Chain): number | undefined {\n const network = networks[chainName];\n return network?.chainId;\n}\n\n\nexport function isSingleAssetDepositSupported(chainId: number) {\n const supportedChains = [ChainId.Polygon, ChainId.Hyperevm, ChainId.Peaq, ChainId.Arbitrum, ChainId.Katana, ChainId.Base, ChainId.Saga, ChainId.Mainnet, ChainId.Nibiru];\n\n return supportedChains.indexOf(chainId) > -1;\n}"]}
|
|
1
|
+
{"version":3,"file":"network.js","sourceRoot":"","sources":["../../../src/const/network.ts"],"names":[],"mappings":";;;AAijBA,gGAYC;AAGD,kDAIC;AAaD,wDASC;AAaD,sCAKC;AAaD,sCAGC;AAGD,sEAIC;AAnoBD,yCAA4C;AAC5C,qDAAsqB;AACtqB,2DAA8D;AAC9D,yEAA4E;AAC5E,mDAAsD;AACtD,2DAA8D;AAC9D,yDAA4D;AAC5D,qEAAwE;AACxE,+DAAkE;AAClE,mDAAsD;AACtD,qDAAwD;AACxD,uDAA0D;AAC1D,2DAA8D;AAC9D,qEAAwE;AA6E3D,QAAA,QAAQ,GAAa;IAEhC,CAAC,gBAAK,CAAC,OAAO,CAAC,EAAE;QACf,OAAO,EAAE,4CAA4C;QACrD,IAAI,EAAE,gBAAK,CAAC,OAAO;QACnB,iBAAiB,EAAE,IAAI;QACvB,kBAAkB,EAAE,QAAQ;QAC5B,OAAO,EAAE,kBAAO,CAAC,OAAO;QACxB,GAAI,6BAAiD;QACrD,UAAU,EAAE;YACV,OAAO,EAAE,4CAA4C;YACrD,UAAU,EAAE,QAAQ;SACrB;QACD,eAAe,EAAE,CAAC;KACnB;IACD,CAAC,gBAAK,CAAC,QAAQ,CAAC,EAAE;QAChB,OAAO,EAAE,4CAA4C;QACrD,IAAI,EAAE,gBAAK,CAAC,QAAQ;QACpB,GAAI,+BAAkD;QACtD,OAAO,EAAE,kBAAO,CAAC,QAAQ;QACzB,kBAAkB,EAAE,MAAM;QAC1B,eAAe,EAAE,CAAC;KACnB;IACD,CAAC,gBAAK,CAAC,QAAQ,CAAC,EAAE;QAChB,OAAO,EAAE,4CAA4C;QACrD,IAAI,EAAE,gBAAK,CAAC,QAA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I,CAC1C,CAAC,GAAG,EAAwB,EAAE,CAAE,GAAqB,CAAC,OAAO,KAAK,OAAO,CAC1E,CAAC;IACF,IAAI,OAAO,IAAI,YAAY,IAAI,OAAO,EAAE,CAAC;QACvC,OAAO,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,aAAa,CAAC,OAAe;IAC3C,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAQ,CAAC,CAAC,IAAI,CAC1C,CAAC,GAAG,EAAwB,EAAE,CAAE,GAAqB,CAAC,OAAO,KAAK,OAAO,CAC1E,CAAC;IACF,OAAO,OAAO,EAAE,IAAI,CAAC;AACvB,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,aAAa,CAAC,SAAgB;IAC5C,MAAM,OAAO,GAAG,gBAAQ,CAAC,SAAS,CAAC,CAAC;IACpC,OAAO,OAAO,EAAE,OAAO,CAAC;AAC1B,CAAC;AAGD,SAAgB,6BAA6B,CAAC,OAAe;IAC3D,MAAM,eAAe,GAAG,CAAC,kBAAO,CAAC,OAAO,EAAE,kBAAO,CAAC,QAAQ,EAAE,kBAAO,CAAC,IAAI,EAAE,kBAAO,CAAC,QAAQ,EAAE,kBAAO,CAAC,MAAM,EAAE,kBAAO,CAAC,IAAI,EAAE,kBAAO,CAAC,IAAI,EAAE,kBAAO,CAAC,OAAO,EAAE,kBAAO,CAAC,MAAM,CAAC,CAAC;IAEzK,OAAO,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import { Chain, ChainId } from \"./chain.js\";\nimport { apechainAddresses, astarAddresses, astarzkevmAddresses, avalancheAddresses, baseAddresses, beraAddresses, blastAddresses, bscAddresses, celoAddresses, ethAddresses, evmosAddresses, fantomAddresses, filecoinAddresses, flareAddresses, hemiAddresses, katanaAddresses, kavaAddresses, lineaAddresses, mantaAddresses, mantleAddresses, metisAddresses, modeAddresses, moonbeamAddresses, okxtestnetAddresses, polyzkevmAddresses, rootstockAddresses, sagaAddresses, scrollAddresses, seiAddresses, soneiumAddresses, sonicAddresses, taikoAddresses, telosAddresses, thundercoreAddresses, uniAddresses, xlayerAddresses, zetaAddresses, zircuitAddresses } from \"./deployments/index.js\";\nimport { arbitrumAddresses } from \"./deployments/arbitrum.js\";\nimport { berachainbartioAddresses } from \"./deployments/berachainbartio.js\";\nimport { coreAddresses } from \"./deployments/core.js\";\nimport { optimismAddresses } from \"./deployments/optimism.js\";\nimport { polygonAddresses } from \"./deployments/polygon.js\";\nimport { tataratestnetAddresses } from \"./deployments/tataratestnet.js\";\nimport { zklinknovaAddresses } from \"./deployments/zklinknova.js\";\nimport { peaqAddresses } from \"./deployments/peaq.js\";\nimport { roninAddresses } from \"./deployments/ronin.js\";\nimport { nibiruAddresses } from \"./deployments/nibiru.js\";\nimport { hyperevmAddresses } from \"./deployments/hyperevm.js\";\nimport { feeManagerContractsByChainId } from './feeManagerContracts.js';\n\n/**\n * Interface representing a smart contract with its address and optional start block\n */\nexport interface Contract {\n /** The contract's deployed address */\n address: string;\n /** The block number where the contract was deployed */\n startBlock?: number;\n}\n\n/**\n * Interface defining the structure of contract addresses for a protocol\n */\nexport interface ContractAddresses {\n /** Keeper Registry contract */\n KeeperRegistry: Contract;\n /** Orchestrator contract */\n Orchestrator: Contract;\n /** Strategy Registry contract */\n StrategyRegistry: Contract;\n /** Vault Registry contract */\n VaultRegistry: Contract;\n /** Bundle Registry contract */\n BundleRegistry: Contract;\n /** Steer Periphery contract */\n SteerPeriphery: Contract;\n /** Gas Vault contract */\n GasVault: Contract;\n /** Optional Runner Registry contract */\n RunnerRegistry?: Contract;\n /** Optional Pool Helper contract */\n PoolHelper?: Contract;\n /** Optional Whitelist Registry contract */\n WhitelistRegistry?: Contract;\n /** Optional Dynamic Jobs contract */\n DynamicJobs?: Contract;\n /** Optional Steer Token contract */\n SteerToken?: Contract;\n /** Optional Static Jobs contract */\n StaticJobs?: Contract;\n\n Helper?:Contract\n\n SingleAssetDeposit?:Contract\n FeeManager?: Contract\n}\n\n/**\n * Interface extending ContractAddresses with network-specific configuration\n */\nexport interface NetworkConfig extends ContractAddresses {\n /** Chain ID of the network */\n chainId: number;\n /** Transaction type used on the network (0 = legacy, 1 = EIP-2930, 2 = EIP-1559) */\n transactionType: number;\n /** Address of the network's native token wrapper contract */\n address: string;\n /** Optional chain name */\n name: Chain;\n /** Whether token wrapping is enabled on this network */\n isWrappingEnabled?: boolean;\n /** Symbol of the wrapped native token */\n wrappedNativeToken?: string;\n}\n\n/**\n * Type representing the contract name keys from ContractAddresses\n */\nexport type ContractName = keyof ContractAddresses;\n\n/**\n * Interface mapping Chain enum values to their NetworkConfig\n */\nexport interface Networks extends Record<Chain, NetworkConfig> {}\n\nexport const networks: Networks = {\n \n [Chain.Polygon]: {\n address: \"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270\",\n name: Chain.Polygon,\n isWrappingEnabled: true,\n wrappedNativeToken: \"WMATIC\",\n chainId: ChainId.Polygon,\n ...(polygonAddresses as unknown as ContractAddresses),\n PoolHelper: {\n address: \"0xa7da6196B871A53f6aEC27F9EA4BBC39C1390EF4\",\n startBlock: 59943299,\n },\n transactionType: 2,\n },\n [Chain.Optimism]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Optimism,\n ...(optimismAddresses as unknown as ContractAddresses),\n chainId: ChainId.Optimism,\n wrappedNativeToken: \"WETH\",\n transactionType: 0,\n },\n [Chain.Arbitrum]: {\n address: \"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1\",\n name: Chain.Arbitrum,\n isWrappingEnabled: true,\n wrappedNativeToken: \"WETH\",\n ...(arbitrumAddresses as unknown as ContractAddresses),\n chainId: ChainId.Arbitrum,\n transactionType: 2,\n PoolHelper: {\n address: \"0x657bB5fD00e6D6BdA438988DcaF5B62Ef16F6163\",\n startBlock: 256472779,\n },\n },\n [Chain.BSC]: {\n address: \"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c\",\n name: Chain.BSC,\n wrappedNativeToken: \"WBNB\",\n ...(bscAddresses as unknown as ContractAddresses),\n chainId: ChainId.BSC,\n transactionType: 2,\n },\n [Chain.Evmos]: {\n address: \"0xD4949664cD82660AaE99bEdc034a0deA8A0bd517\",\n name: Chain.Evmos,\n wrappedNativeToken: \"WEVMOS\",\n ...(evmosAddresses as unknown as ContractAddresses),\n chainId: ChainId.Evmos,\n transactionType: 0,\n },\n [Chain.Metis]: {\n address: \"0x75cb093e4d61d2a2e65d8e0bbb01de8d89b53481\",\n name: Chain.Metis,\n wrappedNativeToken: \"METIS\",\n isWrappingEnabled: true,\n ...(metisAddresses as unknown as ContractAddresses),\n chainId: ChainId.Metis,\n transactionType: 0,\n },\n [Chain.Avalanche]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Avalanche,\n wrappedNativeToken: \"WETH\",\n ...(avalancheAddresses as unknown as ContractAddresses),\n chainId: ChainId.Avalanche,\n transactionType: 0,\n },\n \n [Chain.PolygonzkEVM]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.PolygonzkEVM,\n wrappedNativeToken: \"WMATIC\",\n ...(polyzkevmAddresses as unknown as ContractAddresses),\n chainId: ChainId.PolygonzkEVM,\n transactionType: 0,\n },\n [Chain.Celo]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Celo,\n wrappedNativeToken: \"CELO\",\n ...(celoAddresses as unknown as ContractAddresses),\n chainId: ChainId.Celo,\n transactionType: 0,\n },\n [Chain.Base]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Base,\n wrappedNativeToken: \"WETH\",\n isWrappingEnabled: true,\n ...(baseAddresses as unknown as ContractAddresses),\n chainId: ChainId.Base,\n transactionType: 0,\n PoolHelper: {\n address: \"0x603823Ad53c1C7D402c5A20CD1B05488Dafc2646\",\n startBlock: 20147258,\n },\n ...(baseAddresses as unknown as ContractAddresses),\n },\n\n [Chain.Kava]: {\n address: \"0xc86c7C0eFbd6A49B35E8714C5f59D99De09A225b\",\n name: Chain.Kava,\n wrappedNativeToken: \"WKAVA\",\n ...(kavaAddresses as unknown as ContractAddresses),\n chainId: ChainId.Kava,\n PoolHelper: {\n address: \"0x4B76fE1D77faD404e4AFD7Fa9797cDCC84Aa2469\",\n startBlock: 12934741,\n },\n ...(kavaAddresses as unknown as ContractAddresses),\n transactionType: 0,\n },\n [Chain.Linea]: {\n address: \"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f\",\n name: Chain.Linea,\n wrappedNativeToken: \"WETH\",\n ...(lineaAddresses as unknown as ContractAddresses),\n chainId: ChainId.Linea,\n transactionType: 0,\n },\n [Chain.Scroll]: {\n address: \"0x5300000000000000000000000000000000000004\",\n name: Chain.Scroll,\n wrappedNativeToken: \"WETH\",\n ...(scrollAddresses as unknown as ContractAddresses),\n chainId: ChainId.Scroll,\n transactionType: 0,\n },\n [Chain.Manta]: {\n address: \"0x0dc808adce2099a9f62aa87d9670745aba741746\",\n name: Chain.Manta,\n wrappedNativeToken: \"WETH\",\n ...(mantaAddresses as unknown as ContractAddresses),\n chainId: ChainId.Manta,\n transactionType: 0,\n },\n [Chain.Astar]: {\n address: \"0xAeaaf0e2c81Af264101B9129C00F4440cCF0F720\",\n name: Chain.Astar,\n wrappedNativeToken: \"WASTAR\",\n ...(astarAddresses as unknown as ContractAddresses),\n chainId: ChainId.Astar,\n transactionType: 0,\n },\n [Chain.Mantle]: {\n address: \"0xCD88431107B72b1a1aa13DE27Ab894e27C7D1a61\",\n name: Chain.Mantle,\n wrappedNativeToken: \"MNT\",\n ...(mantleAddresses as unknown as ContractAddresses),\n chainId: ChainId.Mantle,\n transactionType: 0,\n },\n [Chain.Fantom]: {\n wrappedNativeToken: \"WFTM\",\n address: \"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83\",\n name: Chain.Fantom,\n ...(fantomAddresses as unknown as ContractAddresses),\n chainId: ChainId.Fantom,\n transactionType: 0,\n },\n [Chain.AstarZkevm]: {\n wrappedNativeToken: \"WETH\",\n address: \"0xE9CC37904875B459Fa5D0FE37680d36F1ED55e38\",\n name: Chain.AstarZkevm,\n ...(astarzkevmAddresses as unknown as ContractAddresses),\n chainId: ChainId.AstarZkevm,\n transactionType: 0,\n },\n [Chain.Blast]: {\n wrappedNativeToken: \"WETH\",\n address: \"0x4300000000000000000000000000000000000004\",\n name: Chain.Blast,\n ...(blastAddresses as unknown as ContractAddresses),\n chainId: ChainId.Blast,\n transactionType: 0,\n },\n [Chain.Mode]: {\n wrappedNativeToken: \"WETH\",\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Mode,\n PoolHelper: {\n address: \"0xA9d55eb3fBEE553db12cB25C8cF8ADbdB6d74541\",\n startBlock: 13458174,\n },\n ...(modeAddresses as unknown as ContractAddresses),\n chainId: ChainId.Mode,\n transactionType: 0,\n },\n [Chain.XLayer]: {\n wrappedNativeToken: \"OKB\",\n address: \"0x5A77f1443D16ee5761d310e38b62f77f726bC71c\",\n name: Chain.XLayer,\n ...(xlayerAddresses as unknown as ContractAddresses),\n chainId: ChainId.XLayer,\n transactionType: 0,\n },\n [Chain.Telos]: {\n wrappedNativeToken: \"TELOS\",\n address: \"0xA0fB8cd450c8Fd3a11901876cD5f17eB47C6bc50\",\n name: Chain.Telos,\n ...(telosAddresses as unknown as ContractAddresses),\n chainId: ChainId.Telos,\n transactionType: 0,\n },\n [Chain.Taiko]: {\n wrappedNativeToken: \"ETH\",\n address: \"0xA0fB8cd450c8Fd3a11901876cD5f17eB47C6bc50\",\n name: Chain.Taiko,\n ...(taikoAddresses as unknown as ContractAddresses),\n chainId: ChainId.Taiko,\n transactionType: 0,\n },\n [Chain.Rootstock]: {\n wrappedNativeToken: \"RBTC\",\n address: \"0x542fda317318ebf1d3deaf76e0b632741a7e677d\",\n name: Chain.Rootstock,\n ...(rootstockAddresses as unknown as ContractAddresses),\n chainId: ChainId.Rootstock,\n transactionType: 0,\n },\n [Chain.Moonbeam]: {\n wrappedNativeToken: \"WGLMR\",\n address: \"0x7507c1dc16935B82698e4C63f2746A2fCf994dF8\",\n name: Chain.Moonbeam,\n PoolHelper: {\n address: \"0xDA6BA21f39d33e922ecC43d41E7068988dc36C6A\",\n startBlock: 9389000,\n },\n ...(moonbeamAddresses as unknown as ContractAddresses),\n chainId: ChainId.Moonbeam,\n transactionType: 0,\n },\n [Chain.Thundercore]: {\n wrappedNativeToken: \"WETH\",\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Thundercore,\n ...(thundercoreAddresses as unknown as ContractAddresses),\n chainId: ChainId.Thundercore,\n transactionType: 0,\n \n },\n [Chain.OkxTestnet]: {\n wrappedNativeToken: \"WETH\",\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.OkxTestnet,\n ...(okxtestnetAddresses as unknown as ContractAddresses),\n chainId: ChainId.OkxTestnet,\n transactionType: 0,\n },\n [Chain.ZklinkNova]: {\n wrappedNativeToken: \"ETH\",\n address: \"0x8280a4e7D5B3B658ec4580d3Bc30f5e50454F169\",\n name: Chain.ZklinkNova,\n ...(zklinknovaAddresses as unknown as ContractAddresses),\n chainId: ChainId.ZklinkNova,\n transactionType: 0,\n },\n [Chain.Flare]: {\n wrappedNativeToken: \"FLR\",\n // https://flarescan.com/address/0x1d80c49bbbcd1c0911346656b529df9e5c2f783d\n address: \"0x1d80c49bbbcd1c0911346656b529df9e5c2f783d\",\n name: Chain.Flare,\n isWrappingEnabled: true,\n chainId: ChainId.Flare,\n transactionType: 0,\n ...(flareAddresses as unknown as ContractAddresses),\n },\n [Chain.BeraChainBartio]: {\n wrappedNativeToken: \"BERA\",\n address: \"0x7507c1dc16935B82698e4C63f2746A2fCf994dF8\",\n name: Chain.BeraChainBartio,\n chainId: ChainId.BeraChainBartio,\n transactionType: 0,\n ...(berachainbartioAddresses as unknown as ContractAddresses),\n },\n [Chain.Filecoin]: {\n wrappedNativeToken: \"WFIL\",\n address: \"0x60e1773636cf5e4a227d9ac24f20feca034ee25a\",\n name: Chain.Filecoin,\n isWrappingEnabled: true,\n chainId: ChainId.Filecoin,\n transactionType: 0,\n ...(filecoinAddresses as unknown as ContractAddresses),\n },\n [Chain.Apechain]: {\n wrappedNativeToken: \"APE\",\n address: \"0x48b62137edfa95a428d35c09e44256a739f6b557\",\n // https://apescan.io/address/0x48b62137edfa95a428d35c09e44256a739f6b557\n name: Chain.Apechain,\n isWrappingEnabled: true,\n chainId: ChainId.Apechain,\n transactionType: 0,\n ...(apechainAddresses as unknown as ContractAddresses),\n },\n [Chain.Zircuit]: {\n chainId: 48900,\n wrappedNativeToken: \"ETH\",\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Zircuit,\n isWrappingEnabled: true,\n transactionType: 0,\n ...(zircuitAddresses as unknown as ContractAddresses),\n },\n [Chain.Sei]: {\n wrappedNativeToken: \"WSEI\",\n // https://seitrace.com/address/0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7?chain=pacific-1\n address: \"0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7\",\n name: Chain.Sei,\n isWrappingEnabled: true,\n chainId: ChainId.Sei,\n transactionType: 0,\n ...(seiAddresses as unknown as ContractAddresses),\n },\n [Chain.Sonic]: {\n wrappedNativeToken: \"WS\",\n address: \"0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38\",\n name: Chain.Sonic,\n isWrappingEnabled: true,\n chainId: ChainId.Sonic,\n transactionType: 0,\n ...(sonicAddresses as unknown as ContractAddresses),\n },\n [Chain.Zeta]: {\n wrappedNativeToken: \"WZETA\",\n isWrappingEnabled: true,\n name: Chain.Zeta,\n // https://zetachain.blockscout.com/address/0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf\n address: \"0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf\",\n chainId: ChainId.Zeta,\n transactionType: 0,\n ...(zetaAddresses as unknown as ContractAddresses),\n },\n [Chain.Soneium]: {\n wrappedNativeToken: \"ETH\",\n address: \"0x7507c1dc16935B82698e4C63f2746A2fCf994dF8\",\n chainId: ChainId.Soneium,\n transactionType: 0,\n ...(soneiumAddresses as unknown as ContractAddresses),\n name: Chain.Soneium,\n },\n [Chain.Mainnet]: {\n chainId: ChainId.Mainnet,\n transactionType: 0,\n ...(ethAddresses as unknown as ContractAddresses),\n \n address: \"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\",\n name: Chain.Mainnet,\n },\n [Chain.Bera]: {\n chainId: ChainId.Bera,\n wrappedNativeToken: \"WBERA\",\n address: \"0x6969696969696969696969696969696969696969\",\n name: Chain.Bera,\n isWrappingEnabled: true,\n transactionType: 0,\n ...(beraAddresses as unknown as ContractAddresses),\n },\n [Chain.Unichain]: {\n chainId: ChainId.Unichain,\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Unichain,\n wrappedNativeToken: \"WETH\",\n isWrappingEnabled: true,\n transactionType: 0,\n ...(uniAddresses as unknown as ContractAddresses),\n \n },\n [Chain.TataraTestnet]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.TataraTestnet,\n wrappedNativeToken: \"WETH\",\n isWrappingEnabled: true,\n chainId: ChainId.TataraTestnet,\n transactionType: 0,\n ...(tataratestnetAddresses as unknown as ContractAddresses),\n },\n [Chain.Hemi]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Hemi,\n wrappedNativeToken: \"WETH\",\n isWrappingEnabled: true,\n ...(hemiAddresses as unknown as ContractAddresses),\n chainId: ChainId.Hemi,\n transactionType: 0,\n },\n [Chain.Core]: {\n address: \"0x191E94fa59739e188dcE837F7f6978d84727AD01\",\n name: Chain.Core,\n wrappedNativeToken: \"Core\",\n isWrappingEnabled: true,\n chainId: ChainId.Core,\n transactionType: 0,\n ...(coreAddresses as unknown as ContractAddresses),\n },\n [Chain.Peaq]: {\n address: \"0x3cd66d2e1fac1751b0a20bebf6ca4c9699bb12d7\",\n name: Chain.Peaq,\n wrappedNativeToken: \"WPEAQ\",\n isWrappingEnabled: false,\n chainId: ChainId.Peaq,\n transactionType: 0,\n ...(peaqAddresses as unknown as ContractAddresses),\n },\n [Chain.Katana]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Katana,\n wrappedNativeToken: \"WETH\",\n isWrappingEnabled: true,\n chainId: ChainId.Katana,\n transactionType: 0,\n ...(katanaAddresses as unknown as ContractAddresses),\n },\n [Chain.Ronin]: {\n address: \"0xe514d9deb7966c8be0ca922de8a064264ea6bcd4\",\n name: Chain.Ronin,\n wrappedNativeToken: \"WRON\",\n isWrappingEnabled: true,\n chainId: ChainId.Ronin,\n transactionType: 0,\n ...(roninAddresses as unknown as ContractAddresses),\n },\n [Chain.Saga]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Saga,\n wrappedNativeToken: \"WGAS\",\n isWrappingEnabled: false,\n chainId: ChainId.Saga,\n transactionType: 0,\n ...(sagaAddresses as unknown as ContractAddresses),\n },\n [Chain.Nibiru]: {\n address: \"0x4200000000000000000000000000000000000006\",\n name: Chain.Nibiru,\n wrappedNativeToken: \"NIBI\",\n isWrappingEnabled: false,\n chainId: ChainId.Nibiru,\n transactionType: 0,\n ...(nibiruAddresses as unknown as ContractAddresses),\n },\n [Chain.Hyperevm]: {\n address: \"0x5555555555555555555555555555555555555555\",\n name: Chain.Hyperevm,\n wrappedNativeToken: \"WHYPE\",\n isWrappingEnabled: false,\n chainId: ChainId.Hyperevm,\n transactionType: 0,\n ...(hyperevmAddresses as unknown as ContractAddresses),\n }\n};\n\nfor (const network of Object.values(networks) as NetworkConfig[]) {\n const feeManagerDeployment = feeManagerContractsByChainId[network.chainId];\n if (feeManagerDeployment) {\n network.FeeManager = feeManagerDeployment;\n }\n}\n\n\n/**\n * Retrieves a contract address for a specific chain ID and contract name.\n * \n * @param chainId - The numeric identifier of the blockchain network\n * @param contractName - The name of the contract to look up\n * @returns The contract address if found, undefined otherwise\n * @example\n * ```typescript\n * const address = getContractAddressByChainIdAndContractName(1, 'KeeperRegistry');\n * ```\n */\nexport function getContractAddressByChainIdAndContractName(\n chainId: number,\n contractName: ContractName\n): string | undefined {\n const network = Object.values(networks).find(\n (net): net is NetworkConfig => (net as NetworkConfig).chainId === chainId\n );\n if (network && contractName in network) {\n const contract = network[contractName];\n return contract?.address;\n }\n return undefined;\n}\n\n\nexport function getNetworkByChainId(chainId: number): NetworkConfig | undefined {\n return Object.values(networks).find(\n (net): net is NetworkConfig => (net as NetworkConfig).chainId === chainId\n );\n}\n\n\n/**\n * Retrieves the Pool Helper contract information for a specific chain ID.\n * \n * @param chainId - The numeric identifier of the blockchain network\n * @returns The Pool Helper contract information if found, undefined otherwise\n * @example\n * ```typescript\n * const poolHelper = getPoolHelperByChainId(1);\n * ```\n */\nexport function getPoolHelperByChainId(chainId: number): Contract | undefined {\n const contractName = \"PoolHelper\" as const;\n const network = Object.values(networks).find(\n (net): net is NetworkConfig => (net as NetworkConfig).chainId === chainId\n );\n if (network && contractName in network) {\n return network[contractName];\n }\n return undefined;\n}\n\n/**\n * Converts a chain ID to its corresponding chain name.\n * \n * @param chainId - The numeric identifier of the blockchain network\n * @returns The chain name if found, undefined otherwise\n * @example\n * ```typescript\n * const chainName = chainIdToName(137); // Returns \"Polygon\"\n * const chainName = chainIdToName(1); // Returns \"Mainnet\"\n * ```\n */\nexport function chainIdToName(chainId: number): Chain | undefined {\n const network = Object.values(networks).find(\n (net): net is NetworkConfig => (net as NetworkConfig).chainId === chainId\n );\n return network?.name;\n}\n\n/**\n * Converts a chain name to its corresponding chain ID.\n * \n * @param chainName - The chain name to look up\n * @returns The chain ID if found, undefined otherwise\n * @example\n * ```typescript\n * const chainId = chainNameToId(Chain.Polygon); // Returns 137\n * const chainId = chainNameToId(Chain.Mainnet); // Returns 1\n * ```\n */\nexport function chainNameToId(chainName: Chain): number | undefined {\n const network = networks[chainName];\n return network?.chainId;\n}\n\n\nexport function isSingleAssetDepositSupported(chainId: number) {\n const supportedChains = [ChainId.Polygon, ChainId.Hyperevm, ChainId.Peaq, ChainId.Arbitrum, ChainId.Katana, ChainId.Base, ChainId.Saga, ChainId.Mainnet, ChainId.Nibiru];\n\n return supportedChains.indexOf(chainId) > -1;\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getProtcolTypeByAmmType = exports.isAlgebraIntegralV2Protocol = exports.isAerodromeVault = exports.isPoolSharkProtocol = exports.isAlgebraIntegralProtocol = exports.isAlgebraDirectionProtocol = exports.isThickV2Protocol = exports.isShadowProtocol = exports.isAlgebraProtocol = exports.ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS = exports.AERODROME_PROTOCOLS = exports.ALGEBRA_INTEGRAL_PROTOCOLS = exports.POOLSHARK_PROTOCOLS = exports.DIRECTIONAL_ALGEBRA_PROTOCOLS = exports.SHADOW_PROTOCOLS = exports.ALGEBRA_PROTOCOLS = exports.StakingProtocol = void 0;
|
|
4
4
|
exports.isValidStakingProtocol = isValidStakingProtocol;
|
|
5
5
|
exports.normalizeProtocol = normalizeProtocol;
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const types_js_1 = require("../base/vault/single-asset/types.js");
|
|
7
|
+
const chain_js_1 = require("./chain.js");
|
|
8
8
|
/**
|
|
9
9
|
* Enum representing supported staking protocols
|
|
10
10
|
*/
|
|
@@ -34,9 +34,11 @@ var StakingProtocol;
|
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
36
|
function isValidStakingProtocol(protocol) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
if (!protocol || typeof protocol !== 'string') {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
const normalizedProtocol = Object.values(StakingProtocol).find((value) => value.toLowerCase() === protocol.toLowerCase());
|
|
41
|
+
return Boolean(normalizedProtocol);
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
42
44
|
* Normalizes a protocol string to its corresponding StakingProtocol enum value.
|
|
@@ -51,8 +53,8 @@ function isValidStakingProtocol(protocol) {
|
|
|
51
53
|
* ```
|
|
52
54
|
*/
|
|
53
55
|
function normalizeProtocol(protocol) {
|
|
54
|
-
const normalizedProtocol =
|
|
55
|
-
if (!isValidStakingProtocol(normalizedProtocol)) {
|
|
56
|
+
const normalizedProtocol = Object.values(StakingProtocol).find((value) => value.toLowerCase() === protocol.toLowerCase());
|
|
57
|
+
if (!normalizedProtocol || !isValidStakingProtocol(normalizedProtocol)) {
|
|
56
58
|
throw new Error(`Invalid protocol: ${protocol}`);
|
|
57
59
|
}
|
|
58
60
|
return normalizedProtocol;
|
|
@@ -61,71 +63,71 @@ function normalizeProtocol(protocol) {
|
|
|
61
63
|
* List of protocols that implement the Algebra interface
|
|
62
64
|
*/
|
|
63
65
|
exports.ALGEBRA_PROTOCOLS = [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
66
|
+
chain_js_1.Protocol.QuickSwap,
|
|
67
|
+
chain_js_1.Protocol.Wasabee,
|
|
68
|
+
chain_js_1.Protocol.Beam,
|
|
69
|
+
chain_js_1.Protocol.QuickSwapIntegral,
|
|
70
|
+
chain_js_1.Protocol.SilverSwap,
|
|
71
|
+
chain_js_1.Protocol.Ocelex,
|
|
72
|
+
chain_js_1.Protocol.Henjin,
|
|
73
|
+
chain_js_1.Protocol.Camelot,
|
|
74
|
+
chain_js_1.Protocol.Ocelex,
|
|
75
|
+
chain_js_1.Protocol.Lynex,
|
|
76
|
+
chain_js_1.Protocol.Thena,
|
|
77
|
+
chain_js_1.Protocol.Hercules,
|
|
78
|
+
chain_js_1.Protocol.QuickSwapAlgebra,
|
|
79
|
+
chain_js_1.Protocol.Kim,
|
|
80
|
+
chain_js_1.Protocol.Swapsicle,
|
|
81
|
+
chain_js_1.Protocol.Fenix,
|
|
82
|
+
chain_js_1.Protocol.StellaSwap,
|
|
83
|
+
chain_js_1.Protocol.Glyph,
|
|
84
|
+
chain_js_1.Protocol.KatanaIntegral,
|
|
85
|
+
chain_js_1.Protocol.Blackhole,
|
|
86
|
+
chain_js_1.Protocol.Nest,
|
|
87
|
+
chain_js_1.Protocol.Cypher,
|
|
88
|
+
chain_js_1.Protocol.SparkIntegral,
|
|
87
89
|
];
|
|
88
|
-
exports.SHADOW_PROTOCOLS = [
|
|
90
|
+
exports.SHADOW_PROTOCOLS = [chain_js_1.Protocol.Shadow, chain_js_1.Protocol.MachineX];
|
|
89
91
|
/**
|
|
90
92
|
* List of protocols that implement directional Algebra interface
|
|
91
93
|
*/
|
|
92
|
-
exports.DIRECTIONAL_ALGEBRA_PROTOCOLS = [
|
|
94
|
+
exports.DIRECTIONAL_ALGEBRA_PROTOCOLS = [chain_js_1.Protocol.Camelot, chain_js_1.Protocol.Hercules];
|
|
93
95
|
/**
|
|
94
96
|
* List of protocols that implement the PoolShark interface
|
|
95
97
|
*/
|
|
96
|
-
exports.POOLSHARK_PROTOCOLS = [
|
|
98
|
+
exports.POOLSHARK_PROTOCOLS = [chain_js_1.Protocol.PoolShark];
|
|
97
99
|
/**
|
|
98
100
|
* List of protocols that implement the Algebra Integral interface
|
|
99
101
|
*/
|
|
100
102
|
exports.ALGEBRA_INTEGRAL_PROTOCOLS = [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
103
|
+
chain_js_1.Protocol.Kim,
|
|
104
|
+
chain_js_1.Protocol.Wasabee,
|
|
105
|
+
chain_js_1.Protocol.Swapsicle,
|
|
106
|
+
chain_js_1.Protocol.QuickSwapIntegral,
|
|
107
|
+
chain_js_1.Protocol.Fenix,
|
|
108
|
+
chain_js_1.Protocol.Henjin,
|
|
109
|
+
chain_js_1.Protocol.SilverSwap,
|
|
110
|
+
chain_js_1.Protocol.Beam,
|
|
111
|
+
chain_js_1.Protocol.Glyph,
|
|
112
|
+
chain_js_1.Protocol.KatanaIntegral,
|
|
113
|
+
chain_js_1.Protocol.Blackhole,
|
|
114
|
+
chain_js_1.Protocol.Nest,
|
|
115
|
+
chain_js_1.Protocol.Cypher,
|
|
116
|
+
chain_js_1.Protocol.SparkIntegral,
|
|
115
117
|
];
|
|
116
|
-
exports.AERODROME_PROTOCOLS = [
|
|
118
|
+
exports.AERODROME_PROTOCOLS = [chain_js_1.Protocol.Aerodrome, chain_js_1.Protocol.AerodromeV2, chain_js_1.Protocol.Cypher];
|
|
117
119
|
exports.ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS = [
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
chain_js_1.Protocol.QuickSwapIntegral,
|
|
121
|
+
chain_js_1.Protocol.Wasabee,
|
|
122
|
+
chain_js_1.Protocol.KatanaIntegral,
|
|
123
|
+
chain_js_1.Protocol.Blackhole,
|
|
124
|
+
chain_js_1.Protocol.Cypher,
|
|
125
|
+
chain_js_1.Protocol.SparkIntegral,
|
|
124
126
|
];
|
|
125
127
|
/**
|
|
126
128
|
* List of protocols that implement the Thick interface
|
|
127
129
|
*/
|
|
128
|
-
const THICK_PROTOCOLS = [
|
|
130
|
+
const THICK_PROTOCOLS = [chain_js_1.Protocol.ThickV2];
|
|
129
131
|
/**
|
|
130
132
|
* Checks if a protocol implements the Algebra interface.
|
|
131
133
|
*
|
|
@@ -195,48 +197,22 @@ const isAlgebraIntegralV2Protocol = (protocol) => {
|
|
|
195
197
|
};
|
|
196
198
|
exports.isAlgebraIntegralV2Protocol = isAlgebraIntegralV2Protocol;
|
|
197
199
|
const getProtcolTypeByAmmType = (ammType) => {
|
|
198
|
-
if (ammType ===
|
|
199
|
-
return
|
|
200
|
+
if (ammType === types_js_1.AMMType.Algebra) {
|
|
201
|
+
return chain_js_1.Protocol.QuickSwap;
|
|
200
202
|
}
|
|
201
|
-
if (ammType ===
|
|
202
|
-
return
|
|
203
|
+
if (ammType === types_js_1.AMMType.AlgebraDirectional) {
|
|
204
|
+
return chain_js_1.Protocol.Camelot;
|
|
203
205
|
}
|
|
204
|
-
if (ammType ===
|
|
205
|
-
return
|
|
206
|
+
if (ammType === types_js_1.AMMType.AlgebraIntegral) {
|
|
207
|
+
return chain_js_1.Protocol.QuickSwapIntegral;
|
|
206
208
|
}
|
|
207
|
-
if (ammType ===
|
|
208
|
-
return
|
|
209
|
+
if (ammType === types_js_1.AMMType.UniswapV3) {
|
|
210
|
+
return chain_js_1.Protocol.Uniswap;
|
|
209
211
|
}
|
|
210
|
-
if (ammType ===
|
|
211
|
-
return
|
|
212
|
+
if (ammType === types_js_1.AMMType.Aerodrome) {
|
|
213
|
+
return chain_js_1.Protocol.Aerodrome;
|
|
212
214
|
}
|
|
213
215
|
throw Error('Protocol type not found');
|
|
214
216
|
};
|
|
215
217
|
exports.getProtcolTypeByAmmType = getProtcolTypeByAmmType;
|
|
216
|
-
/**
|
|
217
|
-
* Checks if a protocol supports algebraHook for a given chain.
|
|
218
|
-
*
|
|
219
|
-
* @param protocolInfo - The protocol information object
|
|
220
|
-
* @param chain - The chain to check for algebraHook support
|
|
221
|
-
* @returns True if the protocol supports algebraHook on the given chain, false otherwise
|
|
222
|
-
* @example
|
|
223
|
-
* ```typescript
|
|
224
|
-
* const protocolInfo = `getProtocolInfoBy`Name('QuickSwapIntegral', 'api-key');
|
|
225
|
-
* if (isAlgebraHookSupported(protocolInfo, Chain.Base)) {
|
|
226
|
-
* // Protocol supports algebraHook on Base chain
|
|
227
|
-
* }
|
|
228
|
-
* ```
|
|
229
|
-
*/
|
|
230
|
-
const isAlgebraHookSupported = (protocolInfo, chain) => {
|
|
231
|
-
if (!protocolInfo) {
|
|
232
|
-
return false;
|
|
233
|
-
}
|
|
234
|
-
// Check if the protocol has algebraHook supported chains defined
|
|
235
|
-
if (protocolInfo.algebraHookSupportedChains && Array.isArray(protocolInfo.algebraHookSupportedChains)) {
|
|
236
|
-
return protocolInfo.algebraHookSupportedChains.includes(chain);
|
|
237
|
-
}
|
|
238
|
-
// Fallback: if no specific chains are defined but beaconAlgebraHook exists, assume it's supported
|
|
239
|
-
return !!protocolInfo.beaconAlgebraHook;
|
|
240
|
-
};
|
|
241
|
-
exports.isAlgebraHookSupported = isAlgebraHookSupported;
|
|
242
218
|
//# sourceMappingURL=protocol.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/const/protocol.ts"],"names":[],"mappings":";;;AAgCA,wDAIC;AAcD,8CAMC;AAxDD,4DAA2D;AAE3D,mCAA0C;AAE1C;;GAEG;AACH,IAAY,eAWX;AAXD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,0CAAuB,CAAA;IACvB,8CAA2B,CAAA;IAC3B,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;IACrB,0CAAuB,CAAA;IACvB,kCAAe,CAAA;IACf,sCAAmB,CAAA;AACrB,CAAC,EAXW,eAAe,+BAAf,eAAe,QAW1B;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,sBAAsB,CAAC,QAAgB;IACrD,oFAAoF;IACpF,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC9F,OAAO,MAAM,C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,SAAS,CAAA;IAC3B,CAAC;IAED,IAAI,OAAO,KAAK,eAAO,CAAC,kBAAkB,EAAE,CAAC;QAC3C,OAAO,gBAAQ,CAAC,OAAO,CAAA;IACzB,CAAC;IAED,IAAI,OAAO,KAAK,eAAO,CAAC,eAAe,EAAE,CAAC;QACxC,OAAO,gBAAQ,CAAC,iBAAiB,CAAA;IACnC,CAAC;IAED,IAAI,OAAO,KAAK,eAAO,CAAC,SAAS,EAAE,CAAC;QAClC,OAAO,gBAAQ,CAAC,OAAO,CAAA;IACzB,CAAC;IAED,IAAI,OAAO,KAAK,eAAO,CAAC,SAAS,EAAE,CAAC;QAClC,OAAO,gBAAQ,CAAC,SAAS,CAAA;IAC3B,CAAC;IAED,MAAM,KAAK,CAAC,yBAAyB,CAAC,CAAA;AACxC,CAAC,CAAA;AAvBY,QAAA,uBAAuB,2BAuBnC;AAED;;;;;;;;;;;;;GAaG;AACI,MAAM,sBAAsB,GAAG,CAAC,YAAsC,EAAE,KAAY,EAAW,EAAE;IACtG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,iEAAiE;IACjE,IAAI,YAAY,CAAC,0BAA0B,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,0BAA0B,CAAC,EAAE,CAAC;QACtG,OAAO,YAAY,CAAC,0BAA0B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjE,CAAC;IAED,kGAAkG;IAClG,OAAO,CAAC,CAAC,YAAY,CAAC,iBAAiB,CAAC;AAC1C,CAAC,CAAA;AAZY,QAAA,sBAAsB,0BAYlC","sourcesContent":["import { AMMType } from '../base/vault/single-asset/types';\nimport { SupportedProtocol, ProtocolInfo } from '../types';\nimport { Protocol, Chain } from './chain';\n\n/**\n * Enum representing supported staking protocols\n */\nexport enum StakingProtocol {\n Forge = 'Forge',\n Kinetix = 'Kinetix',\n Uniswap = 'Uniswap',\n SushiSwap = 'SushiSwap',\n QuickSwapV3 = 'QuickSwapV3',\n ArthSwap = 'ArthSwap',\n arthswap = 'arthswap',\n Swapsicle = 'Swapsicle',\n Spark = 'Spark',\n Spark32 = 'Spark32',\n}\n\n/**\n * Checks if a given string is a valid StakingProtocol enum value.\n *\n * @param protocol - The protocol string to validate\n * @returns True if the protocol is a valid StakingProtocol, false otherwise\n * @example\n * ```typescript\n * if (isValidStakingProtocol('Uniswap')) {\n * // Handle valid protocol\n * }\n * ```\n */\nexport function isValidStakingProtocol(protocol: string): protocol is StakingProtocol {\n // Convert the input protocol to title case (first letter uppercase, rest lowercase)\n const normalizedProtocol = protocol.charAt(0).toUpperCase() + protocol.slice(1).toLowerCase();\n return Object.values(StakingProtocol).includes(normalizedProtocol as StakingProtocol);\n}\n\n/**\n * Normalizes a protocol string to its corresponding StakingProtocol enum value.\n *\n * @param protocol - The protocol string to normalize\n * @returns The normalized StakingProtocol enum value\n * @throws Error if the protocol string is invalid\n * @example\n * ```typescript\n * const protocol = normalizeProtocol('uniswap');\n * // Returns: StakingProtocol.Uniswap\n * ```\n */\nexport function normalizeProtocol(protocol: string): StakingProtocol {\n const normalizedProtocol = protocol.charAt(0).toUpperCase() + protocol.slice(1).toLowerCase();\n if (!isValidStakingProtocol(normalizedProtocol)) {\n throw new Error(`Invalid protocol: ${protocol}`);\n }\n return normalizedProtocol as StakingProtocol;\n}\n\n/**\n * List of protocols that implement the Algebra interface\n */\n\n\nexport const ALGEBRA_PROTOCOLS = [\n Protocol.QuickSwap,\n Protocol.Wasabee,\n Protocol.Beam,\n Protocol.QuickSwapIntegral,\n Protocol.SilverSwap,\n Protocol.Ocelex,\n Protocol.Henjin,\n Protocol.Camelot,\n Protocol.Ocelex,\n Protocol.Lynex,\n Protocol.Thena,\n Protocol.Hercules,\n Protocol.QuickSwapAlgebra,\n Protocol.Kim,\n Protocol.Swapsicle,\n Protocol.Fenix,\n Protocol.StellaSwap,\n Protocol.Glyph,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Nest,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n];\n\nexport const SHADOW_PROTOCOLS = [Protocol.Shadow, Protocol.MachineX];\n\n/**\n * List of protocols that implement directional Algebra interface\n */\nexport const DIRECTIONAL_ALGEBRA_PROTOCOLS = [Protocol.Camelot, Protocol.Hercules];\n\n/**\n * List of protocols that implement the PoolShark interface\n */\nexport const POOLSHARK_PROTOCOLS = [Protocol.PoolShark];\n\n/**\n * List of protocols that implement the Algebra Integral interface\n */\nexport const ALGEBRA_INTEGRAL_PROTOCOLS = [\n Protocol.Kim,\n Protocol.Wasabee,\n Protocol.Swapsicle,\n Protocol.QuickSwapIntegral,\n Protocol.Fenix,\n Protocol.Henjin,\n Protocol.SilverSwap,\n Protocol.Beam,\n Protocol.Glyph,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Nest,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n];\n\nexport const AERODROME_PROTOCOLS = [Protocol.Aerodrome, Protocol.AerodromeV2, Protocol.Cypher];\n\nexport const ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS = [\n Protocol.QuickSwapIntegral,\n Protocol.Wasabee,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n]\n\n/**\n * List of protocols that implement the Thick interface\n */\nconst THICK_PROTOCOLS = [Protocol.ThickV2];\n\n/**\n * Checks if a protocol implements the Algebra interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra, false otherwise\n */\nexport const isAlgebraProtocol = (protocol: SupportedProtocol) => {\n return ALGEBRA_PROTOCOLS.includes(protocol);\n};\n\n\n/**\n * Checks if a protocol implements the Shadow interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Shadow, false otherwise\n */\nexport const isShadowProtocol = (protocol: SupportedProtocol) => {\n return SHADOW_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the ThickV2 interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements ThickV2, false otherwise\n */\nexport const isThickV2Protocol = (protocol: SupportedProtocol) => {\n return THICK_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the Algebra Direction interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra Direction, false otherwise\n */\nexport const isAlgebraDirectionProtocol = (protocol: SupportedProtocol) => {\n return DIRECTIONAL_ALGEBRA_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the Algebra Integral interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra Integral, false otherwise\n */\nexport const isAlgebraIntegralProtocol = (protocol: SupportedProtocol) => {\n return ALGEBRA_INTEGRAL_PROTOCOLS.includes(protocol);\n};\n\n\n/**\n * Checks if a protocol implements the PoolShark interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements PoolShark, false otherwise\n */\nexport const isPoolSharkProtocol = (protocol: SupportedProtocol) => {\n return POOLSHARK_PROTOCOLS.includes(protocol);\n};\n\n\nexport const isAerodromeVault = (protocol: SupportedProtocol): boolean => {\n return AERODROME_PROTOCOLS.includes(protocol);\n}\n\nexport const isAlgebraIntegralV2Protocol = (protocol: SupportedProtocol): boolean => {\n return ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS.includes(protocol);\n}\n\nexport const getProtcolTypeByAmmType = (ammType: AMMType): Protocol => {\n\n if (ammType === AMMType.Algebra) {\n return Protocol.QuickSwap\n }\n\n if (ammType === AMMType.AlgebraDirectional) {\n return Protocol.Camelot\n }\n\n if (ammType === AMMType.AlgebraIntegral) {\n return Protocol.QuickSwapIntegral\n }\n\n if (ammType === AMMType.UniswapV3) {\n return Protocol.Uniswap\n }\n\n if (ammType === AMMType.Aerodrome) {\n return Protocol.Aerodrome\n }\n\n throw Error('Protocol type not found')\n}\n\n/**\n * Checks if a protocol supports algebraHook for a given chain.\n *\n * @param protocolInfo - The protocol information object\n * @param chain - The chain to check for algebraHook support\n * @returns True if the protocol supports algebraHook on the given chain, false otherwise\n * @example\n * ```typescript\n * const protocolInfo = `getProtocolInfoBy`Name('QuickSwapIntegral', 'api-key');\n * if (isAlgebraHookSupported(protocolInfo, Chain.Base)) {\n * // Protocol supports algebraHook on Base chain\n * }\n * ```\n */\nexport const isAlgebraHookSupported = (protocolInfo: ProtocolInfo | undefined, chain: Chain): boolean => {\n if (!protocolInfo) {\n return false;\n }\n \n // Check if the protocol has algebraHook supported chains defined\n if (protocolInfo.algebraHookSupportedChains && Array.isArray(protocolInfo.algebraHookSupportedChains)) {\n return protocolInfo.algebraHookSupportedChains.includes(chain);\n }\n \n // Fallback: if no specific chains are defined but beaconAlgebraHook exists, assume it's supported\n return !!protocolInfo.beaconAlgebraHook;\n} "]}
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/const/protocol.ts"],"names":[],"mappings":";;;AAgCA,wDASC;AAcD,8CAQC;AA/DD,kEAA8D;AAE9D,yCAAsC;AAEtC;;GAEG;AACH,IAAY,eAWX;AAXD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,0CAAuB,CAAA;IACvB,8CAA2B,CAAA;IAC3B,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;IACrB,0CAAuB,CAAA;IACvB,kCAAe,CAAA;IACf,sCAAmB,CAAA;AACrB,CAAC,EAXW,eAAe,+BAAf,eAAe,QAW1B;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,sBAAsB,CAAC,QAAmC;IACxE,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAC5D,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC,WAAW,EAAE,CAC1D,C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AAC;QAChC,OAAO,mBAAQ,CAAC,SAAS,CAAA;IAC3B,CAAC;IAED,IAAI,OAAO,KAAK,kBAAO,CAAC,kBAAkB,EAAE,CAAC;QAC3C,OAAO,mBAAQ,CAAC,OAAO,CAAA;IACzB,CAAC;IAED,IAAI,OAAO,KAAK,kBAAO,CAAC,eAAe,EAAE,CAAC;QACxC,OAAO,mBAAQ,CAAC,iBAAiB,CAAA;IACnC,CAAC;IAED,IAAI,OAAO,KAAK,kBAAO,CAAC,SAAS,EAAE,CAAC;QAClC,OAAO,mBAAQ,CAAC,OAAO,CAAA;IACzB,CAAC;IAED,IAAI,OAAO,KAAK,kBAAO,CAAC,SAAS,EAAE,CAAC;QAClC,OAAO,mBAAQ,CAAC,SAAS,CAAA;IAC3B,CAAC;IAED,MAAM,KAAK,CAAC,yBAAyB,CAAC,CAAA;AACxC,CAAC,CAAA;AAvBY,QAAA,uBAAuB,2BAuBnC","sourcesContent":["import { AMMType } from '../base/vault/single-asset/types.js';\nimport { SupportedProtocol } from '../types.js';\nimport { Protocol } from './chain.js';\n\n/**\n * Enum representing supported staking protocols\n */\nexport enum StakingProtocol {\n Forge = 'Forge',\n Kinetix = 'Kinetix',\n Uniswap = 'Uniswap',\n SushiSwap = 'SushiSwap',\n QuickSwapV3 = 'QuickSwapV3',\n ArthSwap = 'ArthSwap',\n arthswap = 'arthswap',\n Swapsicle = 'Swapsicle',\n Spark = 'Spark',\n Spark32 = 'Spark32',\n}\n\n/**\n * Checks if a given string is a valid StakingProtocol enum value.\n *\n * @param protocol - The protocol string to validate\n * @returns True if the protocol is a valid StakingProtocol, false otherwise\n * @example\n * ```typescript\n * if (isValidStakingProtocol('Uniswap')) {\n * // Handle valid protocol\n * }\n * ```\n */\nexport function isValidStakingProtocol(protocol: string | null | undefined): protocol is StakingProtocol {\n if (!protocol || typeof protocol !== 'string') {\n return false;\n }\n\n const normalizedProtocol = Object.values(StakingProtocol).find(\n (value) => value.toLowerCase() === protocol.toLowerCase(),\n );\n return Boolean(normalizedProtocol);\n}\n\n/**\n * Normalizes a protocol string to its corresponding StakingProtocol enum value.\n *\n * @param protocol - The protocol string to normalize\n * @returns The normalized StakingProtocol enum value\n * @throws Error if the protocol string is invalid\n * @example\n * ```typescript\n * const protocol = normalizeProtocol('uniswap');\n * // Returns: StakingProtocol.Uniswap\n * ```\n */\nexport function normalizeProtocol(protocol: string): StakingProtocol {\n const normalizedProtocol = Object.values(StakingProtocol).find(\n (value) => value.toLowerCase() === protocol.toLowerCase(),\n );\n if (!normalizedProtocol || !isValidStakingProtocol(normalizedProtocol)) {\n throw new Error(`Invalid protocol: ${protocol}`);\n }\n return normalizedProtocol;\n}\n\n/**\n * List of protocols that implement the Algebra interface\n */\n\n\nexport const ALGEBRA_PROTOCOLS = [\n Protocol.QuickSwap,\n Protocol.Wasabee,\n Protocol.Beam,\n Protocol.QuickSwapIntegral,\n Protocol.SilverSwap,\n Protocol.Ocelex,\n Protocol.Henjin,\n Protocol.Camelot,\n Protocol.Ocelex,\n Protocol.Lynex,\n Protocol.Thena,\n Protocol.Hercules,\n Protocol.QuickSwapAlgebra,\n Protocol.Kim,\n Protocol.Swapsicle,\n Protocol.Fenix,\n Protocol.StellaSwap,\n Protocol.Glyph,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Nest,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n];\n\nexport const SHADOW_PROTOCOLS = [Protocol.Shadow, Protocol.MachineX];\n\n/**\n * List of protocols that implement directional Algebra interface\n */\nexport const DIRECTIONAL_ALGEBRA_PROTOCOLS = [Protocol.Camelot, Protocol.Hercules];\n\n/**\n * List of protocols that implement the PoolShark interface\n */\nexport const POOLSHARK_PROTOCOLS = [Protocol.PoolShark];\n\n/**\n * List of protocols that implement the Algebra Integral interface\n */\nexport const ALGEBRA_INTEGRAL_PROTOCOLS = [\n Protocol.Kim,\n Protocol.Wasabee,\n Protocol.Swapsicle,\n Protocol.QuickSwapIntegral,\n Protocol.Fenix,\n Protocol.Henjin,\n Protocol.SilverSwap,\n Protocol.Beam,\n Protocol.Glyph,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Nest,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n];\n\nexport const AERODROME_PROTOCOLS = [Protocol.Aerodrome, Protocol.AerodromeV2, Protocol.Cypher];\n\nexport const ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS = [\n Protocol.QuickSwapIntegral,\n Protocol.Wasabee,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n]\n\n/**\n * List of protocols that implement the Thick interface\n */\nconst THICK_PROTOCOLS = [Protocol.ThickV2];\n\n/**\n * Checks if a protocol implements the Algebra interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra, false otherwise\n */\nexport const isAlgebraProtocol = (protocol: SupportedProtocol) => {\n return ALGEBRA_PROTOCOLS.includes(protocol);\n};\n\n\n/**\n * Checks if a protocol implements the Shadow interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Shadow, false otherwise\n */\nexport const isShadowProtocol = (protocol: SupportedProtocol) => {\n return SHADOW_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the ThickV2 interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements ThickV2, false otherwise\n */\nexport const isThickV2Protocol = (protocol: SupportedProtocol) => {\n return THICK_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the Algebra Direction interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra Direction, false otherwise\n */\nexport const isAlgebraDirectionProtocol = (protocol: SupportedProtocol) => {\n return DIRECTIONAL_ALGEBRA_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the Algebra Integral interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra Integral, false otherwise\n */\nexport const isAlgebraIntegralProtocol = (protocol: SupportedProtocol) => {\n return ALGEBRA_INTEGRAL_PROTOCOLS.includes(protocol);\n};\n\n\n/**\n * Checks if a protocol implements the PoolShark interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements PoolShark, false otherwise\n */\nexport const isPoolSharkProtocol = (protocol: SupportedProtocol) => {\n return POOLSHARK_PROTOCOLS.includes(protocol);\n};\n\n\nexport const isAerodromeVault = (protocol: SupportedProtocol): boolean => {\n return AERODROME_PROTOCOLS.includes(protocol);\n}\n\nexport const isAlgebraIntegralV2Protocol = (protocol: SupportedProtocol): boolean => {\n return ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS.includes(protocol);\n}\n\nexport const getProtcolTypeByAmmType = (ammType: AMMType): Protocol => {\n\n if (ammType === AMMType.Algebra) {\n return Protocol.QuickSwap\n }\n\n if (ammType === AMMType.AlgebraDirectional) {\n return Protocol.Camelot\n }\n\n if (ammType === AMMType.AlgebraIntegral) {\n return Protocol.QuickSwapIntegral\n }\n\n if (ammType === AMMType.UniswapV3) {\n return Protocol.Uniswap\n }\n\n if (ammType === AMMType.Aerodrome) {\n return Protocol.Aerodrome\n }\n\n throw Error('Protocol type not found')\n} \n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processDeployments.js","sourceRoot":"","sources":["../../../src/scripts/processDeployments.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAyCxB,MAAM,qBAAqB,GAAG;IAC5B,gBAAgB;IAChB,UAAU;IACV,gBAAgB;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,YAAY;IACZ,oBAAoB;IACpB,uBAAuB;IACvB,uBAAuB;IACvB,YAAY;IACZ,iBAAiB;IACjB,qBAAqB;IACrB,qBAAqB;IACrB,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,mBAAmB;IACnB,wBAAwB;IACxB,sBAAsB;IACtB,mBAAmB;IACnB,wCAA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C,aAAa,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,SAAS,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;IAEH,yCAAyC;IACzC,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;SACjD,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,YAAY,SAAS,uBAAuB,SAAS,OAAO,CAAC;SAChF,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,MAAM,YAAY,GAAG;;EAErB,YAAY;CACb,CAAC;IACA,YAAE,CAAC,aAAa,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC;IAEjE,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;AACzD,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;IACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC","sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\ntype AbiItem = {\n type: string;\n name?: string;\n inputs?: Array<{ name: string; type: string; indexed?: boolean }>;\n outputs?: Array<{ name: string; type: string }>;\n stateMutability?: string;\n anonymous?: boolean;\n};\n\ninterface Contract {\n address: string;\n abi?: AbiItem[];\n startBlock?: number;\n}\n\ninterface ChainContracts {\n contracts: {\n [key: string]: Contract;\n };\n}\n\ninterface DeploymentInput {\n [chainName: string]: ChainContracts;\n}\n\ninterface TransformedResult {\n abis: {\n [key: string]: AbiItem[];\n };\n chains: {\n [chainName: string]: {\n [contractName: string]: {\n address: string;\n startBlock?: number;\n };\n };\n };\n}\n\nconst WHITELISTED_CONTRACTS = [\n 'BundleRegistry',\n 'GasVault',\n 'KeeperRegistry',\n 'SteerPeriphery',\n 'StrategyRegistry',\n 'VaultRegistry',\n \"Orchestrator\",\n \"BundleRegistry\",\n // 'Helper',\n // 'StakingRewards',\n // 'DefaultProxyAdmin',\n // 'WhitelistRegistry',\n // 'Beacon',\n // 'DynamicJobs',\n // 'QuoterV2Camelot',\n // 'QuoterV2Uniswap',\n // 'QuoterV2',\n // 'TestERC20',\n // 'TestFaucet',\n // 'TestToken',\n // 'TestToken2',\n // 'DummyContract',\n // 'InternalGovernance',\n // 'InternalTimelock',\n // 'NFTDescriptor',\n // 'NonfungibleTokenPositionDescriptor',\n // 'RewardOrchestrator',\n // 'RunnerRegistry',\n // 'RunnerRewarder',\n // 'SteerGovernance',\n // 'SteerToken',\n // 'SwapRouter',\n // 'Timelock',\n // 'TreasuryVester',\n // 'UniswapV3Factory',\n // 'WETH',\n // 'Staking',\n // 'SteerPeriphery Implementation_1',\n 'CamelotMultiPositionLiquidityManager',\n 'QuickSwapUniv3MultiPositionLiquidityManager',\n];\n\nfunction transformContractData(input: DeploymentInput): TransformedResult {\n const result: TransformedResult = {\n abis: {},\n chains: {},\n };\n\n // Process each chain\n Object.keys(input).forEach((chainName) => {\n const chain = input[chainName];\n result.chains[chainName] = {};\n\n // Process each contract in the chain\n Object.keys(chain.contracts).forEach((contractName) => {\n // Skip if contract is not in whitelist\n if (!WHITELISTED_CONTRACTS.includes(contractName)) {\n return;\n }\n\n const contract = chain.contracts[contractName];\n\n // Add contract address and startBlock to chain\n result.chains[chainName][contractName] = {\n address: contract.address,\n ...(contract.startBlock ? { startBlock: contract.startBlock } : {})\n };\n\n // Store ABI by contract name\n // Only store if we haven't seen this contract name before\n if (contract.abi && !result.abis[contractName]) {\n result.abis[contractName] = contract.abi;\n }\n });\n });\n\n return result;\n}\n\n// Read the deployment file\nconst deploymentPath = path.join(\n process.cwd(),\n 'node_modules/@steerprotocol/contracts/deployments/composite_deployment.json'\n);\nconst outputDir = path.join(process.cwd(), 'src/const/deployments');\n\ntry {\n const data = JSON.parse(fs.readFileSync(deploymentPath, 'utf8')) as DeploymentInput;\n const transformed = transformContractData(data);\n\n // Ensure output directory exists\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n\n // Write ABIs file\n const abisContent = `// This file is auto-generated. Do not edit directly.\nexport const abis = ${JSON.stringify(transformed.abis, null, 2)} as const;\n`;\n fs.writeFileSync(path.join(outputDir, 'abis.ts'), abisContent);\n\n // Write individual chain files\n Object.entries(transformed.chains).forEach(([chainName, chainData]) => {\n const chainContent = `// This file is auto-generated. Do not edit directly.\n\ninterface Contract {\n address: string;\n startBlock?: number;\n}\n\nexport const ${chainName}Addresses: Record<string, Contract> = ${JSON.stringify(chainData, null, 2)} as const;\n`;\n fs.writeFileSync(path.join(outputDir, `${chainName}.ts`), chainContent);\n });\n\n // Create index file to export everything\n const chainExports = Object.keys(transformed.chains)\n .map((chainName) => `export { ${chainName}Addresses } from './${chainName}.js';`)\n .join('\\n');\n\n const indexContent = `// This file is auto-generated. Do not edit directly.\nexport { abis } from './abis.js';\n${chainExports}\n`;\n fs.writeFileSync(path.join(outputDir, 'index.ts'), indexContent);\n\n console.log('Successfully generated deployment files');\n} catch (error) {\n console.error('Error processing deployments:', error);\n process.exit(1);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"processDeployments.js","sourceRoot":"","sources":["../../../src/scripts/processDeployments.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAyCxB,MAAM,qBAAqB,GAAG;IAC5B,gBAAgB;IAChB,UAAU;IACV,gBAAgB;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,YAAY;IACZ,cAAc;IACd,gBAAgB;IAChB,YAAY;IACZ,oBAAoB;IACpB,uBAAuB;IACvB,uBAAuB;IACvB,YAAY;IACZ,iBAAiB;IACjB,qBAAqB;IACrB,qBAAqB;IACrB,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,mBAAmB;IACnB,wBAAwB;IACxB,sBAAsB;IACtB,mBAAmB;IACnB,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,CAAC,aAAa,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,SAAS,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;IAEH,yCAAyC;IACzC,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;SACjD,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,YAAY,SAAS,uBAAuB,SAAS,OAAO,CAAC;SAChF,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,MAAM,YAAY,GAAG;;EAErB,YAAY;CACb,CAAC;IACA,YAAE,CAAC,aAAa,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC;IAEjE,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;AACzD,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;IACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC","sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\ntype AbiItem = {\n type: string;\n name?: string;\n inputs?: Array<{ name: string; type: string; indexed?: boolean }>;\n outputs?: Array<{ name: string; type: string }>;\n stateMutability?: string;\n anonymous?: boolean;\n};\n\ninterface Contract {\n address: string;\n abi?: AbiItem[];\n startBlock?: number;\n}\n\ninterface ChainContracts {\n contracts: {\n [key: string]: Contract;\n };\n}\n\ninterface DeploymentInput {\n [chainName: string]: ChainContracts;\n}\n\ninterface TransformedResult {\n abis: {\n [key: string]: AbiItem[];\n };\n chains: {\n [chainName: string]: {\n [contractName: string]: {\n address: string;\n startBlock?: number;\n };\n };\n };\n}\n\nconst WHITELISTED_CONTRACTS = [\n 'BundleRegistry',\n 'GasVault',\n 'KeeperRegistry',\n 'SteerPeriphery',\n 'StrategyRegistry',\n 'VaultRegistry',\n 'FeeManager',\n \"Orchestrator\",\n \"BundleRegistry\",\n // 'Helper',\n // 'StakingRewards',\n // 'DefaultProxyAdmin',\n // 'WhitelistRegistry',\n // 'Beacon',\n // 'DynamicJobs',\n // 'QuoterV2Camelot',\n // 'QuoterV2Uniswap',\n // 'QuoterV2',\n // 'TestERC20',\n // 'TestFaucet',\n // 'TestToken',\n // 'TestToken2',\n // 'DummyContract',\n // 'InternalGovernance',\n // 'InternalTimelock',\n // 'NFTDescriptor',\n // 'NonfungibleTokenPositionDescriptor',\n // 'RewardOrchestrator',\n // 'RunnerRegistry',\n // 'RunnerRewarder',\n // 'SteerGovernance',\n // 'SteerToken',\n // 'SwapRouter',\n // 'Timelock',\n // 'TreasuryVester',\n // 'UniswapV3Factory',\n // 'WETH',\n // 'Staking',\n // 'SteerPeriphery Implementation_1',\n 'CamelotMultiPositionLiquidityManager',\n 'QuickSwapUniv3MultiPositionLiquidityManager',\n];\n\nfunction transformContractData(input: DeploymentInput): TransformedResult {\n const result: TransformedResult = {\n abis: {},\n chains: {},\n };\n\n // Process each chain\n Object.keys(input).forEach((chainName) => {\n const chain = input[chainName];\n result.chains[chainName] = {};\n\n // Process each contract in the chain\n Object.keys(chain.contracts).forEach((contractName) => {\n // Skip if contract is not in whitelist\n if (!WHITELISTED_CONTRACTS.includes(contractName)) {\n return;\n }\n\n const contract = chain.contracts[contractName];\n\n // Add contract address and startBlock to chain\n result.chains[chainName][contractName] = {\n address: contract.address,\n ...(contract.startBlock ? { startBlock: contract.startBlock } : {})\n };\n\n // Store ABI by contract name\n // Only store if we haven't seen this contract name before\n if (contract.abi && !result.abis[contractName]) {\n result.abis[contractName] = contract.abi;\n }\n });\n });\n\n return result;\n}\n\n// Read the deployment file\nconst deploymentPath = path.join(\n process.cwd(),\n 'node_modules/@steerprotocol/contracts/deployments/composite_deployment.json'\n);\nconst outputDir = path.join(process.cwd(), 'src/const/deployments');\n\ntry {\n const data = JSON.parse(fs.readFileSync(deploymentPath, 'utf8')) as DeploymentInput;\n const transformed = transformContractData(data);\n\n // Ensure output directory exists\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n\n // Write ABIs file\n const abisContent = `// This file is auto-generated. Do not edit directly.\nexport const abis = ${JSON.stringify(transformed.abis, null, 2)} as const;\n`;\n fs.writeFileSync(path.join(outputDir, 'abis.ts'), abisContent);\n\n // Write individual chain files\n Object.entries(transformed.chains).forEach(([chainName, chainData]) => {\n const chainContent = `// This file is auto-generated. Do not edit directly.\n\ninterface Contract {\n address: string;\n startBlock?: number;\n}\n\nexport const ${chainName}Addresses: Record<string, Contract> = ${JSON.stringify(chainData, null, 2)} as const;\n`;\n fs.writeFileSync(path.join(outputDir, `${chainName}.ts`), chainContent);\n });\n\n // Create index file to export everything\n const chainExports = Object.keys(transformed.chains)\n .map((chainName) => `export { ${chainName}Addresses } from './${chainName}.js';`)\n .join('\\n');\n\n const indexContent = `// This file is auto-generated. Do not edit directly.\nexport { abis } from './abis.js';\n${chainExports}\n`;\n fs.writeFileSync(path.join(outputDir, 'index.ts'), indexContent);\n\n console.log('Successfully generated deployment files');\n} catch (error) {\n console.error('Error processing deployments:', error);\n process.exit(1);\n}\n"]}
|
|
@@ -55,10 +55,18 @@ export interface PoolFilter {
|
|
|
55
55
|
chainId?: number;
|
|
56
56
|
/** Protocol to filter pools by */
|
|
57
57
|
protocol?: Protocol;
|
|
58
|
+
/** Exact pool address/id to look up */
|
|
59
|
+
poolAddress?: string;
|
|
58
60
|
/** Minimum volume in USD to filter pools */
|
|
59
61
|
minVolumeUSD?: number;
|
|
60
62
|
/** Token address to find pools containing this token */
|
|
61
63
|
tokenAddress?: string;
|
|
64
|
+
/** Multiple token addresses to find pools for */
|
|
65
|
+
tokenAddresses?: string[];
|
|
66
|
+
/** Token symbol to find pools containing this token */
|
|
67
|
+
tokenSymbol?: string;
|
|
68
|
+
/** Multiple token symbols to find pools for */
|
|
69
|
+
tokenSymbols?: string[];
|
|
62
70
|
/** Maximum number of pools to return */
|
|
63
71
|
limit?: number;
|
|
64
72
|
}
|
|
@@ -129,6 +137,12 @@ export declare class PoolClient extends SubgraphClient {
|
|
|
129
137
|
getMetrics(): {
|
|
130
138
|
apiCallCount: number;
|
|
131
139
|
};
|
|
140
|
+
private normalizeAddress;
|
|
141
|
+
private normalizeSymbol;
|
|
142
|
+
private dedupePools;
|
|
143
|
+
private filterPoolsBySymbols;
|
|
144
|
+
private applyPoolSearchResultFilters;
|
|
145
|
+
private searchPoolsBySymbols;
|
|
132
146
|
/**
|
|
133
147
|
* Fetches data from GraphQL endpoint with retry logic for rate limits
|
|
134
148
|
*
|
|
@@ -253,5 +267,13 @@ export declare class PoolClient extends SubgraphClient {
|
|
|
253
267
|
* ```
|
|
254
268
|
*/
|
|
255
269
|
filterValidPools(pools: PoolData[]): PoolData[];
|
|
270
|
+
/**
|
|
271
|
+
* Searches pools using exact-address lookups where supported and local symbol
|
|
272
|
+
* filtering as a portable fallback.
|
|
273
|
+
*
|
|
274
|
+
* Symbol-based matching is best-effort because not every downstream AMM
|
|
275
|
+
* subgraph exposes portable nested token-symbol filters.
|
|
276
|
+
*/
|
|
277
|
+
searchPools(filter: PoolFilter): Promise<SteerResponse<GraphQLPoolData[]>>;
|
|
256
278
|
}
|
|
257
279
|
//# sourceMappingURL=PoolClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PoolClient.d.ts","sourceRoot":"","sources":["../../../src/base/PoolClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,QAAQ,EAET,MAAM,mBAAmB,CAAC;AAQ3B;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,MAAM,EAA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IACU,WAAW,CACtB,KAAK,EAAE,MAAM,YAAM,EACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC,CAAC;IA8C5C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACU,WAAW,CACtB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,aAAa,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;IAqCjD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACU,wBAAwB,CACnC,cAAc,EAAE,MAAM,EAAE,EACxB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAAW,GACrB,OAAO,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC,CAAC;IAqG5C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACU,kBAAkB,CAC7B,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC,CAAC;IA4C5C;;;;;;;;;;;OAWG;IACI,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE;IA8BtD;;;;;;OAMG;IACU,WAAW,CACtB,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC,CAAC;CA8F7C"}
|
|
@@ -141,11 +141,18 @@ export interface VaultFilter {
|
|
|
141
141
|
protocol?: string;
|
|
142
142
|
isActive?: boolean;
|
|
143
143
|
beaconName?: string;
|
|
144
|
+
poolAddress?: string;
|
|
145
|
+
vaultAddress?: string;
|
|
146
|
+
tokenAddress?: string;
|
|
147
|
+
tokenAddresses?: string[];
|
|
148
|
+
tokenSymbol?: string;
|
|
149
|
+
tokenSymbols?: string[];
|
|
144
150
|
}
|
|
145
151
|
export interface ApiVaultFilter {
|
|
146
152
|
chainId?: number;
|
|
147
153
|
isActive?: boolean;
|
|
148
154
|
beaconName?: string;
|
|
155
|
+
pool?: string;
|
|
149
156
|
}
|
|
150
157
|
export interface TokenFilter {
|
|
151
158
|
chainId?: number;
|
|
@@ -298,6 +305,11 @@ export declare class VaultClient extends SubgraphClient {
|
|
|
298
305
|
private buildApiVaultFilter;
|
|
299
306
|
private vaultMatchesProtocolFilter;
|
|
300
307
|
private applyProtocolFilter;
|
|
308
|
+
private normalizeAddress;
|
|
309
|
+
private normalizeSymbol;
|
|
310
|
+
private matchesAnyAddress;
|
|
311
|
+
private matchesAnySymbol;
|
|
312
|
+
private filterVaultNodes;
|
|
301
313
|
/**
|
|
302
314
|
* Gets vaults with pagination support
|
|
303
315
|
* Fetches ALL data from both API (database) and subgraph in parallel, merges without duplicates, then paginates
|
|
@@ -443,6 +455,14 @@ export declare class VaultClient extends SubgraphClient {
|
|
|
443
455
|
* @returns Promise resolving to all pools data
|
|
444
456
|
*/
|
|
445
457
|
getAllPools(filter?: PoolFilter, batchSize?: number): Promise<SteerResponse<PoolNode[]>>;
|
|
458
|
+
/**
|
|
459
|
+
* Searches vaults by combining verified API-supported filters with local
|
|
460
|
+
* filtering over the merged vault result set for unsupported server-side fields.
|
|
461
|
+
*/
|
|
462
|
+
searchVaults(filter?: VaultFilter): Promise<SteerResponse<VaultNode[]>>;
|
|
463
|
+
getVaultByAddress(vaultAddress: string, filter?: VaultFilter): Promise<SteerResponse<VaultNode | null>>;
|
|
464
|
+
getVaultsForPool(poolAddress: string, filter?: VaultFilter): Promise<SteerResponse<VaultNode[]>>;
|
|
465
|
+
getVaultsForToken(tokenAddressOrSymbol: string, filter?: VaultFilter): Promise<SteerResponse<VaultNode[]>>;
|
|
446
466
|
/**
|
|
447
467
|
* Gets APR data for vaults from the Steer Finance API
|
|
448
468
|
* @param filter - Filter containing chainId and protocol
|