@across-protocol/sdk 3.0.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/LICENSE +661 -0
- package/README.md +116 -0
- package/dist/cjs/apiClient/abstractClient.d.ts +13 -0
- package/dist/cjs/apiClient/abstractClient.js +17 -0
- package/dist/cjs/apiClient/abstractClient.js.map +1 -0
- package/dist/cjs/apiClient/index.d.ts +2 -0
- package/dist/cjs/apiClient/index.js +11 -0
- package/dist/cjs/apiClient/index.js.map +1 -0
- package/dist/cjs/apiClient/mockedClient.d.ts +11 -0
- package/dist/cjs/apiClient/mockedClient.js +60 -0
- package/dist/cjs/apiClient/mockedClient.js.map +1 -0
- package/dist/cjs/apiClient/productionClient.d.ts +10 -0
- package/dist/cjs/apiClient/productionClient.js +110 -0
- package/dist/cjs/apiClient/productionClient.js.map +1 -0
- package/dist/cjs/apiClient/types.d.ts +44 -0
- package/dist/cjs/apiClient/types.js +3 -0
- package/dist/cjs/apiClient/types.js.map +1 -0
- package/dist/cjs/caching/Arweave/ArweaveClient.d.ts +20 -0
- package/dist/cjs/caching/Arweave/ArweaveClient.js +218 -0
- package/dist/cjs/caching/Arweave/ArweaveClient.js.map +1 -0
- package/dist/cjs/caching/Arweave/index.d.ts +1 -0
- package/dist/cjs/caching/Arweave/index.js +5 -0
- package/dist/cjs/caching/Arweave/index.js.map +1 -0
- package/dist/cjs/caching/IPFS/PinataIPFSClient.d.ts +11 -0
- package/dist/cjs/caching/IPFS/PinataIPFSClient.js +67 -0
- package/dist/cjs/caching/IPFS/PinataIPFSClient.js.map +1 -0
- package/dist/cjs/caching/IPFS/index.d.ts +1 -0
- package/dist/cjs/caching/IPFS/index.js +5 -0
- package/dist/cjs/caching/IPFS/index.js.map +1 -0
- package/dist/cjs/caching/index.d.ts +2 -0
- package/dist/cjs/caching/index.js +6 -0
- package/dist/cjs/caching/index.js.map +1 -0
- package/dist/cjs/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts +66 -0
- package/dist/cjs/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js +377 -0
- package/dist/cjs/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js.map +1 -0
- package/dist/cjs/clients/AcrossConfigStoreClient/index.d.ts +1 -0
- package/dist/cjs/clients/AcrossConfigStoreClient/index.js +5 -0
- package/dist/cjs/clients/AcrossConfigStoreClient/index.js.map +1 -0
- package/dist/cjs/clients/BaseAbstractClient.d.ts +22 -0
- package/dist/cjs/clients/BaseAbstractClient.js +76 -0
- package/dist/cjs/clients/BaseAbstractClient.js.map +1 -0
- package/dist/cjs/clients/HubPoolClient.d.ts +111 -0
- package/dist/cjs/clients/HubPoolClient.js +758 -0
- package/dist/cjs/clients/HubPoolClient.js.map +1 -0
- package/dist/cjs/clients/SpokePoolClient.d.ts +117 -0
- package/dist/cjs/clients/SpokePoolClient.js +553 -0
- package/dist/cjs/clients/SpokePoolClient.js.map +1 -0
- package/dist/cjs/clients/index.d.ts +4 -0
- package/dist/cjs/clients/index.js +14 -0
- package/dist/cjs/clients/index.js.map +1 -0
- package/dist/cjs/clients/mocks/MockConfigStoreClient.d.ts +20 -0
- package/dist/cjs/clients/mocks/MockConfigStoreClient.js +121 -0
- package/dist/cjs/clients/mocks/MockConfigStoreClient.js.map +1 -0
- package/dist/cjs/clients/mocks/MockEvents.d.ts +27 -0
- package/dist/cjs/clients/mocks/MockEvents.js +117 -0
- package/dist/cjs/clients/mocks/MockEvents.js.map +1 -0
- package/dist/cjs/clients/mocks/MockHubPoolClient.d.ts +35 -0
- package/dist/cjs/clients/mocks/MockHubPoolClient.js +222 -0
- package/dist/cjs/clients/mocks/MockHubPoolClient.js.map +1 -0
- package/dist/cjs/clients/mocks/MockSpokePoolClient.d.ts +38 -0
- package/dist/cjs/clients/mocks/MockSpokePoolClient.js +319 -0
- package/dist/cjs/clients/mocks/MockSpokePoolClient.js.map +1 -0
- package/dist/cjs/clients/mocks/index.d.ts +3 -0
- package/dist/cjs/clients/mocks/index.js +7 -0
- package/dist/cjs/clients/mocks/index.js.map +1 -0
- package/dist/cjs/coingecko/Coingecko.d.ts +40 -0
- package/dist/cjs/coingecko/Coingecko.js +277 -0
- package/dist/cjs/coingecko/Coingecko.js.map +1 -0
- package/dist/cjs/coingecko/index.d.ts +1 -0
- package/dist/cjs/coingecko/index.js +5 -0
- package/dist/cjs/coingecko/index.js.map +1 -0
- package/dist/cjs/constants.d.ts +18 -0
- package/dist/cjs/constants.js +27 -0
- package/dist/cjs/constants.js.map +1 -0
- package/dist/cjs/contracts/acrossConfigStore.d.ts +57 -0
- package/dist/cjs/contracts/acrossConfigStore.js +65 -0
- package/dist/cjs/contracts/acrossConfigStore.js.map +1 -0
- package/dist/cjs/contracts/hubPool.d.ts +17 -0
- package/dist/cjs/contracts/hubPool.js +61 -0
- package/dist/cjs/contracts/hubPool.js.map +1 -0
- package/dist/cjs/contracts/index.d.ts +2 -0
- package/dist/cjs/contracts/index.js +7 -0
- package/dist/cjs/contracts/index.js.map +1 -0
- package/dist/cjs/contracts/utils.d.ts +15 -0
- package/dist/cjs/contracts/utils.js +40 -0
- package/dist/cjs/contracts/utils.js.map +1 -0
- package/dist/cjs/gasPriceOracle/adapters/arbitrum.d.ts +3 -0
- package/dist/cjs/gasPriceOracle/adapters/arbitrum.js +25 -0
- package/dist/cjs/gasPriceOracle/adapters/arbitrum.js.map +1 -0
- package/dist/cjs/gasPriceOracle/adapters/ethereum.d.ts +4 -0
- package/dist/cjs/gasPriceOracle/adapters/ethereum.js +46 -0
- package/dist/cjs/gasPriceOracle/adapters/ethereum.js.map +1 -0
- package/dist/cjs/gasPriceOracle/adapters/index.d.ts +3 -0
- package/dist/cjs/gasPriceOracle/adapters/index.js +7 -0
- package/dist/cjs/gasPriceOracle/adapters/index.js.map +1 -0
- package/dist/cjs/gasPriceOracle/adapters/polygon.d.ts +3 -0
- package/dist/cjs/gasPriceOracle/adapters/polygon.js +77 -0
- package/dist/cjs/gasPriceOracle/adapters/polygon.js.map +1 -0
- package/dist/cjs/gasPriceOracle/index.d.ts +2 -0
- package/dist/cjs/gasPriceOracle/index.js +6 -0
- package/dist/cjs/gasPriceOracle/index.js.map +1 -0
- package/dist/cjs/gasPriceOracle/oracle.d.ts +3 -0
- package/dist/cjs/gasPriceOracle/oracle.js +45 -0
- package/dist/cjs/gasPriceOracle/oracle.js.map +1 -0
- package/dist/cjs/gasPriceOracle/types.d.ts +8 -0
- package/dist/cjs/gasPriceOracle/types.js +3 -0
- package/dist/cjs/gasPriceOracle/types.js.map +1 -0
- package/dist/cjs/gasPriceOracle/util.d.ts +2 -0
- package/dist/cjs/gasPriceOracle/util.js +8 -0
- package/dist/cjs/gasPriceOracle/util.js.map +1 -0
- package/dist/cjs/index.d.ts +15 -0
- package/dist/cjs/index.js +20 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/interfaces/Bridge.d.ts +9 -0
- package/dist/cjs/interfaces/Bridge.js +3 -0
- package/dist/cjs/interfaces/Bridge.js.map +1 -0
- package/dist/cjs/interfaces/CachingMechanism.d.ts +5 -0
- package/dist/cjs/interfaces/CachingMechanism.js +3 -0
- package/dist/cjs/interfaces/CachingMechanism.js.map +1 -0
- package/dist/cjs/interfaces/Common.d.ts +10 -0
- package/dist/cjs/interfaces/Common.js +3 -0
- package/dist/cjs/interfaces/Common.js.map +1 -0
- package/dist/cjs/interfaces/ConfigStore.d.ts +81 -0
- package/dist/cjs/interfaces/ConfigStore.js +3 -0
- package/dist/cjs/interfaces/ConfigStore.js.map +1 -0
- package/dist/cjs/interfaces/Error.d.ts +5 -0
- package/dist/cjs/interfaces/Error.js +3 -0
- package/dist/cjs/interfaces/Error.js.map +1 -0
- package/dist/cjs/interfaces/HubPool.d.ts +98 -0
- package/dist/cjs/interfaces/HubPool.js +3 -0
- package/dist/cjs/interfaces/HubPool.js.map +1 -0
- package/dist/cjs/interfaces/SpokePool.d.ts +103 -0
- package/dist/cjs/interfaces/SpokePool.js +16 -0
- package/dist/cjs/interfaces/SpokePool.js.map +1 -0
- package/dist/cjs/interfaces/TypedData.d.ts +19 -0
- package/dist/cjs/interfaces/TypedData.js +3 -0
- package/dist/cjs/interfaces/TypedData.js.map +1 -0
- package/dist/cjs/interfaces/index.d.ts +8 -0
- package/dist/cjs/interfaces/index.js +12 -0
- package/dist/cjs/interfaces/index.js.map +1 -0
- package/dist/cjs/lpFeeCalculator/index.d.ts +1 -0
- package/dist/cjs/lpFeeCalculator/index.js +5 -0
- package/dist/cjs/lpFeeCalculator/index.js.map +1 -0
- package/dist/cjs/lpFeeCalculator/lpFeeCalculator.d.ts +19 -0
- package/dist/cjs/lpFeeCalculator/lpFeeCalculator.js +79 -0
- package/dist/cjs/lpFeeCalculator/lpFeeCalculator.js.map +1 -0
- package/dist/cjs/lpFeeCalculator/rateModel.d.ts +28 -0
- package/dist/cjs/lpFeeCalculator/rateModel.js +103 -0
- package/dist/cjs/lpFeeCalculator/rateModel.js.map +1 -0
- package/dist/cjs/merkleDistributor/MerkleDistributor.d.ts +8 -0
- package/dist/cjs/merkleDistributor/MerkleDistributor.js +25 -0
- package/dist/cjs/merkleDistributor/MerkleDistributor.js.map +1 -0
- package/dist/cjs/merkleDistributor/index.d.ts +2 -0
- package/dist/cjs/merkleDistributor/index.js +6 -0
- package/dist/cjs/merkleDistributor/index.js.map +1 -0
- package/dist/cjs/merkleDistributor/model/Distribution.d.ts +17 -0
- package/dist/cjs/merkleDistributor/model/Distribution.js +3 -0
- package/dist/cjs/merkleDistributor/model/Distribution.js.map +1 -0
- package/dist/cjs/merkleDistributor/model/index.d.ts +1 -0
- package/dist/cjs/merkleDistributor/model/index.js +5 -0
- package/dist/cjs/merkleDistributor/model/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/pool/TransactionManager.d.ts +12 -0
- package/dist/cjs/pool/TransactionManager.js +121 -0
- package/dist/cjs/pool/TransactionManager.js.map +1 -0
- package/dist/cjs/pool/index.d.ts +1 -0
- package/dist/cjs/pool/index.js +5 -0
- package/dist/cjs/pool/index.js.map +1 -0
- package/dist/cjs/pool/poolClient.d.ts +232 -0
- package/dist/cjs/pool/poolClient.js +869 -0
- package/dist/cjs/pool/poolClient.js.map +1 -0
- package/dist/cjs/priceClient/adapters/acrossApi.d.ts +13 -0
- package/dist/cjs/priceClient/adapters/acrossApi.js +48 -0
- package/dist/cjs/priceClient/adapters/acrossApi.js.map +1 -0
- package/dist/cjs/priceClient/adapters/baseAdapter.d.ts +17 -0
- package/dist/cjs/priceClient/adapters/baseAdapter.js +81 -0
- package/dist/cjs/priceClient/adapters/baseAdapter.js.map +1 -0
- package/dist/cjs/priceClient/adapters/coingecko.d.ts +14 -0
- package/dist/cjs/priceClient/adapters/coingecko.js +75 -0
- package/dist/cjs/priceClient/adapters/coingecko.js.map +1 -0
- package/dist/cjs/priceClient/adapters/defiLlama.d.ts +17 -0
- package/dist/cjs/priceClient/adapters/defiLlama.js +95 -0
- package/dist/cjs/priceClient/adapters/defiLlama.js.map +1 -0
- package/dist/cjs/priceClient/adapters/index.d.ts +3 -0
- package/dist/cjs/priceClient/adapters/index.js +8 -0
- package/dist/cjs/priceClient/adapters/index.js.map +1 -0
- package/dist/cjs/priceClient/index.d.ts +2 -0
- package/dist/cjs/priceClient/index.js +7 -0
- package/dist/cjs/priceClient/index.js.map +1 -0
- package/dist/cjs/priceClient/priceClient.d.ts +32 -0
- package/dist/cjs/priceClient/priceClient.js +197 -0
- package/dist/cjs/priceClient/priceClient.js.map +1 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.d.ts +29 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js +62 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/factory.d.ts +151 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/factory.js +35 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/factory.js.map +1 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/index.d.ts +3 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/index.js +7 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/index.js.map +1 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/polygon.d.ts +152 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/polygon.js +43 -0
- package/dist/cjs/relayFeeCalculator/chain-queries/polygon.js.map +1 -0
- package/dist/cjs/relayFeeCalculator/index.d.ts +2 -0
- package/dist/cjs/relayFeeCalculator/index.js +6 -0
- package/dist/cjs/relayFeeCalculator/index.js.map +1 -0
- package/dist/cjs/relayFeeCalculator/relayFeeCalculator.d.ts +231 -0
- package/dist/cjs/relayFeeCalculator/relayFeeCalculator.js +224 -0
- package/dist/cjs/relayFeeCalculator/relayFeeCalculator.js.map +1 -0
- package/dist/cjs/typechain.d.ts +17 -0
- package/dist/cjs/typechain.js +20 -0
- package/dist/cjs/typechain.js.map +1 -0
- package/dist/cjs/typeguards/error.d.ts +3 -0
- package/dist/cjs/typeguards/error.js +11 -0
- package/dist/cjs/typeguards/error.js.map +1 -0
- package/dist/cjs/typeguards/index.d.ts +1 -0
- package/dist/cjs/typeguards/index.js +5 -0
- package/dist/cjs/typeguards/index.js.map +1 -0
- package/dist/cjs/utils/AddressUtils.d.ts +2 -0
- package/dist/cjs/utils/AddressUtils.js +24 -0
- package/dist/cjs/utils/AddressUtils.js.map +1 -0
- package/dist/cjs/utils/ArrayUtils.d.ts +12 -0
- package/dist/cjs/utils/ArrayUtils.js +125 -0
- package/dist/cjs/utils/ArrayUtils.js.map +1 -0
- package/dist/cjs/utils/BigNumberUtils.d.ts +8 -0
- package/dist/cjs/utils/BigNumberUtils.js +26 -0
- package/dist/cjs/utils/BigNumberUtils.js.map +1 -0
- package/dist/cjs/utils/BlockExplorerUtils.d.ts +3 -0
- package/dist/cjs/utils/BlockExplorerUtils.js +52 -0
- package/dist/cjs/utils/BlockExplorerUtils.js.map +1 -0
- package/dist/cjs/utils/BlockUtils.d.ts +28 -0
- package/dist/cjs/utils/BlockUtils.js +251 -0
- package/dist/cjs/utils/BlockUtils.js.map +1 -0
- package/dist/cjs/utils/BundleUtils.d.ts +5 -0
- package/dist/cjs/utils/BundleUtils.js +62 -0
- package/dist/cjs/utils/BundleUtils.js.map +1 -0
- package/dist/cjs/utils/CachingUtils.d.ts +5 -0
- package/dist/cjs/utils/CachingUtils.js +59 -0
- package/dist/cjs/utils/CachingUtils.js.map +1 -0
- package/dist/cjs/utils/DeploymentUtils.d.ts +1 -0
- package/dist/cjs/utils/DeploymentUtils.js +8 -0
- package/dist/cjs/utils/DeploymentUtils.js.map +1 -0
- package/dist/cjs/utils/DepositUtils.d.ts +19 -0
- package/dist/cjs/utils/DepositUtils.js +107 -0
- package/dist/cjs/utils/DepositUtils.js.map +1 -0
- package/dist/cjs/utils/EventUtils.d.ts +18 -0
- package/dist/cjs/utils/EventUtils.js +169 -0
- package/dist/cjs/utils/EventUtils.js.map +1 -0
- package/dist/cjs/utils/FlowUtils.d.ts +7 -0
- package/dist/cjs/utils/FlowUtils.js +42 -0
- package/dist/cjs/utils/FlowUtils.js.map +1 -0
- package/dist/cjs/utils/FormattingUtils.d.ts +15 -0
- package/dist/cjs/utils/FormattingUtils.js +107 -0
- package/dist/cjs/utils/FormattingUtils.js.map +1 -0
- package/dist/cjs/utils/IPFSUtils.d.ts +4 -0
- package/dist/cjs/utils/IPFSUtils.js +48 -0
- package/dist/cjs/utils/IPFSUtils.js.map +1 -0
- package/dist/cjs/utils/JSONUtils.d.ts +4 -0
- package/dist/cjs/utils/JSONUtils.js +53 -0
- package/dist/cjs/utils/JSONUtils.js.map +1 -0
- package/dist/cjs/utils/LogUtils.d.ts +14 -0
- package/dist/cjs/utils/LogUtils.js +18 -0
- package/dist/cjs/utils/LogUtils.js.map +1 -0
- package/dist/cjs/utils/Multicall.d.ts +13 -0
- package/dist/cjs/utils/Multicall.js +73 -0
- package/dist/cjs/utils/Multicall.js.map +1 -0
- package/dist/cjs/utils/NetworkUtils.d.ts +10 -0
- package/dist/cjs/utils/NetworkUtils.js +70 -0
- package/dist/cjs/utils/NetworkUtils.js.map +1 -0
- package/dist/cjs/utils/NumberUtils.d.ts +2 -0
- package/dist/cjs/utils/NumberUtils.js +12 -0
- package/dist/cjs/utils/NumberUtils.js.map +1 -0
- package/dist/cjs/utils/ObjectUtils.d.ts +5 -0
- package/dist/cjs/utils/ObjectUtils.js +65 -0
- package/dist/cjs/utils/ObjectUtils.js.map +1 -0
- package/dist/cjs/utils/ReviverUtils.d.ts +3 -0
- package/dist/cjs/utils/ReviverUtils.js +23 -0
- package/dist/cjs/utils/ReviverUtils.js.map +1 -0
- package/dist/cjs/utils/SpokeUtils.d.ts +16 -0
- package/dist/cjs/utils/SpokeUtils.js +299 -0
- package/dist/cjs/utils/SpokeUtils.js.map +1 -0
- package/dist/cjs/utils/TimeUtils.d.ts +1 -0
- package/dist/cjs/utils/TimeUtils.js +8 -0
- package/dist/cjs/utils/TimeUtils.js.map +1 -0
- package/dist/cjs/utils/TokenUtils.d.ts +303 -0
- package/dist/cjs/utils/TokenUtils.js +74 -0
- package/dist/cjs/utils/TokenUtils.js.map +1 -0
- package/dist/cjs/utils/TypeGuards.d.ts +3 -0
- package/dist/cjs/utils/TypeGuards.js +16 -0
- package/dist/cjs/utils/TypeGuards.js.map +1 -0
- package/dist/cjs/utils/TypeUtils.d.ts +5 -0
- package/dist/cjs/utils/TypeUtils.js +3 -0
- package/dist/cjs/utils/TypeUtils.js.map +1 -0
- package/dist/cjs/utils/V3Utils.d.ts +4 -0
- package/dist/cjs/utils/V3Utils.js +15 -0
- package/dist/cjs/utils/V3Utils.js.map +1 -0
- package/dist/cjs/utils/ValidatorUtils.d.ts +2 -0
- package/dist/cjs/utils/ValidatorUtils.js +39 -0
- package/dist/cjs/utils/ValidatorUtils.js.map +1 -0
- package/dist/cjs/utils/abi/contracts/Multicall3.json +440 -0
- package/dist/cjs/utils/abi/index.d.ts +3 -0
- package/dist/cjs/utils/abi/index.js +31 -0
- package/dist/cjs/utils/abi/index.js.map +1 -0
- package/dist/cjs/utils/common.d.ts +79 -0
- package/dist/cjs/utils/common.js +220 -0
- package/dist/cjs/utils/common.js.map +1 -0
- package/dist/cjs/utils/index.d.ts +29 -0
- package/dist/cjs/utils/index.js +33 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/esm/apiClient/abstractClient.d.ts +66 -0
- package/dist/esm/apiClient/abstractClient.js +31 -0
- package/dist/esm/apiClient/abstractClient.js.map +1 -0
- package/dist/esm/apiClient/index.d.ts +2 -0
- package/dist/esm/apiClient/index.js +3 -0
- package/dist/esm/apiClient/index.js.map +1 -0
- package/dist/esm/apiClient/mockedClient.d.ts +24 -0
- package/dist/esm/apiClient/mockedClient.js +69 -0
- package/dist/esm/apiClient/mockedClient.js.map +1 -0
- package/dist/esm/apiClient/productionClient.d.ts +16 -0
- package/dist/esm/apiClient/productionClient.js +114 -0
- package/dist/esm/apiClient/productionClient.js.map +1 -0
- package/dist/esm/apiClient/types.d.ts +44 -0
- package/dist/esm/apiClient/types.js +2 -0
- package/dist/esm/apiClient/types.js.map +1 -0
- package/dist/esm/caching/Arweave/ArweaveClient.d.ts +61 -0
- package/dist/esm/caching/Arweave/ArweaveClient.js +265 -0
- package/dist/esm/caching/Arweave/ArweaveClient.js.map +1 -0
- package/dist/esm/caching/Arweave/index.d.ts +1 -0
- package/dist/esm/caching/Arweave/index.js +2 -0
- package/dist/esm/caching/Arweave/index.js.map +1 -0
- package/dist/esm/caching/IPFS/PinataIPFSClient.d.ts +37 -0
- package/dist/esm/caching/IPFS/PinataIPFSClient.js +81 -0
- package/dist/esm/caching/IPFS/PinataIPFSClient.js.map +1 -0
- package/dist/esm/caching/IPFS/index.d.ts +1 -0
- package/dist/esm/caching/IPFS/index.js +2 -0
- package/dist/esm/caching/IPFS/index.js.map +1 -0
- package/dist/esm/caching/index.d.ts +2 -0
- package/dist/esm/caching/index.js +3 -0
- package/dist/esm/caching/index.js.map +1 -0
- package/dist/esm/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts +108 -0
- package/dist/esm/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js +467 -0
- package/dist/esm/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js.map +1 -0
- package/dist/esm/clients/AcrossConfigStoreClient/index.d.ts +1 -0
- package/dist/esm/clients/AcrossConfigStoreClient/index.js +2 -0
- package/dist/esm/clients/AcrossConfigStoreClient/index.js.map +1 -0
- package/dist/esm/clients/BaseAbstractClient.d.ts +51 -0
- package/dist/esm/clients/BaseAbstractClient.js +101 -0
- package/dist/esm/clients/BaseAbstractClient.js.map +1 -0
- package/dist/esm/clients/HubPoolClient.d.ts +134 -0
- package/dist/esm/clients/HubPoolClient.js +862 -0
- package/dist/esm/clients/HubPoolClient.js.map +1 -0
- package/dist/esm/clients/SpokePoolClient.d.ts +318 -0
- package/dist/esm/clients/SpokePoolClient.js +780 -0
- package/dist/esm/clients/SpokePoolClient.js.map +1 -0
- package/dist/esm/clients/index.d.ts +4 -0
- package/dist/esm/clients/index.js +6 -0
- package/dist/esm/clients/index.js.map +1 -0
- package/dist/esm/clients/mocks/MockConfigStoreClient.d.ts +20 -0
- package/dist/esm/clients/mocks/MockConfigStoreClient.js +122 -0
- package/dist/esm/clients/mocks/MockConfigStoreClient.js.map +1 -0
- package/dist/esm/clients/mocks/MockEvents.d.ts +34 -0
- package/dist/esm/clients/mocks/MockEvents.js +126 -0
- package/dist/esm/clients/mocks/MockEvents.js.map +1 -0
- package/dist/esm/clients/mocks/MockHubPoolClient.d.ts +35 -0
- package/dist/esm/clients/mocks/MockHubPoolClient.js +223 -0
- package/dist/esm/clients/mocks/MockHubPoolClient.js.map +1 -0
- package/dist/esm/clients/mocks/MockSpokePoolClient.d.ts +38 -0
- package/dist/esm/clients/mocks/MockSpokePoolClient.js +322 -0
- package/dist/esm/clients/mocks/MockSpokePoolClient.js.map +1 -0
- package/dist/esm/clients/mocks/index.d.ts +3 -0
- package/dist/esm/clients/mocks/index.js +4 -0
- package/dist/esm/clients/mocks/index.js.map +1 -0
- package/dist/esm/coingecko/Coingecko.d.ts +40 -0
- package/dist/esm/coingecko/Coingecko.js +283 -0
- package/dist/esm/coingecko/Coingecko.js.map +1 -0
- package/dist/esm/coingecko/index.d.ts +1 -0
- package/dist/esm/coingecko/index.js +2 -0
- package/dist/esm/coingecko/index.js.map +1 -0
- package/dist/esm/constants.d.ts +29 -0
- package/dist/esm/constants.js +34 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/contracts/acrossConfigStore.d.ts +57 -0
- package/dist/esm/contracts/acrossConfigStore.js +62 -0
- package/dist/esm/contracts/acrossConfigStore.js.map +1 -0
- package/dist/esm/contracts/hubPool.d.ts +17 -0
- package/dist/esm/contracts/hubPool.js +55 -0
- package/dist/esm/contracts/hubPool.js.map +1 -0
- package/dist/esm/contracts/index.d.ts +2 -0
- package/dist/esm/contracts/index.js +5 -0
- package/dist/esm/contracts/index.js.map +1 -0
- package/dist/esm/contracts/utils.d.ts +23 -0
- package/dist/esm/contracts/utils.js +38 -0
- package/dist/esm/contracts/utils.js.map +1 -0
- package/dist/esm/gasPriceOracle/adapters/arbitrum.d.ts +3 -0
- package/dist/esm/gasPriceOracle/adapters/arbitrum.js +25 -0
- package/dist/esm/gasPriceOracle/adapters/arbitrum.js.map +1 -0
- package/dist/esm/gasPriceOracle/adapters/ethereum.d.ts +4 -0
- package/dist/esm/gasPriceOracle/adapters/ethereum.js +41 -0
- package/dist/esm/gasPriceOracle/adapters/ethereum.js.map +1 -0
- package/dist/esm/gasPriceOracle/adapters/index.d.ts +3 -0
- package/dist/esm/gasPriceOracle/adapters/index.js +4 -0
- package/dist/esm/gasPriceOracle/adapters/index.js.map +1 -0
- package/dist/esm/gasPriceOracle/adapters/polygon.d.ts +3 -0
- package/dist/esm/gasPriceOracle/adapters/polygon.js +78 -0
- package/dist/esm/gasPriceOracle/adapters/polygon.js.map +1 -0
- package/dist/esm/gasPriceOracle/index.d.ts +2 -0
- package/dist/esm/gasPriceOracle/index.js +2 -0
- package/dist/esm/gasPriceOracle/index.js.map +1 -0
- package/dist/esm/gasPriceOracle/oracle.d.ts +10 -0
- package/dist/esm/gasPriceOracle/oracle.js +48 -0
- package/dist/esm/gasPriceOracle/oracle.js.map +1 -0
- package/dist/esm/gasPriceOracle/types.d.ts +8 -0
- package/dist/esm/gasPriceOracle/types.js +2 -0
- package/dist/esm/gasPriceOracle/types.js.map +1 -0
- package/dist/esm/gasPriceOracle/util.d.ts +2 -0
- package/dist/esm/gasPriceOracle/util.js +4 -0
- package/dist/esm/gasPriceOracle/util.js.map +1 -0
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.js +31 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/interfaces/Bridge.d.ts +9 -0
- package/dist/esm/interfaces/Bridge.js +2 -0
- package/dist/esm/interfaces/Bridge.js.map +1 -0
- package/dist/esm/interfaces/CachingMechanism.d.ts +26 -0
- package/dist/esm/interfaces/CachingMechanism.js +2 -0
- package/dist/esm/interfaces/CachingMechanism.js.map +1 -0
- package/dist/esm/interfaces/Common.d.ts +10 -0
- package/dist/esm/interfaces/Common.js +2 -0
- package/dist/esm/interfaces/Common.js.map +1 -0
- package/dist/esm/interfaces/ConfigStore.d.ts +157 -0
- package/dist/esm/interfaces/ConfigStore.js +2 -0
- package/dist/esm/interfaces/ConfigStore.js.map +1 -0
- package/dist/esm/interfaces/Error.d.ts +5 -0
- package/dist/esm/interfaces/Error.js +2 -0
- package/dist/esm/interfaces/Error.js.map +1 -0
- package/dist/esm/interfaces/HubPool.d.ts +98 -0
- package/dist/esm/interfaces/HubPool.js +2 -0
- package/dist/esm/interfaces/HubPool.js.map +1 -0
- package/dist/esm/interfaces/SpokePool.d.ts +103 -0
- package/dist/esm/interfaces/SpokePool.js +13 -0
- package/dist/esm/interfaces/SpokePool.js.map +1 -0
- package/dist/esm/interfaces/TypedData.d.ts +19 -0
- package/dist/esm/interfaces/TypedData.js +2 -0
- package/dist/esm/interfaces/TypedData.js.map +1 -0
- package/dist/esm/interfaces/index.d.ts +8 -0
- package/dist/esm/interfaces/index.js +9 -0
- package/dist/esm/interfaces/index.js.map +1 -0
- package/dist/esm/lpFeeCalculator/index.d.ts +1 -0
- package/dist/esm/lpFeeCalculator/index.js +2 -0
- package/dist/esm/lpFeeCalculator/index.js.map +1 -0
- package/dist/esm/lpFeeCalculator/lpFeeCalculator.d.ts +66 -0
- package/dist/esm/lpFeeCalculator/lpFeeCalculator.js +129 -0
- package/dist/esm/lpFeeCalculator/lpFeeCalculator.js.map +1 -0
- package/dist/esm/lpFeeCalculator/rateModel.d.ts +45 -0
- package/dist/esm/lpFeeCalculator/rateModel.js +138 -0
- package/dist/esm/lpFeeCalculator/rateModel.js.map +1 -0
- package/dist/esm/merkleDistributor/MerkleDistributor.d.ts +20 -0
- package/dist/esm/merkleDistributor/MerkleDistributor.js +34 -0
- package/dist/esm/merkleDistributor/MerkleDistributor.js.map +1 -0
- package/dist/esm/merkleDistributor/index.d.ts +2 -0
- package/dist/esm/merkleDistributor/index.js +3 -0
- package/dist/esm/merkleDistributor/index.js.map +1 -0
- package/dist/esm/merkleDistributor/model/Distribution.d.ts +17 -0
- package/dist/esm/merkleDistributor/model/Distribution.js +2 -0
- package/dist/esm/merkleDistributor/model/Distribution.js.map +1 -0
- package/dist/esm/merkleDistributor/model/index.d.ts +1 -0
- package/dist/esm/merkleDistributor/model/index.js +2 -0
- package/dist/esm/merkleDistributor/model/index.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/pool/TransactionManager.d.ts +12 -0
- package/dist/esm/pool/TransactionManager.js +122 -0
- package/dist/esm/pool/TransactionManager.js.map +1 -0
- package/dist/esm/pool/index.d.ts +1 -0
- package/dist/esm/pool/index.js +2 -0
- package/dist/esm/pool/index.js.map +1 -0
- package/dist/esm/pool/poolClient.d.ts +242 -0
- package/dist/esm/pool/poolClient.js +899 -0
- package/dist/esm/pool/poolClient.js.map +1 -0
- package/dist/esm/priceClient/adapters/acrossApi.d.ts +14 -0
- package/dist/esm/priceClient/adapters/acrossApi.js +49 -0
- package/dist/esm/priceClient/adapters/acrossApi.js.map +1 -0
- package/dist/esm/priceClient/adapters/baseAdapter.d.ts +17 -0
- package/dist/esm/priceClient/adapters/baseAdapter.js +78 -0
- package/dist/esm/priceClient/adapters/baseAdapter.js.map +1 -0
- package/dist/esm/priceClient/adapters/coingecko.d.ts +14 -0
- package/dist/esm/priceClient/adapters/coingecko.js +73 -0
- package/dist/esm/priceClient/adapters/coingecko.js.map +1 -0
- package/dist/esm/priceClient/adapters/defiLlama.d.ts +17 -0
- package/dist/esm/priceClient/adapters/defiLlama.js +93 -0
- package/dist/esm/priceClient/adapters/defiLlama.js.map +1 -0
- package/dist/esm/priceClient/adapters/index.d.ts +3 -0
- package/dist/esm/priceClient/adapters/index.js +7 -0
- package/dist/esm/priceClient/adapters/index.js.map +1 -0
- package/dist/esm/priceClient/index.d.ts +2 -0
- package/dist/esm/priceClient/index.js +4 -0
- package/dist/esm/priceClient/index.js.map +1 -0
- package/dist/esm/priceClient/priceClient.d.ts +32 -0
- package/dist/esm/priceClient/priceClient.js +206 -0
- package/dist/esm/priceClient/priceClient.js.map +1 -0
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.d.ts +61 -0
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js +91 -0
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -0
- package/dist/esm/relayFeeCalculator/chain-queries/factory.d.ts +151 -0
- package/dist/esm/relayFeeCalculator/chain-queries/factory.js +38 -0
- package/dist/esm/relayFeeCalculator/chain-queries/factory.js.map +1 -0
- package/dist/esm/relayFeeCalculator/chain-queries/index.d.ts +3 -0
- package/dist/esm/relayFeeCalculator/chain-queries/index.js +4 -0
- package/dist/esm/relayFeeCalculator/chain-queries/index.js.map +1 -0
- package/dist/esm/relayFeeCalculator/chain-queries/polygon.d.ts +152 -0
- package/dist/esm/relayFeeCalculator/chain-queries/polygon.js +40 -0
- package/dist/esm/relayFeeCalculator/chain-queries/polygon.js.map +1 -0
- package/dist/esm/relayFeeCalculator/index.d.ts +2 -0
- package/dist/esm/relayFeeCalculator/index.js +3 -0
- package/dist/esm/relayFeeCalculator/index.js.map +1 -0
- package/dist/esm/relayFeeCalculator/relayFeeCalculator.d.ts +282 -0
- package/dist/esm/relayFeeCalculator/relayFeeCalculator.js +298 -0
- package/dist/esm/relayFeeCalculator/relayFeeCalculator.js.map +1 -0
- package/dist/esm/typechain.d.ts +22 -0
- package/dist/esm/typechain.js +9 -0
- package/dist/esm/typechain.js.map +1 -0
- package/dist/esm/typeguards/error.d.ts +3 -0
- package/dist/esm/typeguards/error.js +6 -0
- package/dist/esm/typeguards/error.js.map +1 -0
- package/dist/esm/typeguards/index.d.ts +1 -0
- package/dist/esm/typeguards/index.js +2 -0
- package/dist/esm/typeguards/index.js.map +1 -0
- package/dist/esm/utils/AddressUtils.d.ts +8 -0
- package/dist/esm/utils/AddressUtils.js +28 -0
- package/dist/esm/utils/AddressUtils.js.map +1 -0
- package/dist/esm/utils/ArrayUtils.d.ts +98 -0
- package/dist/esm/utils/ArrayUtils.js +196 -0
- package/dist/esm/utils/ArrayUtils.js.map +1 -0
- package/dist/esm/utils/BigNumberUtils.d.ts +31 -0
- package/dist/esm/utils/BigNumberUtils.js +52 -0
- package/dist/esm/utils/BigNumberUtils.js.map +1 -0
- package/dist/esm/utils/BlockExplorerUtils.d.ts +21 -0
- package/dist/esm/utils/BlockExplorerUtils.js +91 -0
- package/dist/esm/utils/BlockExplorerUtils.js.map +1 -0
- package/dist/esm/utils/BlockUtils.d.ts +46 -0
- package/dist/esm/utils/BlockUtils.js +294 -0
- package/dist/esm/utils/BlockUtils.js.map +1 -0
- package/dist/esm/utils/BundleUtils.d.ts +29 -0
- package/dist/esm/utils/BundleUtils.js +89 -0
- package/dist/esm/utils/BundleUtils.js.map +1 -0
- package/dist/esm/utils/CachingUtils.d.ts +17 -0
- package/dist/esm/utils/CachingUtils.js +66 -0
- package/dist/esm/utils/CachingUtils.js.map +1 -0
- package/dist/esm/utils/DeploymentUtils.d.ts +1 -0
- package/dist/esm/utils/DeploymentUtils.js +2 -0
- package/dist/esm/utils/DeploymentUtils.js.map +1 -0
- package/dist/esm/utils/DepositUtils.d.ts +46 -0
- package/dist/esm/utils/DepositUtils.js +138 -0
- package/dist/esm/utils/DepositUtils.js.map +1 -0
- package/dist/esm/utils/EventUtils.d.ts +32 -0
- package/dist/esm/utils/EventUtils.js +194 -0
- package/dist/esm/utils/EventUtils.js.map +1 -0
- package/dist/esm/utils/FlowUtils.d.ts +8 -0
- package/dist/esm/utils/FlowUtils.js +39 -0
- package/dist/esm/utils/FlowUtils.js.map +1 -0
- package/dist/esm/utils/FormattingUtils.d.ts +61 -0
- package/dist/esm/utils/FormattingUtils.js +167 -0
- package/dist/esm/utils/FormattingUtils.js.map +1 -0
- package/dist/esm/utils/IPFSUtils.d.ts +24 -0
- package/dist/esm/utils/IPFSUtils.js +65 -0
- package/dist/esm/utils/IPFSUtils.js.map +1 -0
- package/dist/esm/utils/JSONUtils.d.ts +31 -0
- package/dist/esm/utils/JSONUtils.js +82 -0
- package/dist/esm/utils/JSONUtils.js.map +1 -0
- package/dist/esm/utils/LogUtils.d.ts +20 -0
- package/dist/esm/utils/LogUtils.js +19 -0
- package/dist/esm/utils/LogUtils.js.map +1 -0
- package/dist/esm/utils/Multicall.d.ts +13 -0
- package/dist/esm/utils/Multicall.js +70 -0
- package/dist/esm/utils/Multicall.js.map +1 -0
- package/dist/esm/utils/NetworkUtils.d.ts +60 -0
- package/dist/esm/utils/NetworkUtils.js +109 -0
- package/dist/esm/utils/NetworkUtils.js.map +1 -0
- package/dist/esm/utils/NumberUtils.d.ts +12 -0
- package/dist/esm/utils/NumberUtils.js +17 -0
- package/dist/esm/utils/NumberUtils.js.map +1 -0
- package/dist/esm/utils/ObjectUtils.d.ts +10 -0
- package/dist/esm/utils/ObjectUtils.js +72 -0
- package/dist/esm/utils/ObjectUtils.js.map +1 -0
- package/dist/esm/utils/ReviverUtils.d.ts +15 -0
- package/dist/esm/utils/ReviverUtils.js +33 -0
- package/dist/esm/utils/ReviverUtils.js.map +1 -0
- package/dist/esm/utils/SpokeUtils.d.ts +64 -0
- package/dist/esm/utils/SpokeUtils.js +370 -0
- package/dist/esm/utils/SpokeUtils.js.map +1 -0
- package/dist/esm/utils/TimeUtils.d.ts +5 -0
- package/dist/esm/utils/TimeUtils.js +8 -0
- package/dist/esm/utils/TimeUtils.js.map +1 -0
- package/dist/esm/utils/TokenUtils.d.ts +325 -0
- package/dist/esm/utils/TokenUtils.js +88 -0
- package/dist/esm/utils/TokenUtils.js.map +1 -0
- package/dist/esm/utils/TypeGuards.d.ts +3 -0
- package/dist/esm/utils/TypeGuards.js +10 -0
- package/dist/esm/utils/TypeGuards.js.map +1 -0
- package/dist/esm/utils/TypeUtils.d.ts +5 -0
- package/dist/esm/utils/TypeUtils.js +2 -0
- package/dist/esm/utils/TypeUtils.js.map +1 -0
- package/dist/esm/utils/V3Utils.d.ts +4 -0
- package/dist/esm/utils/V3Utils.js +10 -0
- package/dist/esm/utils/V3Utils.js.map +1 -0
- package/dist/esm/utils/ValidatorUtils.d.ts +2 -0
- package/dist/esm/utils/ValidatorUtils.js +35 -0
- package/dist/esm/utils/ValidatorUtils.js.map +1 -0
- package/dist/esm/utils/abi/contracts/Multicall3.json +440 -0
- package/dist/esm/utils/abi/index.d.ts +18 -0
- package/dist/esm/utils/abi/index.js +41 -0
- package/dist/esm/utils/abi/index.js.map +1 -0
- package/dist/esm/utils/common.d.ts +204 -0
- package/dist/esm/utils/common.js +325 -0
- package/dist/esm/utils/common.js.map +1 -0
- package/dist/esm/utils/index.d.ts +29 -0
- package/dist/esm/utils/index.js +30 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/types/apiClient/abstractClient.d.ts +67 -0
- package/dist/types/apiClient/abstractClient.d.ts.map +1 -0
- package/dist/types/apiClient/index.d.ts +3 -0
- package/dist/types/apiClient/index.d.ts.map +1 -0
- package/dist/types/apiClient/mockedClient.d.ts +25 -0
- package/dist/types/apiClient/mockedClient.d.ts.map +1 -0
- package/dist/types/apiClient/productionClient.d.ts +17 -0
- package/dist/types/apiClient/productionClient.d.ts.map +1 -0
- package/dist/types/apiClient/types.d.ts +45 -0
- package/dist/types/apiClient/types.d.ts.map +1 -0
- package/dist/types/caching/Arweave/ArweaveClient.d.ts +62 -0
- package/dist/types/caching/Arweave/ArweaveClient.d.ts.map +1 -0
- package/dist/types/caching/Arweave/index.d.ts +2 -0
- package/dist/types/caching/Arweave/index.d.ts.map +1 -0
- package/dist/types/caching/IPFS/PinataIPFSClient.d.ts +38 -0
- package/dist/types/caching/IPFS/PinataIPFSClient.d.ts.map +1 -0
- package/dist/types/caching/IPFS/index.d.ts +2 -0
- package/dist/types/caching/IPFS/index.d.ts.map +1 -0
- package/dist/types/caching/index.d.ts +3 -0
- package/dist/types/caching/index.d.ts.map +1 -0
- package/dist/types/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts +109 -0
- package/dist/types/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts.map +1 -0
- package/dist/types/clients/AcrossConfigStoreClient/index.d.ts +2 -0
- package/dist/types/clients/AcrossConfigStoreClient/index.d.ts.map +1 -0
- package/dist/types/clients/BaseAbstractClient.d.ts +52 -0
- package/dist/types/clients/BaseAbstractClient.d.ts.map +1 -0
- package/dist/types/clients/HubPoolClient.d.ts +135 -0
- package/dist/types/clients/HubPoolClient.d.ts.map +1 -0
- package/dist/types/clients/SpokePoolClient.d.ts +319 -0
- package/dist/types/clients/SpokePoolClient.d.ts.map +1 -0
- package/dist/types/clients/index.d.ts +5 -0
- package/dist/types/clients/index.d.ts.map +1 -0
- package/dist/types/clients/mocks/MockConfigStoreClient.d.ts +21 -0
- package/dist/types/clients/mocks/MockConfigStoreClient.d.ts.map +1 -0
- package/dist/types/clients/mocks/MockEvents.d.ts +35 -0
- package/dist/types/clients/mocks/MockEvents.d.ts.map +1 -0
- package/dist/types/clients/mocks/MockHubPoolClient.d.ts +36 -0
- package/dist/types/clients/mocks/MockHubPoolClient.d.ts.map +1 -0
- package/dist/types/clients/mocks/MockSpokePoolClient.d.ts +39 -0
- package/dist/types/clients/mocks/MockSpokePoolClient.d.ts.map +1 -0
- package/dist/types/clients/mocks/index.d.ts +4 -0
- package/dist/types/clients/mocks/index.d.ts.map +1 -0
- package/dist/types/coingecko/Coingecko.d.ts +41 -0
- package/dist/types/coingecko/Coingecko.d.ts.map +1 -0
- package/dist/types/coingecko/index.d.ts +2 -0
- package/dist/types/coingecko/index.d.ts.map +1 -0
- package/dist/types/constants.d.ts +30 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/contracts/acrossConfigStore.d.ts +58 -0
- package/dist/types/contracts/acrossConfigStore.d.ts.map +1 -0
- package/dist/types/contracts/hubPool.d.ts +18 -0
- package/dist/types/contracts/hubPool.d.ts.map +1 -0
- package/dist/types/contracts/index.d.ts +3 -0
- package/dist/types/contracts/index.d.ts.map +1 -0
- package/dist/types/contracts/utils.d.ts +24 -0
- package/dist/types/contracts/utils.d.ts.map +1 -0
- package/dist/types/gasPriceOracle/adapters/arbitrum.d.ts +4 -0
- package/dist/types/gasPriceOracle/adapters/arbitrum.d.ts.map +1 -0
- package/dist/types/gasPriceOracle/adapters/ethereum.d.ts +5 -0
- package/dist/types/gasPriceOracle/adapters/ethereum.d.ts.map +1 -0
- package/dist/types/gasPriceOracle/adapters/index.d.ts +4 -0
- package/dist/types/gasPriceOracle/adapters/index.d.ts.map +1 -0
- package/dist/types/gasPriceOracle/adapters/polygon.d.ts +4 -0
- package/dist/types/gasPriceOracle/adapters/polygon.d.ts.map +1 -0
- package/dist/types/gasPriceOracle/index.d.ts +3 -0
- package/dist/types/gasPriceOracle/index.d.ts.map +1 -0
- package/dist/types/gasPriceOracle/oracle.d.ts +11 -0
- package/dist/types/gasPriceOracle/oracle.d.ts.map +1 -0
- package/dist/types/gasPriceOracle/types.d.ts +9 -0
- package/dist/types/gasPriceOracle/types.d.ts.map +1 -0
- package/dist/types/gasPriceOracle/util.d.ts +3 -0
- package/dist/types/gasPriceOracle/util.d.ts.map +1 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/interfaces/Bridge.d.ts +10 -0
- package/dist/types/interfaces/Bridge.d.ts.map +1 -0
- package/dist/types/interfaces/CachingMechanism.d.ts +27 -0
- package/dist/types/interfaces/CachingMechanism.d.ts.map +1 -0
- package/dist/types/interfaces/Common.d.ts +11 -0
- package/dist/types/interfaces/Common.d.ts.map +1 -0
- package/dist/types/interfaces/ConfigStore.d.ts +158 -0
- package/dist/types/interfaces/ConfigStore.d.ts.map +1 -0
- package/dist/types/interfaces/Error.d.ts +6 -0
- package/dist/types/interfaces/Error.d.ts.map +1 -0
- package/dist/types/interfaces/HubPool.d.ts +99 -0
- package/dist/types/interfaces/HubPool.d.ts.map +1 -0
- package/dist/types/interfaces/SpokePool.d.ts +104 -0
- package/dist/types/interfaces/SpokePool.d.ts.map +1 -0
- package/dist/types/interfaces/TypedData.d.ts +20 -0
- package/dist/types/interfaces/TypedData.d.ts.map +1 -0
- package/dist/types/interfaces/index.d.ts +9 -0
- package/dist/types/interfaces/index.d.ts.map +1 -0
- package/dist/types/lpFeeCalculator/index.d.ts +2 -0
- package/dist/types/lpFeeCalculator/index.d.ts.map +1 -0
- package/dist/types/lpFeeCalculator/lpFeeCalculator.d.ts +67 -0
- package/dist/types/lpFeeCalculator/lpFeeCalculator.d.ts.map +1 -0
- package/dist/types/lpFeeCalculator/rateModel.d.ts +46 -0
- package/dist/types/lpFeeCalculator/rateModel.d.ts.map +1 -0
- package/dist/types/merkleDistributor/MerkleDistributor.d.ts +21 -0
- package/dist/types/merkleDistributor/MerkleDistributor.d.ts.map +1 -0
- package/dist/types/merkleDistributor/index.d.ts +3 -0
- package/dist/types/merkleDistributor/index.d.ts.map +1 -0
- package/dist/types/merkleDistributor/model/Distribution.d.ts +18 -0
- package/dist/types/merkleDistributor/model/Distribution.d.ts.map +1 -0
- package/dist/types/merkleDistributor/model/index.d.ts +2 -0
- package/dist/types/merkleDistributor/model/index.d.ts.map +1 -0
- package/dist/types/pool/TransactionManager.d.ts +13 -0
- package/dist/types/pool/TransactionManager.d.ts.map +1 -0
- package/dist/types/pool/index.d.ts +2 -0
- package/dist/types/pool/index.d.ts.map +1 -0
- package/dist/types/pool/poolClient.d.ts +243 -0
- package/dist/types/pool/poolClient.d.ts.map +1 -0
- package/dist/types/priceClient/adapters/acrossApi.d.ts +15 -0
- package/dist/types/priceClient/adapters/acrossApi.d.ts.map +1 -0
- package/dist/types/priceClient/adapters/baseAdapter.d.ts +18 -0
- package/dist/types/priceClient/adapters/baseAdapter.d.ts.map +1 -0
- package/dist/types/priceClient/adapters/coingecko.d.ts +15 -0
- package/dist/types/priceClient/adapters/coingecko.d.ts.map +1 -0
- package/dist/types/priceClient/adapters/defiLlama.d.ts +18 -0
- package/dist/types/priceClient/adapters/defiLlama.d.ts.map +1 -0
- package/dist/types/priceClient/adapters/index.d.ts +4 -0
- package/dist/types/priceClient/adapters/index.d.ts.map +1 -0
- package/dist/types/priceClient/index.d.ts +3 -0
- package/dist/types/priceClient/index.d.ts.map +1 -0
- package/dist/types/priceClient/priceClient.d.ts +33 -0
- package/dist/types/priceClient/priceClient.d.ts.map +1 -0
- package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts +62 -0
- package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts.map +1 -0
- package/dist/types/relayFeeCalculator/chain-queries/factory.d.ts +152 -0
- package/dist/types/relayFeeCalculator/chain-queries/factory.d.ts.map +1 -0
- package/dist/types/relayFeeCalculator/chain-queries/index.d.ts +4 -0
- package/dist/types/relayFeeCalculator/chain-queries/index.d.ts.map +1 -0
- package/dist/types/relayFeeCalculator/chain-queries/polygon.d.ts +153 -0
- package/dist/types/relayFeeCalculator/chain-queries/polygon.d.ts.map +1 -0
- package/dist/types/relayFeeCalculator/index.d.ts +3 -0
- package/dist/types/relayFeeCalculator/index.d.ts.map +1 -0
- package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts +283 -0
- package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts.map +1 -0
- package/dist/types/typechain.d.ts +23 -0
- package/dist/types/typechain.d.ts.map +1 -0
- package/dist/types/typeguards/error.d.ts +4 -0
- package/dist/types/typeguards/error.d.ts.map +1 -0
- package/dist/types/typeguards/index.d.ts +2 -0
- package/dist/types/typeguards/index.d.ts.map +1 -0
- package/dist/types/utils/AddressUtils.d.ts +9 -0
- package/dist/types/utils/AddressUtils.d.ts.map +1 -0
- package/dist/types/utils/ArrayUtils.d.ts +99 -0
- package/dist/types/utils/ArrayUtils.d.ts.map +1 -0
- package/dist/types/utils/BigNumberUtils.d.ts +32 -0
- package/dist/types/utils/BigNumberUtils.d.ts.map +1 -0
- package/dist/types/utils/BlockExplorerUtils.d.ts +22 -0
- package/dist/types/utils/BlockExplorerUtils.d.ts.map +1 -0
- package/dist/types/utils/BlockUtils.d.ts +47 -0
- package/dist/types/utils/BlockUtils.d.ts.map +1 -0
- package/dist/types/utils/BundleUtils.d.ts +30 -0
- package/dist/types/utils/BundleUtils.d.ts.map +1 -0
- package/dist/types/utils/CachingUtils.d.ts +18 -0
- package/dist/types/utils/CachingUtils.d.ts.map +1 -0
- package/dist/types/utils/DeploymentUtils.d.ts +2 -0
- package/dist/types/utils/DeploymentUtils.d.ts.map +1 -0
- package/dist/types/utils/DepositUtils.d.ts +47 -0
- package/dist/types/utils/DepositUtils.d.ts.map +1 -0
- package/dist/types/utils/EventUtils.d.ts +33 -0
- package/dist/types/utils/EventUtils.d.ts.map +1 -0
- package/dist/types/utils/FlowUtils.d.ts +9 -0
- package/dist/types/utils/FlowUtils.d.ts.map +1 -0
- package/dist/types/utils/FormattingUtils.d.ts +62 -0
- package/dist/types/utils/FormattingUtils.d.ts.map +1 -0
- package/dist/types/utils/IPFSUtils.d.ts +25 -0
- package/dist/types/utils/IPFSUtils.d.ts.map +1 -0
- package/dist/types/utils/JSONUtils.d.ts +32 -0
- package/dist/types/utils/JSONUtils.d.ts.map +1 -0
- package/dist/types/utils/LogUtils.d.ts +21 -0
- package/dist/types/utils/LogUtils.d.ts.map +1 -0
- package/dist/types/utils/Multicall.d.ts +14 -0
- package/dist/types/utils/Multicall.d.ts.map +1 -0
- package/dist/types/utils/NetworkUtils.d.ts +61 -0
- package/dist/types/utils/NetworkUtils.d.ts.map +1 -0
- package/dist/types/utils/NumberUtils.d.ts +13 -0
- package/dist/types/utils/NumberUtils.d.ts.map +1 -0
- package/dist/types/utils/ObjectUtils.d.ts +11 -0
- package/dist/types/utils/ObjectUtils.d.ts.map +1 -0
- package/dist/types/utils/ReviverUtils.d.ts +16 -0
- package/dist/types/utils/ReviverUtils.d.ts.map +1 -0
- package/dist/types/utils/SpokeUtils.d.ts +65 -0
- package/dist/types/utils/SpokeUtils.d.ts.map +1 -0
- package/dist/types/utils/TimeUtils.d.ts +6 -0
- package/dist/types/utils/TimeUtils.d.ts.map +1 -0
- package/dist/types/utils/TokenUtils.d.ts +326 -0
- package/dist/types/utils/TokenUtils.d.ts.map +1 -0
- package/dist/types/utils/TypeGuards.d.ts +4 -0
- package/dist/types/utils/TypeGuards.d.ts.map +1 -0
- package/dist/types/utils/TypeUtils.d.ts +6 -0
- package/dist/types/utils/TypeUtils.d.ts.map +1 -0
- package/dist/types/utils/V3Utils.d.ts +5 -0
- package/dist/types/utils/V3Utils.d.ts.map +1 -0
- package/dist/types/utils/ValidatorUtils.d.ts +3 -0
- package/dist/types/utils/ValidatorUtils.d.ts.map +1 -0
- package/dist/types/utils/abi/index.d.ts +19 -0
- package/dist/types/utils/abi/index.d.ts.map +1 -0
- package/dist/types/utils/common.d.ts +205 -0
- package/dist/types/utils/common.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +30 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/package.json +144 -0
- package/src/apiClient/abstractClient.ts +95 -0
- package/src/apiClient/index.ts +2 -0
- package/src/apiClient/mockedClient.ts +90 -0
- package/src/apiClient/productionClient.ts +98 -0
- package/src/apiClient/types.ts +49 -0
- package/src/caching/Arweave/ArweaveClient.ts +238 -0
- package/src/caching/Arweave/index.ts +1 -0
- package/src/caching/IPFS/PinataIPFSClient.ts +92 -0
- package/src/caching/IPFS/index.ts +1 -0
- package/src/caching/index.ts +2 -0
- package/src/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.ts +526 -0
- package/src/clients/AcrossConfigStoreClient/index.ts +1 -0
- package/src/clients/BaseAbstractClient.ts +94 -0
- package/src/clients/HubPoolClient.ts +1010 -0
- package/src/clients/SpokePoolClient.ts +894 -0
- package/src/clients/index.ts +9 -0
- package/src/clients/mocks/MockConfigStoreClient.ts +129 -0
- package/src/clients/mocks/MockEvents.ts +156 -0
- package/src/clients/mocks/MockHubPoolClient.ts +257 -0
- package/src/clients/mocks/MockSpokePoolClient.ts +341 -0
- package/src/clients/mocks/index.ts +3 -0
- package/src/coingecko/Coingecko.ts +277 -0
- package/src/coingecko/index.ts +1 -0
- package/src/constants.ts +53 -0
- package/src/contracts/acrossConfigStore.ts +49 -0
- package/src/contracts/hubPool.ts +90 -0
- package/src/contracts/index.ts +2 -0
- package/src/contracts/utils.ts +56 -0
- package/src/gasPriceOracle/adapters/arbitrum.ts +21 -0
- package/src/gasPriceOracle/adapters/ethereum.ts +27 -0
- package/src/gasPriceOracle/adapters/index.ts +3 -0
- package/src/gasPriceOracle/adapters/polygon.ts +77 -0
- package/src/gasPriceOracle/index.ts +2 -0
- package/src/gasPriceOracle/oracle.ts +42 -0
- package/src/gasPriceOracle/types.ts +10 -0
- package/src/gasPriceOracle/util.ts +5 -0
- package/src/index.ts +15 -0
- package/src/interfaces/Bridge.ts +10 -0
- package/src/interfaces/CachingMechanism.ts +37 -0
- package/src/interfaces/Common.ts +12 -0
- package/src/interfaces/ConfigStore.ts +173 -0
- package/src/interfaces/Error.ts +5 -0
- package/src/interfaces/HubPool.ts +118 -0
- package/src/interfaces/SpokePool.ts +119 -0
- package/src/interfaces/TypedData.ts +21 -0
- package/src/interfaces/index.ts +8 -0
- package/src/lpFeeCalculator/README.md +27 -0
- package/src/lpFeeCalculator/index.ts +1 -0
- package/src/lpFeeCalculator/lpFeeCalculator.ts +169 -0
- package/src/lpFeeCalculator/rateModel.ts +183 -0
- package/src/merkleDistributor/MerkleDistributor.ts +37 -0
- package/src/merkleDistributor/README.md +30 -0
- package/src/merkleDistributor/index.ts +2 -0
- package/src/merkleDistributor/model/Distribution.ts +17 -0
- package/src/merkleDistributor/model/index.ts +1 -0
- package/src/pool/TransactionManager.ts +73 -0
- package/src/pool/index.ts +1 -0
- package/src/pool/poolClient.ts +840 -0
- package/src/priceClient/README.md +36 -0
- package/src/priceClient/adapters/acrossApi.ts +44 -0
- package/src/priceClient/adapters/baseAdapter.ts +65 -0
- package/src/priceClient/adapters/coingecko.ts +67 -0
- package/src/priceClient/adapters/defiLlama.ts +96 -0
- package/src/priceClient/adapters/index.ts +3 -0
- package/src/priceClient/index.ts +2 -0
- package/src/priceClient/priceClient.ts +192 -0
- package/src/relayFeeCalculator/README.md +34 -0
- package/src/relayFeeCalculator/chain-queries/baseQuery.ts +98 -0
- package/src/relayFeeCalculator/chain-queries/factory.ts +58 -0
- package/src/relayFeeCalculator/chain-queries/index.ts +3 -0
- package/src/relayFeeCalculator/chain-queries/polygon.ts +45 -0
- package/src/relayFeeCalculator/index.ts +2 -0
- package/src/relayFeeCalculator/relayFeeCalculator.ts +410 -0
- package/src/typechain.ts +46 -0
- package/src/typeguards/error.ts +7 -0
- package/src/typeguards/index.ts +1 -0
- package/src/utils/AddressUtils.ts +18 -0
- package/src/utils/ArrayUtils.ts +170 -0
- package/src/utils/BigNumberUtils.ts +58 -0
- package/src/utils/BlockExplorerUtils.ts +91 -0
- package/src/utils/BlockUtils.ts +265 -0
- package/src/utils/BundleUtils.ts +109 -0
- package/src/utils/CachingUtils.ts +56 -0
- package/src/utils/DeploymentUtils.ts +5 -0
- package/src/utils/DepositUtils.ts +144 -0
- package/src/utils/EventUtils.ts +227 -0
- package/src/utils/FlowUtils.ts +48 -0
- package/src/utils/FormattingUtils.ts +186 -0
- package/src/utils/IPFSUtils.ts +48 -0
- package/src/utils/JSONUtils.ts +85 -0
- package/src/utils/LogUtils.ts +38 -0
- package/src/utils/Multicall.ts +64 -0
- package/src/utils/NetworkUtils.ts +117 -0
- package/src/utils/NumberUtils.ts +17 -0
- package/src/utils/ObjectUtils.ts +77 -0
- package/src/utils/ReviverUtils.ts +31 -0
- package/src/utils/SpokeUtils.ts +372 -0
- package/src/utils/TimeUtils.ts +7 -0
- package/src/utils/TokenUtils.ts +94 -0
- package/src/utils/TypeGuards.ts +15 -0
- package/src/utils/TypeUtils.ts +9 -0
- package/src/utils/V3Utils.ts +12 -0
- package/src/utils/ValidatorUtils.ts +38 -0
- package/src/utils/abi/contracts/Multicall3.json +440 -0
- package/src/utils/abi/index.ts +33 -0
- package/src/utils/common.ts +392 -0
- package/src/utils/index.ts +29 -0
|
@@ -0,0 +1,758 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HubPoolClient = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
|
+
var ethers_1 = require("ethers");
|
|
7
|
+
var lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
8
|
+
var constants_1 = require("../constants");
|
|
9
|
+
var lpFeeCalculator = tslib_1.__importStar(require("../lpFeeCalculator"));
|
|
10
|
+
var utils_1 = require("../utils");
|
|
11
|
+
var BaseAbstractClient_1 = require("./BaseAbstractClient");
|
|
12
|
+
var HubPoolClient = (function (_super) {
|
|
13
|
+
tslib_1.__extends(HubPoolClient, _super);
|
|
14
|
+
function HubPoolClient(logger, hubPool, configStoreClient, deploymentBlock, chainId, eventSearchConfig, configOverride, cachingMechanism) {
|
|
15
|
+
if (deploymentBlock === void 0) { deploymentBlock = 0; }
|
|
16
|
+
if (chainId === void 0) { chainId = 1; }
|
|
17
|
+
if (eventSearchConfig === void 0) { eventSearchConfig = { fromBlock: 0, maxBlockLookBack: 0 }; }
|
|
18
|
+
if (configOverride === void 0) { configOverride = {
|
|
19
|
+
ignoredHubExecutedBundles: [],
|
|
20
|
+
ignoredHubProposedBundles: [],
|
|
21
|
+
}; }
|
|
22
|
+
var _this = _super.call(this, eventSearchConfig, cachingMechanism) || this;
|
|
23
|
+
_this.logger = logger;
|
|
24
|
+
_this.hubPool = hubPool;
|
|
25
|
+
_this.configStoreClient = configStoreClient;
|
|
26
|
+
_this.deploymentBlock = deploymentBlock;
|
|
27
|
+
_this.chainId = chainId;
|
|
28
|
+
_this.configOverride = configOverride;
|
|
29
|
+
_this.l1TokensToDestinationTokens = {};
|
|
30
|
+
_this.l1Tokens = [];
|
|
31
|
+
_this.lpTokens = {};
|
|
32
|
+
_this.proposedRootBundles = [];
|
|
33
|
+
_this.canceledRootBundles = [];
|
|
34
|
+
_this.disputedRootBundles = [];
|
|
35
|
+
_this.executedRootBundles = [];
|
|
36
|
+
_this.crossChainContracts = {};
|
|
37
|
+
_this.l1TokensToDestinationTokensWithBlock = {};
|
|
38
|
+
_this.latestBlockSearched = Math.min(deploymentBlock - 1, 0);
|
|
39
|
+
_this.firstBlockToSearch = eventSearchConfig.fromBlock;
|
|
40
|
+
var provider = _this.hubPool.provider;
|
|
41
|
+
_this.blockFinder = new utils_1.BlockFinder(provider);
|
|
42
|
+
return _this;
|
|
43
|
+
}
|
|
44
|
+
HubPoolClient.prototype.hubPoolEventFilters = function () {
|
|
45
|
+
return {
|
|
46
|
+
SetPoolRebalanceRoute: this.hubPool.filters.SetPoolRebalanceRoute(),
|
|
47
|
+
L1TokenEnabledForLiquidityProvision: this.hubPool.filters.L1TokenEnabledForLiquidityProvision(),
|
|
48
|
+
ProposeRootBundle: this.hubPool.filters.ProposeRootBundle(),
|
|
49
|
+
RootBundleCanceled: this.hubPool.filters.RootBundleCanceled(),
|
|
50
|
+
RootBundleDisputed: this.hubPool.filters.RootBundleDisputed(),
|
|
51
|
+
RootBundleExecuted: this.hubPool.filters.RootBundleExecuted(),
|
|
52
|
+
CrossChainContractsSet: this.hubPool.filters.CrossChainContractsSet(),
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
HubPoolClient.prototype.hasPendingProposal = function () {
|
|
56
|
+
return this.pendingRootBundle !== undefined;
|
|
57
|
+
};
|
|
58
|
+
HubPoolClient.prototype.getPendingRootBundle = function () {
|
|
59
|
+
return this.pendingRootBundle;
|
|
60
|
+
};
|
|
61
|
+
HubPoolClient.prototype.getProposedRootBundles = function () {
|
|
62
|
+
return this.proposedRootBundles;
|
|
63
|
+
};
|
|
64
|
+
HubPoolClient.prototype.getCancelledRootBundles = function () {
|
|
65
|
+
return this.canceledRootBundles;
|
|
66
|
+
};
|
|
67
|
+
HubPoolClient.prototype.getDisputedRootBundles = function () {
|
|
68
|
+
return this.disputedRootBundles;
|
|
69
|
+
};
|
|
70
|
+
HubPoolClient.prototype.getExecutedRootBundles = function () {
|
|
71
|
+
return this.executedRootBundles;
|
|
72
|
+
};
|
|
73
|
+
HubPoolClient.prototype.getSpokePoolForBlock = function (chain, block) {
|
|
74
|
+
if (block === void 0) { block = Number.MAX_SAFE_INTEGER; }
|
|
75
|
+
if (!this.crossChainContracts[chain]) {
|
|
76
|
+
throw new Error("No cross chain contracts set for ".concat(chain));
|
|
77
|
+
}
|
|
78
|
+
var mostRecentSpokePoolUpdateBeforeBlock = (0, utils_1.sortEventsDescending)(this.crossChainContracts[chain]).find(function (crossChainContract) { return crossChainContract.blockNumber <= block; });
|
|
79
|
+
if (!mostRecentSpokePoolUpdateBeforeBlock) {
|
|
80
|
+
throw new Error("No cross chain contract found before block ".concat(block, " for chain ").concat(chain));
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return mostRecentSpokePoolUpdateBeforeBlock.spokePool;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
HubPoolClient.prototype.getSpokePoolActivationBlock = function (chain, spokePool) {
|
|
87
|
+
var mostRecentSpokePoolUpdateBeforeBlock = this.crossChainContracts[chain].find(function (crossChainContract) { return crossChainContract.spokePool === spokePool; });
|
|
88
|
+
return mostRecentSpokePoolUpdateBeforeBlock === null || mostRecentSpokePoolUpdateBeforeBlock === void 0 ? void 0 : mostRecentSpokePoolUpdateBeforeBlock.blockNumber;
|
|
89
|
+
};
|
|
90
|
+
HubPoolClient.prototype.getL2TokenForL1TokenAtBlock = function (l1Token, destinationChainId, latestHubBlock) {
|
|
91
|
+
var _a, _b, _c, _d;
|
|
92
|
+
if (latestHubBlock === void 0) { latestHubBlock = Number.MAX_SAFE_INTEGER; }
|
|
93
|
+
if (!((_b = (_a = this.l1TokensToDestinationTokensWithBlock) === null || _a === void 0 ? void 0 : _a[l1Token]) === null || _b === void 0 ? void 0 : _b[destinationChainId])) {
|
|
94
|
+
var chain = (0, utils_1.getNetworkName)(destinationChainId);
|
|
95
|
+
var symbol = ((_c = this.l1Tokens.find(function (_a) {
|
|
96
|
+
var address = _a.address;
|
|
97
|
+
return address === l1Token;
|
|
98
|
+
})) !== null && _c !== void 0 ? _c : { symbol: l1Token }).symbol;
|
|
99
|
+
throw new Error("Could not find SpokePool mapping for ".concat(symbol, " on ").concat(chain, " and L1 token ").concat(l1Token));
|
|
100
|
+
}
|
|
101
|
+
var l2Token = (0, utils_1.sortEventsDescending)(this.l1TokensToDestinationTokensWithBlock[l1Token][destinationChainId]).find(function (mapping) { return mapping.blockNumber <= latestHubBlock; });
|
|
102
|
+
if (!l2Token) {
|
|
103
|
+
var chain = (0, utils_1.getNetworkName)(destinationChainId);
|
|
104
|
+
var symbol = ((_d = this.l1Tokens.find(function (_a) {
|
|
105
|
+
var address = _a.address;
|
|
106
|
+
return address === l1Token;
|
|
107
|
+
})) !== null && _d !== void 0 ? _d : { symbol: l1Token }).symbol;
|
|
108
|
+
throw new Error("Could not find SpokePool mapping for ".concat(symbol, " on ").concat(chain, " at or before HubPool block ").concat(latestHubBlock, "!"));
|
|
109
|
+
}
|
|
110
|
+
return l2Token.l2Token;
|
|
111
|
+
};
|
|
112
|
+
HubPoolClient.prototype.getL1TokenForL2TokenAtBlock = function (l2Token, destinationChainId, latestHubBlock) {
|
|
113
|
+
var _this = this;
|
|
114
|
+
if (latestHubBlock === void 0) { latestHubBlock = Number.MAX_SAFE_INTEGER; }
|
|
115
|
+
var l2Tokens = Object.keys(this.l1TokensToDestinationTokensWithBlock)
|
|
116
|
+
.filter(function (l1Token) { return _this.l2TokenEnabledForL1Token(l1Token, destinationChainId); })
|
|
117
|
+
.map(function (l1Token) {
|
|
118
|
+
return _this.l1TokensToDestinationTokensWithBlock[l1Token][destinationChainId].filter(function (mapping) { return mapping.l2Token === l2Token && mapping.blockNumber <= latestHubBlock; });
|
|
119
|
+
})
|
|
120
|
+
.flat();
|
|
121
|
+
if (l2Tokens.length === 0) {
|
|
122
|
+
var chain = (0, utils_1.getNetworkName)(destinationChainId);
|
|
123
|
+
throw new Error("Could not find HubPool mapping for ".concat(l2Token, " on ").concat(chain, " at or before HubPool block ").concat(latestHubBlock, "!"));
|
|
124
|
+
}
|
|
125
|
+
return (0, utils_1.sortEventsDescending)(l2Tokens)[0].l1Token;
|
|
126
|
+
};
|
|
127
|
+
HubPoolClient.prototype.getL1TokenForDeposit = function (deposit) {
|
|
128
|
+
return this.getL1TokenForL2TokenAtBlock(deposit.inputToken, deposit.originChainId, deposit.quoteBlockNumber);
|
|
129
|
+
};
|
|
130
|
+
HubPoolClient.prototype.getL2TokenForDeposit = function (deposit, l2ChainId) {
|
|
131
|
+
if (l2ChainId === void 0) { l2ChainId = deposit.destinationChainId; }
|
|
132
|
+
var l1Token = this.getL1TokenForDeposit(deposit);
|
|
133
|
+
return this.getL2TokenForL1TokenAtBlock(l1Token, l2ChainId, deposit.quoteBlockNumber);
|
|
134
|
+
};
|
|
135
|
+
HubPoolClient.prototype.l2TokenEnabledForL1Token = function (l1Token, destinationChainId) {
|
|
136
|
+
var _a, _b;
|
|
137
|
+
return ((_b = (_a = this.l1TokensToDestinationTokens) === null || _a === void 0 ? void 0 : _a[l1Token]) === null || _b === void 0 ? void 0 : _b[destinationChainId]) != undefined;
|
|
138
|
+
};
|
|
139
|
+
HubPoolClient.prototype.getBlockNumber = function (timestamp) {
|
|
140
|
+
var hints = { lowBlock: this.deploymentBlock };
|
|
141
|
+
return (0, utils_1.getCachedBlockForTimestamp)(this.chainId, timestamp, this.blockFinder, this.cachingMechanism, hints);
|
|
142
|
+
};
|
|
143
|
+
HubPoolClient.prototype.getCurrentPoolUtilization = function (l1Token) {
|
|
144
|
+
var _a;
|
|
145
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
146
|
+
var blockNumber, _b;
|
|
147
|
+
return tslib_1.__generator(this, function (_c) {
|
|
148
|
+
switch (_c.label) {
|
|
149
|
+
case 0:
|
|
150
|
+
if (!((_a = this.latestBlockSearched) !== null && _a !== void 0)) return [3, 1];
|
|
151
|
+
_b = _a;
|
|
152
|
+
return [3, 3];
|
|
153
|
+
case 1: return [4, this.hubPool.provider.getBlockNumber()];
|
|
154
|
+
case 2:
|
|
155
|
+
_b = (_c.sent());
|
|
156
|
+
_c.label = 3;
|
|
157
|
+
case 3:
|
|
158
|
+
blockNumber = _b;
|
|
159
|
+
return [4, this.getUtilization(l1Token, blockNumber, utils_1.bnZero, (0, utils_1.getCurrentTime)(), 0)];
|
|
160
|
+
case 4: return [2, _c.sent()];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
HubPoolClient.prototype.getUtilization = function (hubPoolToken, blockNumber, depositAmount, timestamp, timeToCache) {
|
|
166
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
167
|
+
var resolver, cache, key, result, utilization;
|
|
168
|
+
var _this = this;
|
|
169
|
+
return tslib_1.__generator(this, function (_a) {
|
|
170
|
+
switch (_a.label) {
|
|
171
|
+
case 0:
|
|
172
|
+
resolver = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
173
|
+
var overrides;
|
|
174
|
+
return tslib_1.__generator(this, function (_a) {
|
|
175
|
+
switch (_a.label) {
|
|
176
|
+
case 0:
|
|
177
|
+
overrides = { blockTag: blockNumber };
|
|
178
|
+
if (!depositAmount.eq(0)) return [3, 2];
|
|
179
|
+
return [4, this.hubPool.callStatic.liquidityUtilizationCurrent(hubPoolToken, overrides)];
|
|
180
|
+
case 1: return [2, _a.sent()];
|
|
181
|
+
case 2: return [4, this.hubPool.callStatic.liquidityUtilizationPostRelay(hubPoolToken, depositAmount, overrides)];
|
|
182
|
+
case 3: return [2, _a.sent()];
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
}); };
|
|
186
|
+
cache = this.cachingMechanism;
|
|
187
|
+
if (!cache || !(0, utils_1.shouldCache)((0, utils_1.getCurrentTime)(), timestamp, timeToCache)) {
|
|
188
|
+
return [2, resolver()];
|
|
189
|
+
}
|
|
190
|
+
key = depositAmount.eq(0)
|
|
191
|
+
? "utilization_".concat(hubPoolToken, "_").concat(blockNumber)
|
|
192
|
+
: "utilization_".concat(hubPoolToken, "_").concat(blockNumber, "_").concat(depositAmount.toString(), "_");
|
|
193
|
+
return [4, cache.get(key)];
|
|
194
|
+
case 1:
|
|
195
|
+
result = _a.sent();
|
|
196
|
+
if ((0, utils_1.isDefined)(result)) {
|
|
197
|
+
return [2, ethers_1.BigNumber.from(result)];
|
|
198
|
+
}
|
|
199
|
+
return [4, resolver()];
|
|
200
|
+
case 2:
|
|
201
|
+
utilization = _a.sent();
|
|
202
|
+
if (!(cache && (0, utils_1.shouldCache)((0, utils_1.getCurrentTime)(), timestamp, timeToCache))) return [3, 4];
|
|
203
|
+
return [4, cache.set(key, "".concat(utilization.toString()), constants_1.DEFAULT_CACHING_TTL)];
|
|
204
|
+
case 3:
|
|
205
|
+
_a.sent();
|
|
206
|
+
_a.label = 4;
|
|
207
|
+
case 4: return [2, utilization];
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
HubPoolClient.prototype.computeRealizedLpFeePct = function (deposit) {
|
|
213
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
214
|
+
var lpFee;
|
|
215
|
+
return tslib_1.__generator(this, function (_a) {
|
|
216
|
+
switch (_a.label) {
|
|
217
|
+
case 0: return [4, this.batchComputeRealizedLpFeePct([deposit])];
|
|
218
|
+
case 1:
|
|
219
|
+
lpFee = (_a.sent())[0];
|
|
220
|
+
return [2, lpFee];
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
HubPoolClient.prototype.batchComputeRealizedLpFeePct = function (deposits) {
|
|
226
|
+
var _a;
|
|
227
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
228
|
+
var utilizationTimestamps, utilization, quoteBlocks, hubPoolTokens, getHubPoolToken, getHubPoolTokens, resolveUniqueQuoteTimestamps, resolveTimestampsToBlocks, resolveUtilization, computeRealizedLpFeePct, timeToCache, quoteTimestamps, _b, _c, _d, _e;
|
|
229
|
+
var _this = this;
|
|
230
|
+
return tslib_1.__generator(this, function (_f) {
|
|
231
|
+
switch (_f.label) {
|
|
232
|
+
case 0:
|
|
233
|
+
(0, assert_1.default)(deposits.length > 0, "No deposits supplied to batchComputeRealizedLpFeePct");
|
|
234
|
+
if (!(0, utils_1.isDefined)(this.currentTime)) {
|
|
235
|
+
throw new Error("HubPoolClient has not set a currentTime");
|
|
236
|
+
}
|
|
237
|
+
utilizationTimestamps = {};
|
|
238
|
+
utilization = {};
|
|
239
|
+
quoteBlocks = {};
|
|
240
|
+
hubPoolTokens = {};
|
|
241
|
+
getHubPoolToken = function (deposit, quoteBlockNumber) {
|
|
242
|
+
var _a;
|
|
243
|
+
var tokenKey = "".concat(deposit.originChainId, "-").concat(deposit.inputToken);
|
|
244
|
+
return ((_a = hubPoolTokens[tokenKey]) !== null && _a !== void 0 ? _a : (hubPoolTokens[tokenKey] = _this.getL1TokenForDeposit(tslib_1.__assign(tslib_1.__assign({}, deposit), { quoteBlockNumber: quoteBlockNumber }))));
|
|
245
|
+
};
|
|
246
|
+
getHubPoolTokens = function () { return (0, utils_1.dedupArray)(Object.values(hubPoolTokens)); };
|
|
247
|
+
resolveUniqueQuoteTimestamps = function (deposit) {
|
|
248
|
+
var _a;
|
|
249
|
+
var quoteTimestamp = deposit.quoteTimestamp;
|
|
250
|
+
var quoteBlockNumber = quoteBlocks[quoteTimestamp];
|
|
251
|
+
var hubPoolToken = getHubPoolToken(deposit, quoteBlockNumber);
|
|
252
|
+
(_a = utilizationTimestamps[hubPoolToken]) !== null && _a !== void 0 ? _a : (utilizationTimestamps[hubPoolToken] = []);
|
|
253
|
+
if (!utilizationTimestamps[hubPoolToken].includes(quoteTimestamp)) {
|
|
254
|
+
utilizationTimestamps[hubPoolToken].push(quoteTimestamp);
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
resolveTimestampsToBlocks = function (quoteTimestamp) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
258
|
+
var quoteBlock;
|
|
259
|
+
return tslib_1.__generator(this, function (_a) {
|
|
260
|
+
switch (_a.label) {
|
|
261
|
+
case 0: return [4, this.getBlockNumber(quoteTimestamp)];
|
|
262
|
+
case 1:
|
|
263
|
+
quoteBlock = _a.sent();
|
|
264
|
+
if (!(0, utils_1.isDefined)(quoteBlock)) {
|
|
265
|
+
throw new Error("Could not find block for timestamp ".concat(quoteTimestamp));
|
|
266
|
+
}
|
|
267
|
+
return [2, [quoteTimestamp, quoteBlock]];
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
}); };
|
|
271
|
+
resolveUtilization = function (hubPoolToken) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
272
|
+
var _a, _b;
|
|
273
|
+
var _this = this;
|
|
274
|
+
return tslib_1.__generator(this, function (_c) {
|
|
275
|
+
switch (_c.label) {
|
|
276
|
+
case 0:
|
|
277
|
+
_b = (_a = Object).fromEntries;
|
|
278
|
+
return [4, (0, utils_1.mapAsync)(utilizationTimestamps[hubPoolToken], function (quoteTimestamp) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
279
|
+
var blockNumber, utilization;
|
|
280
|
+
return tslib_1.__generator(this, function (_a) {
|
|
281
|
+
switch (_a.label) {
|
|
282
|
+
case 0:
|
|
283
|
+
blockNumber = quoteBlocks[quoteTimestamp];
|
|
284
|
+
return [4, this.getUtilization(hubPoolToken, blockNumber, utils_1.bnZero, quoteTimestamp, timeToCache)];
|
|
285
|
+
case 1:
|
|
286
|
+
utilization = _a.sent();
|
|
287
|
+
return [2, [blockNumber, utilization]];
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}); })];
|
|
291
|
+
case 1: return [2, _b.apply(_a, [_c.sent()])];
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
}); };
|
|
295
|
+
computeRealizedLpFeePct = function (deposit) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
296
|
+
var originChainId, paymentChainId, inputAmount, quoteTimestamp, quoteBlock, hubPoolToken, rateModel, preUtilization, postUtilization, realizedLpFeePct;
|
|
297
|
+
return tslib_1.__generator(this, function (_a) {
|
|
298
|
+
switch (_a.label) {
|
|
299
|
+
case 0:
|
|
300
|
+
originChainId = deposit.originChainId, paymentChainId = deposit.paymentChainId, inputAmount = deposit.inputAmount, quoteTimestamp = deposit.quoteTimestamp;
|
|
301
|
+
quoteBlock = quoteBlocks[quoteTimestamp];
|
|
302
|
+
if (paymentChainId === undefined) {
|
|
303
|
+
return [2, { quoteBlock: quoteBlock, realizedLpFeePct: utils_1.bnZero }];
|
|
304
|
+
}
|
|
305
|
+
hubPoolToken = getHubPoolToken(deposit, quoteBlock);
|
|
306
|
+
rateModel = this.configStoreClient.getRateModelForBlockNumber(hubPoolToken, originChainId, paymentChainId, quoteBlock);
|
|
307
|
+
preUtilization = utilization[hubPoolToken][quoteBlock];
|
|
308
|
+
return [4, this.getUtilization(hubPoolToken, quoteBlock, inputAmount, quoteTimestamp, timeToCache)];
|
|
309
|
+
case 1:
|
|
310
|
+
postUtilization = _a.sent();
|
|
311
|
+
realizedLpFeePct = lpFeeCalculator.calculateRealizedLpFeePct(rateModel, preUtilization, postUtilization);
|
|
312
|
+
return [2, { quoteBlock: quoteBlock, realizedLpFeePct: realizedLpFeePct }];
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
}); };
|
|
316
|
+
timeToCache = (_a = this.configOverride.timeToCache) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_CACHING_SAFE_LAG;
|
|
317
|
+
deposits.forEach(function (deposit) { return resolveUniqueQuoteTimestamps(deposit); });
|
|
318
|
+
quoteTimestamps = (0, utils_1.dedupArray)(deposits.map(function (_a) {
|
|
319
|
+
var quoteTimestamp = _a.quoteTimestamp;
|
|
320
|
+
return quoteTimestamp;
|
|
321
|
+
}));
|
|
322
|
+
_c = (_b = Object).fromEntries;
|
|
323
|
+
return [4, (0, utils_1.mapAsync)(quoteTimestamps, function (quoteTimestamp) { return resolveTimestampsToBlocks(quoteTimestamp); })];
|
|
324
|
+
case 1:
|
|
325
|
+
quoteBlocks = _c.apply(_b, [_f.sent()]);
|
|
326
|
+
_e = (_d = Object).fromEntries;
|
|
327
|
+
return [4, (0, utils_1.mapAsync)(getHubPoolTokens(), function (hubPoolToken) { return tslib_1.__awaiter(_this, void 0, void 0, function () { var _a; return tslib_1.__generator(this, function (_b) {
|
|
328
|
+
switch (_b.label) {
|
|
329
|
+
case 0:
|
|
330
|
+
_a = [hubPoolToken];
|
|
331
|
+
return [4, resolveUtilization(hubPoolToken)];
|
|
332
|
+
case 1: return [2, _a.concat([_b.sent()])];
|
|
333
|
+
}
|
|
334
|
+
}); }); })];
|
|
335
|
+
case 2:
|
|
336
|
+
utilization = _e.apply(_d, [_f.sent()]);
|
|
337
|
+
return [4, (0, utils_1.mapAsync)(deposits, function (deposit) { return computeRealizedLpFeePct(deposit); })];
|
|
338
|
+
case 3: return [2, _f.sent()];
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
HubPoolClient.prototype.getL1Tokens = function () {
|
|
344
|
+
return this.l1Tokens;
|
|
345
|
+
};
|
|
346
|
+
HubPoolClient.prototype.getTokenInfoForL1Token = function (l1Token) {
|
|
347
|
+
return this.l1Tokens.find(function (token) { return token.address === l1Token; });
|
|
348
|
+
};
|
|
349
|
+
HubPoolClient.prototype.getLpTokenInfoForL1Token = function (l1Token) {
|
|
350
|
+
return this.lpTokens[l1Token];
|
|
351
|
+
};
|
|
352
|
+
HubPoolClient.prototype.getL1TokenInfoForL2Token = function (l2Token, chainId) {
|
|
353
|
+
var l1TokenCounterpart = this.getL1TokenForL2TokenAtBlock(l2Token, chainId, this.latestBlockSearched);
|
|
354
|
+
return this.getTokenInfoForL1Token(l1TokenCounterpart);
|
|
355
|
+
};
|
|
356
|
+
HubPoolClient.prototype.getTokenInfoForDeposit = function (deposit) {
|
|
357
|
+
return this.getTokenInfoForL1Token(this.getL1TokenForL2TokenAtBlock(deposit.inputToken, deposit.originChainId, this.latestBlockSearched));
|
|
358
|
+
};
|
|
359
|
+
HubPoolClient.prototype.getTokenInfo = function (chainId, tokenAddress) {
|
|
360
|
+
var deposit = { originChainId: parseInt(chainId.toString()), inputToken: tokenAddress };
|
|
361
|
+
return this.getTokenInfoForDeposit(deposit);
|
|
362
|
+
};
|
|
363
|
+
HubPoolClient.prototype.areTokensEquivalent = function (tokenA, chainIdA, tokenB, chainIdB, hubPoolBlock) {
|
|
364
|
+
if (hubPoolBlock === void 0) { hubPoolBlock = this.latestBlockSearched; }
|
|
365
|
+
try {
|
|
366
|
+
var l1TokenA = this.getL1TokenForL2TokenAtBlock(tokenA, chainIdA, hubPoolBlock);
|
|
367
|
+
var l1TokenB = this.getL1TokenForL2TokenAtBlock(tokenB, chainIdB, hubPoolBlock);
|
|
368
|
+
if (l1TokenA !== l1TokenB) {
|
|
369
|
+
return false;
|
|
370
|
+
}
|
|
371
|
+
var _tokenA = this.getL2TokenForL1TokenAtBlock(l1TokenA, chainIdA, hubPoolBlock);
|
|
372
|
+
var _tokenB = this.getL2TokenForL1TokenAtBlock(l1TokenB, chainIdB, hubPoolBlock);
|
|
373
|
+
return tokenA === _tokenA && tokenB === _tokenB;
|
|
374
|
+
}
|
|
375
|
+
catch (_a) {
|
|
376
|
+
return false;
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
HubPoolClient.prototype.getSpokeActivationBlockForChain = function (chainId) {
|
|
380
|
+
var _a;
|
|
381
|
+
return (_a = this.getSpokePoolActivationBlock(chainId, this.getSpokePoolForBlock(chainId))) !== null && _a !== void 0 ? _a : 0;
|
|
382
|
+
};
|
|
383
|
+
HubPoolClient.prototype.isRootBundleValid = function (rootBundle, latestMainnetBlock) {
|
|
384
|
+
var nextRootBundle = this.getFollowingRootBundle(rootBundle);
|
|
385
|
+
var executedLeafCount = this.getExecutedLeavesForRootBundle(rootBundle, nextRootBundle ? Math.min(nextRootBundle.blockNumber, latestMainnetBlock) : latestMainnetBlock);
|
|
386
|
+
return executedLeafCount.length === rootBundle.poolRebalanceLeafCount;
|
|
387
|
+
};
|
|
388
|
+
HubPoolClient.prototype.getRootBundleEvalBlockNumberContainingBlock = function (latestMainnetBlock, block, chain, chainIdListOverride) {
|
|
389
|
+
var chainIdList = chainIdListOverride !== null && chainIdListOverride !== void 0 ? chainIdListOverride : this.configStoreClient.getChainIdIndicesForBlock(latestMainnetBlock);
|
|
390
|
+
var endingBlockNumber;
|
|
391
|
+
for (var i = this.proposedRootBundles.length - 1; i >= 0; i--) {
|
|
392
|
+
var rootBundle = this.proposedRootBundles[i];
|
|
393
|
+
var nextRootBundle = this.getFollowingRootBundle(rootBundle);
|
|
394
|
+
if (!this.isRootBundleValid(rootBundle, nextRootBundle ? nextRootBundle.blockNumber : latestMainnetBlock)) {
|
|
395
|
+
continue;
|
|
396
|
+
}
|
|
397
|
+
var bundleEvalBlockNumber = this.getBundleEndBlockForChain(rootBundle, chain, chainIdList);
|
|
398
|
+
if (bundleEvalBlockNumber <= block) {
|
|
399
|
+
if (bundleEvalBlockNumber === block) {
|
|
400
|
+
endingBlockNumber = bundleEvalBlockNumber;
|
|
401
|
+
}
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
endingBlockNumber = bundleEvalBlockNumber;
|
|
405
|
+
}
|
|
406
|
+
return endingBlockNumber;
|
|
407
|
+
};
|
|
408
|
+
HubPoolClient.prototype.getProposedRootBundlesInBlockRange = function (startingBlock, endingBlock) {
|
|
409
|
+
return this.proposedRootBundles.filter(function (bundle) { return bundle.blockNumber >= startingBlock && bundle.blockNumber <= endingBlock; });
|
|
410
|
+
};
|
|
411
|
+
HubPoolClient.prototype.getCancelledRootBundlesInBlockRange = function (startingBlock, endingBlock) {
|
|
412
|
+
return (0, utils_1.sortEventsDescending)(this.canceledRootBundles).filter(function (bundle) { return bundle.blockNumber >= startingBlock && bundle.blockNumber <= endingBlock; });
|
|
413
|
+
};
|
|
414
|
+
HubPoolClient.prototype.getDisputedRootBundlesInBlockRange = function (startingBlock, endingBlock) {
|
|
415
|
+
return (0, utils_1.sortEventsDescending)(this.disputedRootBundles).filter(function (bundle) { return bundle.blockNumber >= startingBlock && bundle.blockNumber <= endingBlock; });
|
|
416
|
+
};
|
|
417
|
+
HubPoolClient.prototype.getLatestProposedRootBundle = function () {
|
|
418
|
+
return this.proposedRootBundles[this.proposedRootBundles.length - 1];
|
|
419
|
+
};
|
|
420
|
+
HubPoolClient.prototype.getFollowingRootBundle = function (currentRootBundle) {
|
|
421
|
+
var index = lodash_1.default.findLastIndex(this.proposedRootBundles, function (bundle) { return bundle.blockNumber === currentRootBundle.blockNumber; });
|
|
422
|
+
if (index === -1 || index === this.proposedRootBundles.length - 1) {
|
|
423
|
+
return undefined;
|
|
424
|
+
}
|
|
425
|
+
return this.proposedRootBundles[index + 1];
|
|
426
|
+
};
|
|
427
|
+
HubPoolClient.prototype.getExecutedLeavesForRootBundle = function (rootBundle, latestMainnetBlockToSearch) {
|
|
428
|
+
return this.executedRootBundles.filter(function (executedLeaf) {
|
|
429
|
+
return executedLeaf.blockNumber <= latestMainnetBlockToSearch &&
|
|
430
|
+
executedLeaf.blockNumber > rootBundle.blockNumber;
|
|
431
|
+
});
|
|
432
|
+
};
|
|
433
|
+
HubPoolClient.prototype.getValidatedRootBundles = function (latestMainnetBlock) {
|
|
434
|
+
var _this = this;
|
|
435
|
+
if (latestMainnetBlock === void 0) { latestMainnetBlock = Number.MAX_SAFE_INTEGER; }
|
|
436
|
+
return this.proposedRootBundles.filter(function (rootBundle) {
|
|
437
|
+
if (rootBundle.blockNumber > latestMainnetBlock) {
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
440
|
+
return _this.isRootBundleValid(rootBundle, latestMainnetBlock);
|
|
441
|
+
});
|
|
442
|
+
};
|
|
443
|
+
HubPoolClient.prototype.getLatestFullyExecutedRootBundle = function (latestMainnetBlock) {
|
|
444
|
+
var _this = this;
|
|
445
|
+
return lodash_1.default.findLast(this.proposedRootBundles, function (rootBundle) {
|
|
446
|
+
if (rootBundle.blockNumber > latestMainnetBlock) {
|
|
447
|
+
return false;
|
|
448
|
+
}
|
|
449
|
+
return _this.isRootBundleValid(rootBundle, latestMainnetBlock);
|
|
450
|
+
});
|
|
451
|
+
};
|
|
452
|
+
HubPoolClient.prototype.getEarliestFullyExecutedRootBundle = function (latestMainnetBlock, startBlock) {
|
|
453
|
+
var _this = this;
|
|
454
|
+
if (startBlock === void 0) { startBlock = 0; }
|
|
455
|
+
return this.proposedRootBundles.find(function (rootBundle) {
|
|
456
|
+
if (rootBundle.blockNumber > latestMainnetBlock) {
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
if (rootBundle.blockNumber < startBlock) {
|
|
460
|
+
return false;
|
|
461
|
+
}
|
|
462
|
+
return _this.isRootBundleValid(rootBundle, latestMainnetBlock);
|
|
463
|
+
});
|
|
464
|
+
};
|
|
465
|
+
HubPoolClient.prototype.getNthFullyExecutedRootBundle = function (n, startBlock) {
|
|
466
|
+
if (n === 0) {
|
|
467
|
+
throw new Error("n cannot be 0");
|
|
468
|
+
}
|
|
469
|
+
if (!this.latestBlockSearched) {
|
|
470
|
+
throw new Error("HubPoolClient::getNthFullyExecutedRootBundle client not updated");
|
|
471
|
+
}
|
|
472
|
+
var bundleToReturn;
|
|
473
|
+
if (n < 0) {
|
|
474
|
+
var nextLatestMainnetBlock = startBlock !== null && startBlock !== void 0 ? startBlock : this.latestBlockSearched;
|
|
475
|
+
for (var i = 0; i < Math.abs(n); i++) {
|
|
476
|
+
bundleToReturn = this.getLatestFullyExecutedRootBundle(nextLatestMainnetBlock);
|
|
477
|
+
var bundleBlockNumber = bundleToReturn ? bundleToReturn.blockNumber : 0;
|
|
478
|
+
nextLatestMainnetBlock = Math.max(0, bundleBlockNumber - 1);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
else {
|
|
482
|
+
var nextStartBlock = startBlock !== null && startBlock !== void 0 ? startBlock : 0;
|
|
483
|
+
for (var i = 0; i < n; i++) {
|
|
484
|
+
bundleToReturn = this.getEarliestFullyExecutedRootBundle(this.latestBlockSearched, nextStartBlock);
|
|
485
|
+
var bundleBlockNumber = bundleToReturn ? bundleToReturn.blockNumber : 0;
|
|
486
|
+
nextStartBlock = Math.min(bundleBlockNumber + 1, this.latestBlockSearched);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
return bundleToReturn;
|
|
490
|
+
};
|
|
491
|
+
HubPoolClient.prototype.getLatestBundleEndBlockForChain = function (chainIdList, latestMainnetBlock, chainId) {
|
|
492
|
+
var latestFullyExecutedPoolRebalanceRoot = this.getLatestFullyExecutedRootBundle(latestMainnetBlock);
|
|
493
|
+
if (!latestFullyExecutedPoolRebalanceRoot) {
|
|
494
|
+
return 0;
|
|
495
|
+
}
|
|
496
|
+
return this.getBundleEndBlockForChain(latestFullyExecutedPoolRebalanceRoot, chainId, chainIdList);
|
|
497
|
+
};
|
|
498
|
+
HubPoolClient.prototype.getNextBundleStartBlockNumber = function (chainIdList, latestMainnetBlock, chainId) {
|
|
499
|
+
var endBlock = this.getLatestBundleEndBlockForChain(chainIdList, latestMainnetBlock, chainId);
|
|
500
|
+
return endBlock > 0 ? endBlock + 1 : 0;
|
|
501
|
+
};
|
|
502
|
+
HubPoolClient.prototype.getRunningBalanceBeforeBlockForChain = function (block, chain, l1Token) {
|
|
503
|
+
var executedRootBundle = (0, utils_1.sortEventsDescending)(this.executedRootBundles).find(function (executedLeaf) {
|
|
504
|
+
return (executedLeaf.blockNumber <= block &&
|
|
505
|
+
executedLeaf.chainId === chain &&
|
|
506
|
+
executedLeaf.l1Tokens.map(function (l1Token) { return l1Token.toLowerCase(); }).includes(l1Token.toLowerCase()));
|
|
507
|
+
});
|
|
508
|
+
return this.getRunningBalanceForToken(l1Token, executedRootBundle);
|
|
509
|
+
};
|
|
510
|
+
HubPoolClient.prototype.getRunningBalanceForToken = function (l1Token, executedRootBundle) {
|
|
511
|
+
var runningBalance = (0, utils_1.toBN)(0);
|
|
512
|
+
var incentiveBalance = (0, utils_1.toBN)(0);
|
|
513
|
+
if (executedRootBundle) {
|
|
514
|
+
var indexOfL1Token = executedRootBundle.l1Tokens
|
|
515
|
+
.map(function (l1Token) { return l1Token.toLowerCase(); })
|
|
516
|
+
.indexOf(l1Token.toLowerCase());
|
|
517
|
+
runningBalance = executedRootBundle.runningBalances[indexOfL1Token];
|
|
518
|
+
incentiveBalance = executedRootBundle.incentiveBalances[indexOfL1Token];
|
|
519
|
+
}
|
|
520
|
+
return { runningBalance: runningBalance, incentiveBalance: incentiveBalance };
|
|
521
|
+
};
|
|
522
|
+
HubPoolClient.prototype._update = function (eventNames) {
|
|
523
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
524
|
+
var hubPoolEvents, searchConfig, supportedEvents, eventSearchConfigs, timerStart, hubPool, multicallFunctions, _a, multicallOutput, events, _b, currentTime, pendingRootBundleProposal, _events;
|
|
525
|
+
var _this = this;
|
|
526
|
+
return tslib_1.__generator(this, function (_c) {
|
|
527
|
+
switch (_c.label) {
|
|
528
|
+
case 0:
|
|
529
|
+
hubPoolEvents = this.hubPoolEventFilters();
|
|
530
|
+
return [4, this.updateSearchConfig(this.hubPool.provider)];
|
|
531
|
+
case 1:
|
|
532
|
+
searchConfig = _c.sent();
|
|
533
|
+
if ((0, BaseAbstractClient_1.isUpdateFailureReason)(searchConfig)) {
|
|
534
|
+
return [2, { success: false, reason: searchConfig }];
|
|
535
|
+
}
|
|
536
|
+
supportedEvents = Object.keys(hubPoolEvents);
|
|
537
|
+
if (eventNames.some(function (eventName) { return !supportedEvents.includes(eventName); })) {
|
|
538
|
+
return [2, { success: false, reason: BaseAbstractClient_1.UpdateFailureReason.BadRequest }];
|
|
539
|
+
}
|
|
540
|
+
eventSearchConfigs = eventNames.map(function (eventName) {
|
|
541
|
+
var _searchConfig = tslib_1.__assign({}, searchConfig);
|
|
542
|
+
var overrideEvents = ["CrossChainContractsSet", "L1TokenEnabledForLiquidityProvision", "SetPoolRebalanceRoute"];
|
|
543
|
+
if (overrideEvents.includes(eventName) && !_this.isUpdated) {
|
|
544
|
+
_searchConfig.fromBlock = _this.deploymentBlock;
|
|
545
|
+
}
|
|
546
|
+
return {
|
|
547
|
+
eventName: eventName,
|
|
548
|
+
filter: hubPoolEvents[eventName],
|
|
549
|
+
searchConfig: _searchConfig,
|
|
550
|
+
};
|
|
551
|
+
});
|
|
552
|
+
this.logger.debug({
|
|
553
|
+
at: "HubPoolClient",
|
|
554
|
+
message: "Updating HubPool client",
|
|
555
|
+
searchConfig: eventSearchConfigs.map(function (_a) {
|
|
556
|
+
var eventName = _a.eventName, searchConfig = _a.searchConfig;
|
|
557
|
+
return ({ eventName: eventName, searchConfig: searchConfig });
|
|
558
|
+
}),
|
|
559
|
+
});
|
|
560
|
+
timerStart = Date.now();
|
|
561
|
+
hubPool = this.hubPool;
|
|
562
|
+
multicallFunctions = ["getCurrentTime", "rootBundleProposal"];
|
|
563
|
+
return [4, Promise.all(tslib_1.__spreadArray([
|
|
564
|
+
hubPool.callStatic.multicall(multicallFunctions.map(function (f) { return hubPool.interface.encodeFunctionData(f); }), { blockTag: searchConfig.toBlock })
|
|
565
|
+
], eventSearchConfigs.map(function (config) { return (0, utils_1.paginatedEventQuery)(hubPool, config.filter, config.searchConfig); }), true))];
|
|
566
|
+
case 2:
|
|
567
|
+
_a = _c.sent(), multicallOutput = _a[0], events = _a.slice(1);
|
|
568
|
+
_b = multicallFunctions.map(function (fn, idx) {
|
|
569
|
+
var output = hubPool.interface.decodeFunctionResult(fn, multicallOutput[idx]);
|
|
570
|
+
return output.length > 1 ? output : output[0];
|
|
571
|
+
}), currentTime = _b[0], pendingRootBundleProposal = _b[1];
|
|
572
|
+
this.logger.debug({
|
|
573
|
+
at: "HubPoolClient#_update",
|
|
574
|
+
message: "Time to query new events from RPC for ".concat(this.chainId, ": ").concat(Date.now() - timerStart, " ms"),
|
|
575
|
+
});
|
|
576
|
+
_events = Object.fromEntries(eventNames.map(function (eventName, idx) { return [eventName, events[idx]]; }));
|
|
577
|
+
return [2, {
|
|
578
|
+
success: true,
|
|
579
|
+
currentTime: currentTime,
|
|
580
|
+
pendingRootBundleProposal: pendingRootBundleProposal,
|
|
581
|
+
searchEndBlock: searchConfig.toBlock,
|
|
582
|
+
events: _events,
|
|
583
|
+
}];
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
});
|
|
587
|
+
};
|
|
588
|
+
HubPoolClient.prototype.update = function (eventsToQuery) {
|
|
589
|
+
if (eventsToQuery === void 0) { eventsToQuery = Object.keys(this.hubPoolEventFilters()); }
|
|
590
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
591
|
+
var update, events, currentTime, pendingRootBundleProposal, searchEndBlock, _i, _a, event_1, args, _b, _c, event_2, args, uniqueL1Tokens, _d, tokenInfo, lpTokenInfo_1, _loop_1, this_1, _e, tokenInfo_1, info, _f, _g, event_3, executedRootBundle, l1Tokens, runningBalances, nTokens, mostRecentProposedRootBundle;
|
|
592
|
+
var _h, _j, _k;
|
|
593
|
+
var _this = this;
|
|
594
|
+
return tslib_1.__generator(this, function (_l) {
|
|
595
|
+
switch (_l.label) {
|
|
596
|
+
case 0:
|
|
597
|
+
if (!this.configStoreClient.isUpdated) {
|
|
598
|
+
throw new Error("ConfigStoreClient not updated");
|
|
599
|
+
}
|
|
600
|
+
return [4, this._update(eventsToQuery)];
|
|
601
|
+
case 1:
|
|
602
|
+
update = _l.sent();
|
|
603
|
+
if (!update.success) {
|
|
604
|
+
if (update.reason !== BaseAbstractClient_1.UpdateFailureReason.AlreadyUpdated) {
|
|
605
|
+
throw new Error("Unable to update HubPoolClient: ".concat(update.reason));
|
|
606
|
+
}
|
|
607
|
+
return [2];
|
|
608
|
+
}
|
|
609
|
+
events = update.events, currentTime = update.currentTime, pendingRootBundleProposal = update.pendingRootBundleProposal, searchEndBlock = update.searchEndBlock;
|
|
610
|
+
if (eventsToQuery.includes("CrossChainContractsSet")) {
|
|
611
|
+
for (_i = 0, _a = events["CrossChainContractsSet"]; _i < _a.length; _i++) {
|
|
612
|
+
event_1 = _a[_i];
|
|
613
|
+
args = (0, utils_1.spreadEventWithBlockNumber)(event_1);
|
|
614
|
+
(0, utils_1.assign)(this.crossChainContracts, [args.l2ChainId], [
|
|
615
|
+
{
|
|
616
|
+
spokePool: args.spokePool,
|
|
617
|
+
blockNumber: args.blockNumber,
|
|
618
|
+
transactionIndex: args.transactionIndex,
|
|
619
|
+
logIndex: args.logIndex,
|
|
620
|
+
},
|
|
621
|
+
]);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
if (eventsToQuery.includes("SetPoolRebalanceRoute")) {
|
|
625
|
+
for (_b = 0, _c = events["SetPoolRebalanceRoute"]; _b < _c.length; _b++) {
|
|
626
|
+
event_2 = _c[_b];
|
|
627
|
+
args = (0, utils_1.spreadEventWithBlockNumber)(event_2);
|
|
628
|
+
(0, utils_1.assign)(this.l1TokensToDestinationTokens, [args.l1Token, args.destinationChainId], args.destinationToken);
|
|
629
|
+
(0, utils_1.assign)(this.l1TokensToDestinationTokensWithBlock, [args.l1Token, args.destinationChainId], [
|
|
630
|
+
{
|
|
631
|
+
l1Token: args.l1Token,
|
|
632
|
+
l2Token: args.destinationToken,
|
|
633
|
+
blockNumber: args.blockNumber,
|
|
634
|
+
transactionIndex: args.transactionIndex,
|
|
635
|
+
logIndex: args.logIndex,
|
|
636
|
+
},
|
|
637
|
+
]);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
if (!eventsToQuery.includes("L1TokenEnabledForLiquidityProvision")) return [3, 3];
|
|
641
|
+
uniqueL1Tokens = tslib_1.__spreadArray([], Array.from(new Set(events["L1TokenEnabledForLiquidityProvision"].map(function (event) { return (0, utils_1.spreadEvent)(event.args).l1Token; }))), true);
|
|
642
|
+
return [4, Promise.all([
|
|
643
|
+
Promise.all(uniqueL1Tokens.map(function (l1Token) { return (0, utils_1.fetchTokenInfo)(l1Token, _this.hubPool.provider); })),
|
|
644
|
+
Promise.all(uniqueL1Tokens.map(function (l1Token) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
|
|
645
|
+
switch (_a.label) {
|
|
646
|
+
case 0: return [4, this.hubPool.pooledTokens(l1Token, { blockTag: update.searchEndBlock })];
|
|
647
|
+
case 1: return [2, _a.sent()];
|
|
648
|
+
}
|
|
649
|
+
}); }); })),
|
|
650
|
+
])];
|
|
651
|
+
case 2:
|
|
652
|
+
_d = _l.sent(), tokenInfo = _d[0], lpTokenInfo_1 = _d[1];
|
|
653
|
+
_loop_1 = function (info) {
|
|
654
|
+
if (!this_1.l1Tokens.find(function (token) { return token.symbol === info.symbol; })) {
|
|
655
|
+
if (info.decimals > 0 && info.decimals <= 18) {
|
|
656
|
+
this_1.l1Tokens.push(info);
|
|
657
|
+
}
|
|
658
|
+
else {
|
|
659
|
+
throw new Error("Unsupported HubPool token: ".concat(JSON.stringify(info)));
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
this_1 = this;
|
|
664
|
+
for (_e = 0, tokenInfo_1 = tokenInfo; _e < tokenInfo_1.length; _e++) {
|
|
665
|
+
info = tokenInfo_1[_e];
|
|
666
|
+
_loop_1(info);
|
|
667
|
+
}
|
|
668
|
+
uniqueL1Tokens.forEach(function (token, i) {
|
|
669
|
+
_this.lpTokens[token] = {
|
|
670
|
+
lastLpFeeUpdate: lpTokenInfo_1[i].lastLpFeeUpdate,
|
|
671
|
+
liquidReserves: lpTokenInfo_1[i].liquidReserves,
|
|
672
|
+
};
|
|
673
|
+
});
|
|
674
|
+
_l.label = 3;
|
|
675
|
+
case 3:
|
|
676
|
+
if (eventsToQuery.includes("ProposeRootBundle")) {
|
|
677
|
+
(_h = this.proposedRootBundles).push.apply(_h, events["ProposeRootBundle"]
|
|
678
|
+
.filter(function (event) { return !_this.configOverride.ignoredHubProposedBundles.includes(event.blockNumber); })
|
|
679
|
+
.map(function (event) {
|
|
680
|
+
return tslib_1.__assign(tslib_1.__assign({}, (0, utils_1.spreadEventWithBlockNumber)(event)), { transactionHash: event.transactionHash });
|
|
681
|
+
}));
|
|
682
|
+
}
|
|
683
|
+
if (eventsToQuery.includes("RootBundleCanceled")) {
|
|
684
|
+
(_j = this.canceledRootBundles).push.apply(_j, events["RootBundleCanceled"].map(function (event) { return (0, utils_1.spreadEventWithBlockNumber)(event); }));
|
|
685
|
+
}
|
|
686
|
+
if (eventsToQuery.includes("RootBundleDisputed")) {
|
|
687
|
+
(_k = this.disputedRootBundles).push.apply(_k, events["RootBundleDisputed"].map(function (event) { return (0, utils_1.spreadEventWithBlockNumber)(event); }));
|
|
688
|
+
}
|
|
689
|
+
if (eventsToQuery.includes("RootBundleExecuted")) {
|
|
690
|
+
for (_f = 0, _g = events["RootBundleExecuted"]; _f < _g.length; _f++) {
|
|
691
|
+
event_3 = _g[_f];
|
|
692
|
+
if (this.configOverride.ignoredHubExecutedBundles.includes(event_3.blockNumber)) {
|
|
693
|
+
continue;
|
|
694
|
+
}
|
|
695
|
+
executedRootBundle = (0, utils_1.spreadEventWithBlockNumber)(event_3);
|
|
696
|
+
l1Tokens = executedRootBundle.l1Tokens, runningBalances = executedRootBundle.runningBalances;
|
|
697
|
+
nTokens = l1Tokens.length;
|
|
698
|
+
if (![nTokens, nTokens * 2].includes(runningBalances.length)) {
|
|
699
|
+
throw new Error("Invalid runningBalances length: ".concat(runningBalances.length, ".") +
|
|
700
|
+
" Expected ".concat(nTokens, " or ").concat(nTokens * 2, " for chain ").concat(this.chainId, " transaction ").concat(event_3.transactionHash));
|
|
701
|
+
}
|
|
702
|
+
executedRootBundle.runningBalances = runningBalances.slice(0, nTokens);
|
|
703
|
+
executedRootBundle.incentiveBalances =
|
|
704
|
+
runningBalances.length > nTokens ? runningBalances.slice(nTokens) : runningBalances.map(function () { return (0, utils_1.toBN)(0); });
|
|
705
|
+
this.executedRootBundles.push(executedRootBundle);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
if (eventsToQuery.includes("ProposeRootBundle")) {
|
|
709
|
+
if (pendingRootBundleProposal.unclaimedPoolRebalanceLeafCount > 0) {
|
|
710
|
+
mostRecentProposedRootBundle = this.proposedRootBundles[this.proposedRootBundles.length - 1];
|
|
711
|
+
this.pendingRootBundle = {
|
|
712
|
+
poolRebalanceRoot: pendingRootBundleProposal.poolRebalanceRoot,
|
|
713
|
+
relayerRefundRoot: pendingRootBundleProposal.relayerRefundRoot,
|
|
714
|
+
slowRelayRoot: pendingRootBundleProposal.slowRelayRoot,
|
|
715
|
+
proposer: pendingRootBundleProposal.proposer,
|
|
716
|
+
unclaimedPoolRebalanceLeafCount: pendingRootBundleProposal.unclaimedPoolRebalanceLeafCount,
|
|
717
|
+
challengePeriodEndTimestamp: pendingRootBundleProposal.challengePeriodEndTimestamp,
|
|
718
|
+
bundleEvaluationBlockNumbers: mostRecentProposedRootBundle.bundleEvaluationBlockNumbers.map(function (block) {
|
|
719
|
+
try {
|
|
720
|
+
return block.toNumber();
|
|
721
|
+
}
|
|
722
|
+
catch (_a) {
|
|
723
|
+
return 0;
|
|
724
|
+
}
|
|
725
|
+
}),
|
|
726
|
+
proposalBlockNumber: mostRecentProposedRootBundle.blockNumber,
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
else {
|
|
730
|
+
this.pendingRootBundle = undefined;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
this.currentTime = currentTime;
|
|
734
|
+
this.latestBlockSearched = searchEndBlock;
|
|
735
|
+
this.firstBlockToSearch = update.searchEndBlock + 1;
|
|
736
|
+
this.eventSearchConfig.toBlock = undefined;
|
|
737
|
+
this.isUpdated = true;
|
|
738
|
+
this.logger.debug({ at: "HubPoolClient::update", message: "HubPool client updated!", searchEndBlock: searchEndBlock });
|
|
739
|
+
return [2];
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
});
|
|
743
|
+
};
|
|
744
|
+
HubPoolClient.prototype.getBundleEndBlockForChain = function (proposeRootBundleEvent, chainId, chainIdList) {
|
|
745
|
+
var bundleEvaluationBlockNumbers = proposeRootBundleEvent.bundleEvaluationBlockNumbers;
|
|
746
|
+
var chainIdIndex = chainIdList.indexOf(chainId);
|
|
747
|
+
if (chainIdIndex === -1) {
|
|
748
|
+
return 0;
|
|
749
|
+
}
|
|
750
|
+
if (chainIdIndex >= bundleEvaluationBlockNumbers.length) {
|
|
751
|
+
return 0;
|
|
752
|
+
}
|
|
753
|
+
return bundleEvaluationBlockNumbers[chainIdIndex].toNumber();
|
|
754
|
+
};
|
|
755
|
+
return HubPoolClient;
|
|
756
|
+
}(BaseAbstractClient_1.BaseAbstractClient));
|
|
757
|
+
exports.HubPoolClient = HubPoolClient;
|
|
758
|
+
//# sourceMappingURL=HubPoolClient.js.map
|