upshift-finance 1.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 +21 -0
- package/README.md +349 -0
- package/lib/abis/AddressResolver.d.ts +28 -0
- package/lib/abis/AddressResolver.js +23 -0
- package/lib/abis/ChainlinkV3.d.ts +87 -0
- package/lib/abis/ChainlinkV3.js +117 -0
- package/lib/abis/ERC20.d.ts +168 -0
- package/lib/abis/ERC20.js +226 -0
- package/lib/abis/ERC20_Bytes32.d.ts +139 -0
- package/lib/abis/ERC20_Bytes32.js +196 -0
- package/lib/abis/ERC4626.d.ts +364 -0
- package/lib/abis/ERC4626.js +507 -0
- package/lib/abis/ERC721.d.ts +231 -0
- package/lib/abis/ERC721.js +321 -0
- package/lib/abis/FeeOracle.d.ts +120 -0
- package/lib/abis/FeeOracle.js +162 -0
- package/lib/abis/LendingPool.d.ts +1393 -0
- package/lib/abis/LendingPool.js +1807 -0
- package/lib/abis/LendingPoolV2.d.ts +1413 -0
- package/lib/abis/LendingPoolV2.js +1833 -0
- package/lib/abis/LendingPoolV3.d.ts +1677 -0
- package/lib/abis/LendingPoolV3.js +1160 -0
- package/lib/abis/Loan.d.ts +837 -0
- package/lib/abis/Loan.js +1080 -0
- package/lib/abis/MultiAssetNativeDepositWrapper.d.ts +137 -0
- package/lib/abis/MultiAssetNativeDepositWrapper.js +125 -0
- package/lib/abis/Multicall3.d.ts +30 -0
- package/lib/abis/Multicall3.js +97 -0
- package/lib/abis/OFT.d.ts +116 -0
- package/lib/abis/OFT.js +85 -0
- package/lib/abis/PoolAdapter.d.ts +36 -0
- package/lib/abis/PoolAdapter.js +51 -0
- package/lib/abis/RewardDistributor.d.ts +267 -0
- package/lib/abis/RewardDistributor.js +352 -0
- package/lib/abis/RwaRedeemSubaccount.d.ts +747 -0
- package/lib/abis/RwaRedeemSubaccount.js +548 -0
- package/lib/abis/SmartAccount.d.ts +17 -0
- package/lib/abis/SmartAccount.js +19 -0
- package/lib/abis/SwapRouter.d.ts +1043 -0
- package/lib/abis/SwapRouter.js +740 -0
- package/lib/abis/TextResolver.d.ts +16 -0
- package/lib/abis/TextResolver.js +16 -0
- package/lib/abis/TokenizedVaultV2.d.ts +1364 -0
- package/lib/abis/TokenizedVaultV2.js +1041 -0
- package/lib/abis/TokenizedVaultV2DepositWithPermit.d.ts +1456 -0
- package/lib/abis/TokenizedVaultV2DepositWithPermit.js +1878 -0
- package/lib/abis/TokenizedVaultV2Receipt.d.ts +1568 -0
- package/lib/abis/TokenizedVaultV2Receipt.js +1061 -0
- package/lib/abis/TokenizedVaultV2SenderAllocationWhitelist.d.ts +454 -0
- package/lib/abis/TokenizedVaultV2SenderAllocationWhitelist.js +327 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAllocation.d.ts +1466 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAllocation.js +1092 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAssets.d.ts +274 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAssets.js +167 -0
- package/lib/abis/UniversalResolverResolve.d.ts +69 -0
- package/lib/abis/UniversalResolverResolve.js +35 -0
- package/lib/abis/UniversalSignatureValidator.d.ts +17 -0
- package/lib/abis/UniversalSignatureValidator.js +30 -0
- package/lib/abis/WrapperAdapter.d.ts +71 -0
- package/lib/abis/WrapperAdapter.js +77 -0
- package/lib/abis/index.d.ts +34 -0
- package/lib/abis/index.js +51 -0
- package/lib/adapters/evm/getters.d.ts +19 -0
- package/lib/adapters/evm/getters.js +209 -0
- package/lib/adapters/evm/index.d.ts +353 -0
- package/lib/adapters/evm/index.js +434 -0
- package/lib/adapters/evm/utils.d.ts +8 -0
- package/lib/adapters/evm/utils.js +51 -0
- package/lib/adapters/solana/constants.d.ts +33 -0
- package/lib/adapters/solana/constants.js +52 -0
- package/lib/adapters/solana/getters.d.ts +11 -0
- package/lib/adapters/solana/getters.js +165 -0
- package/lib/adapters/solana/idl/vault-idl.d.ts +272 -0
- package/lib/adapters/solana/idl/vault-idl.js +1084 -0
- package/lib/adapters/solana/index.d.ts +233 -0
- package/lib/adapters/solana/index.js +291 -0
- package/lib/adapters/solana/types.d.ts +67 -0
- package/lib/adapters/solana/types.js +3 -0
- package/lib/adapters/solana/utils.d.ts +141 -0
- package/lib/adapters/solana/utils.js +595 -0
- package/lib/adapters/solana/vault.actions.d.ts +57 -0
- package/lib/adapters/solana/vault.actions.js +379 -0
- package/lib/adapters/stellar/actions.d.ts +28 -0
- package/lib/adapters/stellar/actions.js +77 -0
- package/lib/adapters/stellar/constants.d.ts +43 -0
- package/lib/adapters/stellar/constants.js +53 -0
- package/lib/adapters/stellar/getters.d.ts +68 -0
- package/lib/adapters/stellar/getters.js +290 -0
- package/lib/adapters/stellar/index.d.ts +114 -0
- package/lib/adapters/stellar/index.js +175 -0
- package/lib/adapters/stellar/soroban.d.ts +123 -0
- package/lib/adapters/stellar/soroban.js +613 -0
- package/lib/adapters/stellar/submit.d.ts +34 -0
- package/lib/adapters/stellar/submit.js +149 -0
- package/lib/adapters/stellar/types.d.ts +58 -0
- package/lib/adapters/stellar/types.js +6 -0
- package/lib/adapters/stellar/utils.d.ts +24 -0
- package/lib/adapters/stellar/utils.js +34 -0
- package/lib/adapters/sui/constants.d.ts +14 -0
- package/lib/adapters/sui/constants.js +29 -0
- package/lib/adapters/sui/getters.d.ts +9 -0
- package/lib/adapters/sui/getters.js +60 -0
- package/lib/adapters/sui/index.d.ts +45 -0
- package/lib/adapters/sui/index.js +101 -0
- package/lib/adapters/sui/transformer.d.ts +10 -0
- package/lib/adapters/sui/transformer.js +107 -0
- package/lib/adapters/sui/types.d.ts +66 -0
- package/lib/adapters/sui/types.js +3 -0
- package/lib/adapters/sui/utils.d.ts +10 -0
- package/lib/adapters/sui/utils.js +29 -0
- package/lib/core/analytics/chain-name.d.ts +9 -0
- package/lib/core/analytics/chain-name.js +34 -0
- package/lib/core/analytics/constants.d.ts +5 -0
- package/lib/core/analytics/constants.js +9 -0
- package/lib/core/analytics/env.d.ts +29 -0
- package/lib/core/analytics/env.js +59 -0
- package/lib/core/analytics/index.d.ts +36 -0
- package/lib/core/analytics/index.js +79 -0
- package/lib/core/analytics/instrumentation.d.ts +29 -0
- package/lib/core/analytics/instrumentation.js +277 -0
- package/lib/core/analytics/method-taxonomy.d.ts +19 -0
- package/lib/core/analytics/method-taxonomy.js +128 -0
- package/lib/core/analytics/metrics.d.ts +33 -0
- package/lib/core/analytics/metrics.js +116 -0
- package/lib/core/analytics/sanitize.d.ts +44 -0
- package/lib/core/analytics/sanitize.js +260 -0
- package/lib/core/analytics/sentry-runtime.d.ts +15 -0
- package/lib/core/analytics/sentry-runtime.js +97 -0
- package/lib/core/analytics/sentry.d.ts +67 -0
- package/lib/core/analytics/sentry.js +613 -0
- package/lib/core/analytics/types.d.ts +48 -0
- package/lib/core/analytics/types.js +3 -0
- package/lib/core/analytics/user-identity.d.ts +41 -0
- package/lib/core/analytics/user-identity.js +141 -0
- package/lib/core/analytics/version.d.ts +6 -0
- package/lib/core/analytics/version.js +10 -0
- package/lib/core/attribution.d.ts +111 -0
- package/lib/core/attribution.js +142 -0
- package/lib/core/auth/index.d.ts +1 -0
- package/lib/core/auth/index.js +18 -0
- package/lib/core/auth/verify.d.ts +2 -0
- package/lib/core/auth/verify.js +31 -0
- package/lib/core/base.class.d.ts +152 -0
- package/lib/core/base.class.js +172 -0
- package/lib/core/cache.d.ts +9 -0
- package/lib/core/cache.js +31 -0
- package/lib/core/constants/adapters.d.ts +103 -0
- package/lib/core/constants/adapters.js +180 -0
- package/lib/core/constants/core.d.ts +133 -0
- package/lib/core/constants/core.js +209 -0
- package/lib/core/constants/swap-router.d.ts +150 -0
- package/lib/core/constants/swap-router.js +169 -0
- package/lib/core/constants/vaults.d.ts +93 -0
- package/lib/core/constants/vaults.js +273 -0
- package/lib/core/constants/web3.d.ts +91 -0
- package/lib/core/constants/web3.js +229 -0
- package/lib/core/errors/index.d.ts +114 -0
- package/lib/core/errors/index.js +183 -0
- package/lib/core/fetcher.d.ts +198 -0
- package/lib/core/fetcher.js +903 -0
- package/lib/core/helpers/adapters.d.ts +13 -0
- package/lib/core/helpers/adapters.js +39 -0
- package/lib/core/helpers/chain-address.d.ts +13 -0
- package/lib/core/helpers/chain-address.js +47 -0
- package/lib/core/helpers/chain-error.d.ts +207 -0
- package/lib/core/helpers/chain-error.js +682 -0
- package/lib/core/helpers/chain-support.d.ts +80 -0
- package/lib/core/helpers/chain-support.js +115 -0
- package/lib/core/helpers/core.d.ts +68 -0
- package/lib/core/helpers/core.js +285 -0
- package/lib/core/helpers/explorer-link.d.ts +16 -0
- package/lib/core/helpers/explorer-link.js +26 -0
- package/lib/core/helpers/multicall.d.ts +68 -0
- package/lib/core/helpers/multicall.js +103 -0
- package/lib/core/helpers/revert-decode.d.ts +248 -0
- package/lib/core/helpers/revert-decode.js +515 -0
- package/lib/core/helpers/signer.d.ts +52 -0
- package/lib/core/helpers/signer.js +145 -0
- package/lib/core/helpers/swap-router.d.ts +211 -0
- package/lib/core/helpers/swap-router.js +480 -0
- package/lib/core/helpers/vault-version.d.ts +23 -0
- package/lib/core/helpers/vault-version.js +75 -0
- package/lib/core/helpers/vaults.d.ts +89 -0
- package/lib/core/helpers/vaults.js +235 -0
- package/lib/core/helpers/web3.d.ts +353 -0
- package/lib/core/helpers/web3.js +992 -0
- package/lib/core/index.d.ts +23 -0
- package/lib/core/index.js +40 -0
- package/lib/core/logger/index.d.ts +98 -0
- package/lib/core/logger/index.js +144 -0
- package/lib/core/logger/slack.d.ts +16 -0
- package/lib/core/logger/slack.js +57 -0
- package/lib/core/vault-metadata.d.ts +12 -0
- package/lib/core/vault-metadata.js +42 -0
- package/lib/core/version-check.d.ts +58 -0
- package/lib/core/version-check.js +182 -0
- package/lib/evm/index.d.ts +2 -0
- package/lib/evm/index.js +19 -0
- package/lib/evm/methods/crossChainVault.d.ts +128 -0
- package/lib/evm/methods/crossChainVault.js +853 -0
- package/lib/evm/methods/crossChainVaultRegistry.d.ts +93 -0
- package/lib/evm/methods/crossChainVaultRegistry.js +240 -0
- package/lib/evm/methods/index.d.ts +2 -0
- package/lib/evm/methods/index.js +19 -0
- package/lib/evm/types/crossChain.d.ts +363 -0
- package/lib/evm/types/crossChain.js +20 -0
- package/lib/evm/types/index.d.ts +1 -0
- package/lib/evm/types/index.js +18 -0
- package/lib/index.d.ts +30 -0
- package/lib/index.js +52 -0
- package/lib/main.d.ts +527 -0
- package/lib/main.js +601 -0
- package/lib/modules/api/fetcher.d.ts +82 -0
- package/lib/modules/api/fetcher.js +150 -0
- package/lib/modules/api/index.d.ts +1 -0
- package/lib/modules/api/index.js +6 -0
- package/lib/modules/api/main.d.ts +313 -0
- package/lib/modules/api/main.js +479 -0
- package/lib/modules/sub-accounts/fetcher.d.ts +53 -0
- package/lib/modules/sub-accounts/fetcher.js +120 -0
- package/lib/modules/sub-accounts/index.d.ts +2 -0
- package/lib/modules/sub-accounts/index.js +19 -0
- package/lib/modules/sub-accounts/main.d.ts +243 -0
- package/lib/modules/sub-accounts/main.js +205 -0
- package/lib/modules/sub-accounts/utils.d.ts +106 -0
- package/lib/modules/sub-accounts/utils.js +112 -0
- package/lib/modules/vaults/adapter.helpers.d.ts +64 -0
- package/lib/modules/vaults/adapter.helpers.js +184 -0
- package/lib/modules/vaults/fetcher.d.ts +147 -0
- package/lib/modules/vaults/fetcher.js +368 -0
- package/lib/modules/vaults/getters.d.ts +570 -0
- package/lib/modules/vaults/getters.js +3051 -0
- package/lib/modules/vaults/index.d.ts +20 -0
- package/lib/modules/vaults/index.js +44 -0
- package/lib/modules/vaults/main.d.ts +601 -0
- package/lib/modules/vaults/main.js +1623 -0
- package/lib/modules/vaults/prefetch.d.ts +65 -0
- package/lib/modules/vaults/prefetch.js +120 -0
- package/lib/modules/vaults/read.actions.d.ts +225 -0
- package/lib/modules/vaults/read.actions.js +596 -0
- package/lib/modules/vaults/types.d.ts +71 -0
- package/lib/modules/vaults/types.js +3 -0
- package/lib/modules/vaults/utils/call-data-decoder.d.ts +61 -0
- package/lib/modules/vaults/utils/call-data-decoder.js +194 -0
- package/lib/modules/vaults/utils/date-utils.d.ts +50 -0
- package/lib/modules/vaults/utils/date-utils.js +84 -0
- package/lib/modules/vaults/utils.d.ts +140 -0
- package/lib/modules/vaults/utils.js +799 -0
- package/lib/modules/vaults/write.actions.d.ts +529 -0
- package/lib/modules/vaults/write.actions.js +1749 -0
- package/lib/polyfills.d.ts +1 -0
- package/lib/polyfills.js +12 -0
- package/lib/sdk.d.ts +26721 -0
- package/lib/services/coingecko/fetcher.d.ts +15 -0
- package/lib/services/coingecko/fetcher.js +67 -0
- package/lib/services/coingecko/index.d.ts +2 -0
- package/lib/services/coingecko/index.js +19 -0
- package/lib/services/coingecko/utils.d.ts +1 -0
- package/lib/services/coingecko/utils.js +24 -0
- package/lib/services/debank/fetcher.d.ts +126 -0
- package/lib/services/debank/fetcher.js +47 -0
- package/lib/services/debank/index.d.ts +2 -0
- package/lib/services/debank/index.js +19 -0
- package/lib/services/debank/utils.d.ts +38 -0
- package/lib/services/debank/utils.js +297 -0
- package/lib/services/layerzero/deposits.d.ts +49 -0
- package/lib/services/layerzero/deposits.js +166 -0
- package/lib/services/layerzero/redeems.d.ts +20 -0
- package/lib/services/layerzero/redeems.js +92 -0
- package/lib/services/layerzero/utils.d.ts +9 -0
- package/lib/services/layerzero/utils.js +22 -0
- package/lib/services/octavfi/fetcher.d.ts +9 -0
- package/lib/services/octavfi/fetcher.js +103 -0
- package/lib/services/octavfi/index.d.ts +3 -0
- package/lib/services/octavfi/index.js +20 -0
- package/lib/services/octavfi/types.d.ts +34 -0
- package/lib/services/octavfi/types.js +3 -0
- package/lib/services/octavfi/utils.d.ts +16 -0
- package/lib/services/octavfi/utils.js +212 -0
- package/lib/services/subgraph/fetcher.d.ts +2 -0
- package/lib/services/subgraph/fetcher.js +61 -0
- package/lib/services/subgraph/index.d.ts +2 -0
- package/lib/services/subgraph/index.js +19 -0
- package/lib/services/subgraph/schema.d.ts +45 -0
- package/lib/services/subgraph/schema.js +75 -0
- package/lib/services/subgraph/vaults.d.ts +25 -0
- package/lib/services/subgraph/vaults.js +1106 -0
- package/lib/services/swap-quotes/index.d.ts +105 -0
- package/lib/services/swap-quotes/index.js +77 -0
- package/lib/services/swap-quotes/paraswap.d.ts +51 -0
- package/lib/services/swap-quotes/paraswap.js +138 -0
- package/lib/types/api.d.ts +280 -0
- package/lib/types/api.js +3 -0
- package/lib/types/index.d.ts +12 -0
- package/lib/types/index.js +28 -0
- package/lib/types/points.d.ts +28 -0
- package/lib/types/points.js +3 -0
- package/lib/types/pools.d.ts +144 -0
- package/lib/types/pools.js +3 -0
- package/lib/types/staking.d.ts +28 -0
- package/lib/types/staking.js +3 -0
- package/lib/types/sub-accounts.d.ts +140 -0
- package/lib/types/sub-accounts.js +3 -0
- package/lib/types/subgraph.d.ts +74 -0
- package/lib/types/subgraph.js +3 -0
- package/lib/types/typed-contract.d.ts +102 -0
- package/lib/types/typed-contract.js +3 -0
- package/lib/types/user.d.ts +1 -0
- package/lib/types/user.js +3 -0
- package/lib/types/vaults.d.ts +714 -0
- package/lib/types/vaults.js +24 -0
- package/lib/types/web3.d.ts +51 -0
- package/lib/types/web3.js +14 -0
- package/lib/types/webserver.d.ts +698 -0
- package/lib/types/webserver.js +3 -0
- package/package.json +78 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VAULT_SYMBOLS_REVERSE = exports.VAULT_SYMBOLS = exports.SUBGRAPH_VAULT_URLS = exports.GOLDSKY_BASE_URL = exports.NEMO_VAULT_ADDRESS = exports.VAULT_FUNCTIONS_V2_WHITELISTED_ASSETS = exports.VAULT_FUNCTIONS_V2_RECEIPT = exports.VAULT_FUNCTIONS_V2 = exports.VAULT_FUNCTIONS_V1 = exports.TVL_EXCLUDED_VAULTS = exports.IDLE_CAPITAL_BORROWER_ADDRESS = exports.OLD_LENDING_POOLS = exports.WRAPPER_ADAPTOR = exports.MULTI_ASSET_VAULTS = exports.VAULT_ALLOCATION_SUBACCOUNTS = void 0;
|
|
4
|
+
const ethers_1 = require("ethers");
|
|
5
|
+
/**
|
|
6
|
+
* Table of Contents
|
|
7
|
+
* - Hardcoded Addresses
|
|
8
|
+
* - Vault Functions to Call
|
|
9
|
+
* - Subgraph URLs
|
|
10
|
+
* - Vault Receipt Symbol Mapping
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Hardcoded subaccount addresses for specific vaults allocations
|
|
14
|
+
*/
|
|
15
|
+
exports.VAULT_ALLOCATION_SUBACCOUNTS = {
|
|
16
|
+
// For the Agora AUSD vault, fetch the vault allocations from the Caleb subaccount
|
|
17
|
+
AgoraAUSD: {
|
|
18
|
+
address: (0, ethers_1.getAddress)('0x828BC5895b78b2fb591018Ca5bDC2064742D6D0f'),
|
|
19
|
+
subaccount: (0, ethers_1.getAddress)('0xFff71B0b66f076C60Fa2f176a34a6EA709ccF21B'),
|
|
20
|
+
useDebank: false,
|
|
21
|
+
},
|
|
22
|
+
// For the Earn AUSD (Monad) vault, fetch the vault loans from the RockawayX subaccount
|
|
23
|
+
// fetch the rest of the exposures from Debank
|
|
24
|
+
earnAUSD: {
|
|
25
|
+
address: (0, ethers_1.getAddress)('0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA'),
|
|
26
|
+
subaccount: (0, ethers_1.getAddress)('0xC8c0Ffb8Ff3BDA26321224e800B3B38AEaB48799'),
|
|
27
|
+
useDebank: true,
|
|
28
|
+
},
|
|
29
|
+
// For the Monarq XRP Yield Vault (Flare), surface the borrower subaccount and
|
|
30
|
+
// keep vault-level Debank exposure (mirrors earnAUSD).
|
|
31
|
+
MonarqXRP: {
|
|
32
|
+
address: (0, ethers_1.getAddress)('0x2439D4bb753A0f3777d4C9011AFacc475ba6B951'),
|
|
33
|
+
subaccount: (0, ethers_1.getAddress)('0xF755B2244C1C1f20cA03C3Bb472175C9a4E250f2'),
|
|
34
|
+
useDebank: true,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated use the backend responses /tokenized_vault internal_type field to determine if the vault is an old lending pool
|
|
39
|
+
* @todo use the backend responses /tokenized_vault internal_type field to determine if the vault is an old lending pool
|
|
40
|
+
*/
|
|
41
|
+
exports.MULTI_ASSET_VAULTS = [
|
|
42
|
+
//Wild
|
|
43
|
+
(0, ethers_1.getAddress)('0x18EE038C114a07f4B08b420fb1E4149a4F357249'),
|
|
44
|
+
//Yuzu
|
|
45
|
+
(0, ethers_1.getAddress)('0x517677A19D8ae6FF600FB86C3C7bFCCD651e3eec'),
|
|
46
|
+
//HyENA
|
|
47
|
+
(0, ethers_1.getAddress)('0x8fFDcd8A96d293f45aA044d10b899F9D71897E8a'),
|
|
48
|
+
//SingularV
|
|
49
|
+
(0, ethers_1.getAddress)('0xd411aCaE2Bc7019322277A21ff005d94705661C5'),
|
|
50
|
+
//Neutrl
|
|
51
|
+
(0, ethers_1.getAddress)('0xAEEb2fB279a5aA837367B9D2582F898a63b06ca1'),
|
|
52
|
+
// HCL Stroom
|
|
53
|
+
(0, ethers_1.getAddress)('0x0C949AAf28bF0318bAa5f2cbF2F2D970f57879aB'),
|
|
54
|
+
//Aptos Aave
|
|
55
|
+
(0, ethers_1.getAddress)('0xA38d92eC538e9aa3edb980b89701A9d38a1FE015'),
|
|
56
|
+
// Sentora USCC
|
|
57
|
+
(0, ethers_1.getAddress)('0x63C5d615e937697a80606788965E209414738820'),
|
|
58
|
+
// Sentora wBTC
|
|
59
|
+
(0, ethers_1.getAddress)('0x3cC0D33B1AEac3d23eA89214b3AC5B4607032167'),
|
|
60
|
+
];
|
|
61
|
+
exports.WRAPPER_ADAPTOR = {
|
|
62
|
+
43114: (0, ethers_1.getAddress)('0xb2C57614B93c41A7Ec3B91980C0Bb7453904c6e8'),
|
|
63
|
+
1: (0, ethers_1.getAddress)('0x044155804b2ef8fc53C69E3661ceA9b905EDE7Bc'),
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated use the backend responses /tokenized_vault internal_type field to determine if the vault is an old lending pool
|
|
67
|
+
* @todo use the backend responses /tokenized_vault internal_type field to determine if the vault is an old lending pool
|
|
68
|
+
*/
|
|
69
|
+
exports.OLD_LENDING_POOLS = [
|
|
70
|
+
(0, ethers_1.getAddress)('0xe1B4d34E8754600962Cd944B535180Bd758E6c2e'),
|
|
71
|
+
(0, ethers_1.getAddress)('0xEBac5e50003d4B17Be422ff9775043cD61002f7f'),
|
|
72
|
+
(0, ethers_1.getAddress)('0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42'),
|
|
73
|
+
];
|
|
74
|
+
exports.IDLE_CAPITAL_BORROWER_ADDRESS = [
|
|
75
|
+
(0, ethers_1.getAddress)('0x2151C90C93F52bE82186f162c86DaEABc8911188'),
|
|
76
|
+
(0, ethers_1.getAddress)('0xb74c137E5f976dbdCC638Ec9fd3e05d6D9124E55'),
|
|
77
|
+
];
|
|
78
|
+
/**
|
|
79
|
+
* Vault addresses to exclude from `getTotalDeposited` TVL aggregation.
|
|
80
|
+
* Addresses are lowercased so EVM, Solana, Sui and Stellar vaults can be
|
|
81
|
+
* checked uniformly (don't wrap them with `getAddress` — non-EVM addresses
|
|
82
|
+
* would throw). Add an address here to drop its `latest_reported_tvl` from
|
|
83
|
+
* the headline number — e.g. closed pre-deposit vaults, test vaults, or
|
|
84
|
+
* migrated v1 pools that are double-counted by a v2 successor.
|
|
85
|
+
*/
|
|
86
|
+
exports.TVL_EXCLUDED_VAULTS = new Set([
|
|
87
|
+
'0x3299A525986D2e94B3FC6c641C158f5e12dB912d', // Fluent Pre Deposit Vault (migrated to fluent mainnet)
|
|
88
|
+
// '0x866C6c6627303Be103814150fC0e886BE5D9ea83', // Neutrl Pre Deposit Vault (migrated to Neutrl mainnet)
|
|
89
|
+
].map((a) => a.toLowerCase()));
|
|
90
|
+
/**
|
|
91
|
+
* Vault Functions to Call
|
|
92
|
+
*/
|
|
93
|
+
/**
|
|
94
|
+
* The functions to call on the vault contract
|
|
95
|
+
* @returns The functions to call
|
|
96
|
+
*/
|
|
97
|
+
exports.VAULT_FUNCTIONS_V1 = [
|
|
98
|
+
'decimals',
|
|
99
|
+
'asset',
|
|
100
|
+
'totalSupply',
|
|
101
|
+
'totalAssets',
|
|
102
|
+
'maxSupply',
|
|
103
|
+
'withdrawalFee',
|
|
104
|
+
'lagDuration',
|
|
105
|
+
'withdrawalsPaused',
|
|
106
|
+
'maxDepositAmount',
|
|
107
|
+
];
|
|
108
|
+
exports.VAULT_FUNCTIONS_V2 = [
|
|
109
|
+
'assetsWhitelistAddress',
|
|
110
|
+
'getTotalAssets',
|
|
111
|
+
'asset',
|
|
112
|
+
'withdrawalFee',
|
|
113
|
+
'maxDepositAmount',
|
|
114
|
+
'lagDuration',
|
|
115
|
+
'withdrawalsPaused',
|
|
116
|
+
'depositCap',
|
|
117
|
+
'lpTokenAddress',
|
|
118
|
+
];
|
|
119
|
+
exports.VAULT_FUNCTIONS_V2_RECEIPT = [
|
|
120
|
+
'decimals',
|
|
121
|
+
'totalSupply',
|
|
122
|
+
];
|
|
123
|
+
exports.VAULT_FUNCTIONS_V2_WHITELISTED_ASSETS = [
|
|
124
|
+
'getWhitelistedAssets',
|
|
125
|
+
];
|
|
126
|
+
/**
|
|
127
|
+
* NEMO ETH Yield vault address (lowercase for comparisons)
|
|
128
|
+
*/
|
|
129
|
+
exports.NEMO_VAULT_ADDRESS = '0xa422c3018c46ba90a14acd14f96cb60616f5c91b';
|
|
130
|
+
/**
|
|
131
|
+
* Subgraph base URL
|
|
132
|
+
* @deprecated use getVaultMetadata to fetch subgraph URLs from the backend
|
|
133
|
+
*/
|
|
134
|
+
exports.GOLDSKY_BASE_URL = 'https://api.goldsky.com/api/private/project_cm9g0xy3o4j6v01vd34r3hvv9/subgraphs';
|
|
135
|
+
/**
|
|
136
|
+
* Subgraph URLs
|
|
137
|
+
* @deprecated use getVaultMetadata to fetch subgraph URLs from the backend
|
|
138
|
+
*/
|
|
139
|
+
exports.SUBGRAPH_VAULT_URLS = {
|
|
140
|
+
testwethtsa: ``,
|
|
141
|
+
tacusr: `${exports.GOLDSKY_BASE_URL}/august-eth-tacUSR/1.0.0/gn`,
|
|
142
|
+
upinjusdt: `${exports.GOLDSKY_BASE_URL}/august-eth-upINJUSDT/1.0.0/gn`,
|
|
143
|
+
'tac-teth': `${exports.GOLDSKY_BASE_URL}/august-eth-tactETH/1.0.0/gn`,
|
|
144
|
+
upbtc: `${exports.GOLDSKY_BASE_URL}/august-eth-upBTC/1.0.0/gn`,
|
|
145
|
+
upausd: `${exports.GOLDSKY_BASE_URL}/august-avax-upAUSD/1.0.0/gn`,
|
|
146
|
+
taccbbtc: `${exports.GOLDSKY_BASE_URL}/august-eth-TACcbBTC/1.0.0/gn`,
|
|
147
|
+
xupusdc: `${exports.GOLDSKY_BASE_URL}/august-eth-xUpUSDC/1.0.0/gn`,
|
|
148
|
+
uptbtc: `${exports.GOLDSKY_BASE_URL}/august-eth-uptBTC/1.0.0/gn`,
|
|
149
|
+
gteth: `${exports.GOLDSKY_BASE_URL}/august-eth-gtETH/1.0.0/gn`,
|
|
150
|
+
ageth: `${exports.GOLDSKY_BASE_URL}/august-eth-agETH/1.0.0/gn`,
|
|
151
|
+
upusdc: `${exports.GOLDSKY_BASE_URL}/august-eth-upUSDC/1.0.0/gn`,
|
|
152
|
+
hgeth: `${exports.GOLDSKY_BASE_URL}/august-eth-hgETH/1.0.0/gn`,
|
|
153
|
+
upssylva: `${exports.GOLDSKY_BASE_URL}/august-eth-upsSYLVA/1.0.0/gn`,
|
|
154
|
+
hbbtc: `${exports.GOLDSKY_BASE_URL}/august-hyperevm-hbBTC/1.0.0/gn`,
|
|
155
|
+
hbhype: `${exports.GOLDSKY_BASE_URL}/august-hyperevm-hyperbeat/1.0.0/gn`,
|
|
156
|
+
upazt: `${exports.GOLDSKY_BASE_URL}/august-eth-upAZT/1.0.0/gn`,
|
|
157
|
+
susdt: `${exports.GOLDSKY_BASE_URL}/august-bsc-sUSDT/1.0.0/gn`,
|
|
158
|
+
upedge: `${exports.GOLDSKY_BASE_URL}/august-eth-upEDGE/1.0.0/gn`,
|
|
159
|
+
coreusdc: `${exports.GOLDSKY_BASE_URL}/august-eth-coreUSDC/1.0.0/gn`,
|
|
160
|
+
upcusdo: `${exports.GOLDSKY_BASE_URL}/august-eth-upcUSDO/1.0.0/gn`,
|
|
161
|
+
shifteth: `${exports.GOLDSKY_BASE_URL}/august-eth-shiftETH/1.0.0/gn`,
|
|
162
|
+
upsusde: `${exports.GOLDSKY_BASE_URL}/august-eth-upsUSDe/1.0.0/gn`,
|
|
163
|
+
uplbtc: `${exports.GOLDSKY_BASE_URL}/august-eth-upLBTC/1.0.0/gn`,
|
|
164
|
+
upavax: `${exports.GOLDSKY_BASE_URL}/august-avax-upAVAX/1.0.0/gn`,
|
|
165
|
+
tacrseth: `${exports.GOLDSKY_BASE_URL}/august-eth-TACrsEth/1.0.0/gn`,
|
|
166
|
+
musd: `${exports.GOLDSKY_BASE_URL}/august-mezo-mUSD/1.0.0/gn`,
|
|
167
|
+
wildusd: `${exports.GOLDSKY_BASE_URL}/august-eth-wildUSD/1.0.0/gn`,
|
|
168
|
+
earnausd: `${exports.GOLDSKY_BASE_URL}/august-eth-earnAUSD/1.0.0/gn`,
|
|
169
|
+
alpinecoinshiftusdc: `${exports.GOLDSKY_BASE_URL}/august-eth-AlpineCoinshiftUSDC/1.0.0/gn`,
|
|
170
|
+
alpineusdcflagship: `${exports.GOLDSKY_BASE_URL}/august-eth-AlpineUSDCFlagship/1.0.0/gn`,
|
|
171
|
+
upstrbtc: `${exports.GOLDSKY_BASE_URL}/august-eth-UpStrBTC/1.0.0/gn`,
|
|
172
|
+
maxiusr: `${exports.GOLDSKY_BASE_URL}/august-eth-maxiUSR/1.0.0/gn`,
|
|
173
|
+
upgammausdc: `${exports.GOLDSKY_BASE_URL}/august-eth-upGAMMAusdc/1.0.0/gn`,
|
|
174
|
+
xhype: `${exports.GOLDSKY_BASE_URL}/august-hyperevm-xHYPE/1.0.0/gn`,
|
|
175
|
+
alpinebtc: `${exports.GOLDSKY_BASE_URL}/august-eth-AlpineBTC/1.0.0/gn`,
|
|
176
|
+
prenusd: `${exports.GOLDSKY_BASE_URL}/august-eth-preNUSD/1.0.0/gn`,
|
|
177
|
+
upyzusd: `${exports.GOLDSKY_BASE_URL}/august-plasma-upyzUSD/1.0.0/gn`,
|
|
178
|
+
hlpe: `${exports.GOLDSKY_BASE_URL}/august-hyperevm-HLPe/1.0.0/gn`,
|
|
179
|
+
svusdc: `${exports.GOLDSKY_BASE_URL}/august-eth-svUSDC/1.0.0/gn`,
|
|
180
|
+
apusdc: `${exports.GOLDSKY_BASE_URL}/august-eth-apUSDC/1.0.0/gn`,
|
|
181
|
+
upnusd: `${exports.GOLDSKY_BASE_URL}/august-eth-upNUSD/1.0.0/gn`,
|
|
182
|
+
sentuscc: `${exports.GOLDSKY_BASE_URL}/august-eth-sentUSCC/1.0.0/gn`,
|
|
183
|
+
sentbtc: `${exports.GOLDSKY_BASE_URL}/august-eth-sentBTC/1.0.0/gn`,
|
|
184
|
+
farmbold: `${exports.GOLDSKY_BASE_URL}/august-eth-farmBOLD/1.0.0/gn`,
|
|
185
|
+
sausd: `${exports.GOLDSKY_BASE_URL}/august-monad-sAUSD/1.0.0/gn`,
|
|
186
|
+
earnausd_monad: `${exports.GOLDSKY_BASE_URL}/august-monad-earnAUSD/1.0.0/gn`,
|
|
187
|
+
'wmon/ausd': `${exports.GOLDSKY_BASE_URL}/august-monad-wMONAUSD/1.0.0/gn`,
|
|
188
|
+
'wbtc/ausd': `${exports.GOLDSKY_BASE_URL}/august-monad-wBTCAUSD/1.0.0/gn`,
|
|
189
|
+
supermon: `${exports.GOLDSKY_BASE_URL}/august-monad-superMON/1.0.0/gn`,
|
|
190
|
+
earnmon: `${exports.GOLDSKY_BASE_URL}/august-monad-earnMON/1.0.0/gn`,
|
|
191
|
+
k3europ: `${exports.GOLDSKY_BASE_URL}/august-eth-k3EUROP/1.0.0/gn`,
|
|
192
|
+
pregrid: `${exports.GOLDSKY_BASE_URL}/august-eth-preGRID/1.0.0/gn`,
|
|
193
|
+
repouscc: `${exports.GOLDSKY_BASE_URL}/august-eth-repoUSCC/1.0.0/gn`,
|
|
194
|
+
earnxrp: `${exports.GOLDSKY_BASE_URL}/august-flare-earnXRP/1.0.0/gn`,
|
|
195
|
+
tivkbtc: `${exports.GOLDSKY_BASE_URL}/august-ink-TIVKBTC/1.0.0/gn`,
|
|
196
|
+
tivusdt0: `${exports.GOLDSKY_BASE_URL}/august-ink-TIVUSDT0/1.0.0/gn`,
|
|
197
|
+
sentusd: `${exports.GOLDSKY_BASE_URL}/august-eth-sentUSD/1.0.0/gn`,
|
|
198
|
+
predlp: `${exports.GOLDSKY_BASE_URL}/august-eth-preDLP/1.0.0/gn`,
|
|
199
|
+
'nemo eth yield': `${exports.GOLDSKY_BASE_URL}/august-mainnet-nemo-eth-yield/1.0.0/gn`,
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Vault Symbols Mapping
|
|
203
|
+
* @deprecated use getVaultMetadata to fetch vault symbols from the backend
|
|
204
|
+
*/
|
|
205
|
+
exports.VAULT_SYMBOLS = {
|
|
206
|
+
'0xaBC578B79892FC0Dc2906Ab5749862622aD38695': 'preDLP',
|
|
207
|
+
'0x74aD2F789Ed583DBd141bbdafC673fE1F033718b': 'sentUSD',
|
|
208
|
+
'0x71BE0E419FbB98762C7b6D9e81EaFdA99363333c': 'TIVKBTC',
|
|
209
|
+
'0x727e37b4252B8a200D32445F2aFB741A308c55F0': 'TIVUSDT0',
|
|
210
|
+
'0x373D7d201C8134D4a2f7b5c63560da217e3dEA28': 'earnXRP',
|
|
211
|
+
'0x2Cb3b86C32e723BE255E5ec4E443a0CA90876634': 'repoUSCC',
|
|
212
|
+
'0x7b2B5B1c2710C7253ED6cbC912BB5f66B5A21649': 'preGRID',
|
|
213
|
+
'0x792C7c5fB5C996E588b9F4A5FB201C79974e267C': 'superMON',
|
|
214
|
+
'0x5E7568bf8DF8792aE467eCf5638d7c4D18A1881C': 'earnMON',
|
|
215
|
+
'0x0243755a22E37b835486fdAE9A839523ADABd336': 'k3EUROP',
|
|
216
|
+
'0xD793c04B87386A6bb84ee61D98e0065FdE7fdA5E': 'sAUSD',
|
|
217
|
+
'0x64996271ee085ef9e6E939Ab3eACd93F7d7080db': 'wMON/AUSD',
|
|
218
|
+
'0xB667D005695D7f530A5621549aE31d9409486E29': 'wBTC/AUSD',
|
|
219
|
+
'0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA': 'earnAUSD_monad',
|
|
220
|
+
'0x686c83Aa81ba206354fDcbc2cd282B4531365E29': 'tacUSR',
|
|
221
|
+
'0x02991EE6134dEE504668e2227C5879Dd78EfCDc3': 'upINJUSDT',
|
|
222
|
+
'0xf7b65fBA4d02110089fC6e2bE6d73809b45852f8': 'tac-tETH',
|
|
223
|
+
'0x3408b22d8895753C9A3e14e4222E981d4E9A599E': 'upAUSD',
|
|
224
|
+
'0xeb402fc96C7ed2f889d837C9976D6d821c1B5f01': 'TACcbBTC',
|
|
225
|
+
'0x396A3f77EE1faf5A3C46e878bA7b7a2dcbe55517': 'xUpUSDC',
|
|
226
|
+
'0x8AcA0841993ef4C87244d519166e767f49362C21': 'uptBTC',
|
|
227
|
+
'0x5Fde59415625401278c4d41C6beFCe3790eb357f': 'gtETH',
|
|
228
|
+
'0xe1B4d34E8754600962Cd944B535180Bd758E6c2e': 'agETH',
|
|
229
|
+
'0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42': 'upUSDC',
|
|
230
|
+
'0xc824A08dB624942c5E5F330d56530cD1598859fD': 'hgETH',
|
|
231
|
+
'0xc428439fB7B1EFE56360Eb837Ca98F551fdD9B26': 'upsSYLVA',
|
|
232
|
+
'0xc061d38903b99aC12713B550C2CB44B221674F94': 'hbBTC',
|
|
233
|
+
'0x96C6cBB6251Ee1c257b2162ca0f39AA5Fa44B1FB': 'hbHYPE',
|
|
234
|
+
'0x69FC3f84FD837217377d9Dae0212068cEB65818e': 'upAZT',
|
|
235
|
+
'0xD0b717ef23817b1a127139830Cf0FcD449ef74F0': 'sUSDT',
|
|
236
|
+
'0xEAA3b922E9fEbCa37d1c02D2142A59595094C605': 'upEDGE',
|
|
237
|
+
'0xE9B725010A9E419412ed67d0fA5f3A5f40159D32': 'coreUSDC',
|
|
238
|
+
'0x7383c2454D23A1e34B35ba02674be0a41Bd5aa56': 'upcUSDO',
|
|
239
|
+
'0xB78dAf3fD674B81ebeaaa88d711506fa069E1C5E': 'shiftETH',
|
|
240
|
+
'0xd684AF965b1c17D628ee0d77cae94259c41260F4': 'upsUSDe',
|
|
241
|
+
'0x8EC5C8642397791cff83563C9C83b9C1409D5F48': 'testWETHTSA',
|
|
242
|
+
'0x4e2D90f0307A93b54ACA31dc606F93FE6b9132d2': 'upLBTC',
|
|
243
|
+
'0xB2bFb52cfc40584AC4e9e2B36a5B8d6554A56e0b': 'upAVAX',
|
|
244
|
+
'0x419386E3Ef42368e602720CC458e00c0B28c47A7': 'TACrsEth',
|
|
245
|
+
'0x221B2D9aD7B994861Af3f4c8A80c86C4aa86Bf53': 'mUSD',
|
|
246
|
+
'0x828BC5895b78b2fb591018Ca5bDC2064742D6D0f': 'earnAUSD',
|
|
247
|
+
'0xD066649Bcb7d8D3335fE29CaD0AED6E17D5828B5': 'AlpineUSDCFlagship',
|
|
248
|
+
'0x0985C88929A776a2E059615137a48bA5A473E25D': 'AlpineCoinshiftUSDC',
|
|
249
|
+
'0xEBac5e50003d4B17Be422ff9775043cD61002f7f': 'upBTC',
|
|
250
|
+
'0x787f5541Ee40cD0c94175251686DDBbcf69A7344': 'UpStrBTC',
|
|
251
|
+
'0xdA89af5bF2eb0B225d787aBfA9095610f2E79e7D': 'maxiUSR',
|
|
252
|
+
'0x998D7b14c123c1982404562b68edDB057b0477cB': 'upGAMMAusdc',
|
|
253
|
+
'0x3a214b33A648f17fdcb78eD895dD0579dc3cc330': 'xHYPE',
|
|
254
|
+
'0x18EE038C114a07f4B08b420fb1E4149a4F357249': 'wildUSD',
|
|
255
|
+
'0x6625bA54DC861e9f5c678983dBa5BA96d19a9224': 'AlpineBTC',
|
|
256
|
+
'0x866C6c6627303Be103814150fC0e886BE5D9ea83': 'preNUSD',
|
|
257
|
+
'0x8fFDcd8A96d293f45aA044d10b899F9D71897E8a': 'HLPe',
|
|
258
|
+
'0xd411aCaE2Bc7019322277A21ff005d94705661C5': 'svUSDC',
|
|
259
|
+
'0xA38d92eC538e9aa3edb980b89701A9d38a1FE015': 'apUSDC',
|
|
260
|
+
'0x0C949AAf28bF0318bAa5f2cbF2F2D970f57879aB': 'UpStrBTC',
|
|
261
|
+
'0x517677A19D8ae6FF600FB86C3C7bFCCD651e3eec': 'upyzUSD',
|
|
262
|
+
'0xAEEb2fB279a5aA837367B9D2582F898a63b06ca1': 'upNUSD',
|
|
263
|
+
'0x3cC0D33B1AEac3d23eA89214b3AC5B4607032167': 'sentBTC',
|
|
264
|
+
'0x63C5d615e937697a80606788965E209414738820': 'sentUSCC',
|
|
265
|
+
'0xb2FdA773822E5a04c8A70348d66257DD5Cf442DB': 'farmBOLD',
|
|
266
|
+
'0xA422C3018C46ba90a14AcD14f96CB60616F5c91B': 'NEMO ETH Yield',
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* Vault Symbols Reverse Mapping
|
|
270
|
+
* @deprecated use getVaultMetadata to fetch vault symbols from the backend
|
|
271
|
+
*/
|
|
272
|
+
exports.VAULT_SYMBOLS_REVERSE = Object.fromEntries(Object.entries(exports.VAULT_SYMBOLS).map(([key, value]) => [value, key]));
|
|
273
|
+
//# sourceMappingURL=vaults.js.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { IChainId, IChainObj } from '../../types';
|
|
2
|
+
export declare const SPECIAL_CHAINS: {
|
|
3
|
+
solana: {
|
|
4
|
+
name: string;
|
|
5
|
+
chainId: number;
|
|
6
|
+
explorer: string;
|
|
7
|
+
};
|
|
8
|
+
stellar: {
|
|
9
|
+
name: string;
|
|
10
|
+
chainId: number;
|
|
11
|
+
explorer: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Chain ID used to address Sui vaults.
|
|
16
|
+
*
|
|
17
|
+
* Unlike Solana (`-1`) and Stellar (`-3`), Sui does not use a synthetic
|
|
18
|
+
* negative ID — `101` is the SLIP-44-derived value the Sui adapter has always
|
|
19
|
+
* used. It lives here rather than in `adapters/sui/constants.ts` so that
|
|
20
|
+
* `core/` can recognise it without importing the adapter layer (which would
|
|
21
|
+
* create a `core → adapters` back-edge); the adapter re-exports it.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SUI_CHAIN_ID = 101;
|
|
24
|
+
/**
|
|
25
|
+
* Chain IDs the SDK understands that are **not** served by an EVM JSON-RPC
|
|
26
|
+
* provider. Callers may legitimately pass these to vault methods without a
|
|
27
|
+
* matching entry in the `providers` map — the request routes through the
|
|
28
|
+
* Solana / Stellar / Sui adapter instead.
|
|
29
|
+
*/
|
|
30
|
+
export declare const NON_EVM_CHAIN_IDS: ReadonlySet<number>;
|
|
31
|
+
export declare const NATIVE_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
32
|
+
/**
|
|
33
|
+
* Decimal precision of the native gas token on every EVM chain this SDK
|
|
34
|
+
* supports (ETH, Base, Arbitrum, Avalanche, Polygon, BNB, HyperEVM, Unichain,
|
|
35
|
+
* Mezo, Monad, Plasma, Ink, Flare, Katana, Citrea, Fluent, Tempo).
|
|
36
|
+
*
|
|
37
|
+
* All of them use 18-decimal native tokens, so this is a single constant rather
|
|
38
|
+
* than a per-chain map. It exists because the native token has no ERC-20
|
|
39
|
+
* `decimals()` to read on-chain: when a subgraph row denominates an amount in
|
|
40
|
+
* the native token it is flagged with a sentinel address ({@link NATIVE_ADDRESS}
|
|
41
|
+
* or the zero address) instead of a real contract, and callers must substitute
|
|
42
|
+
* this value rather than attempting (and failing) a `decimals()` read.
|
|
43
|
+
*
|
|
44
|
+
* Non-EVM natives differ (SOL is 9, XLM is 7) and are handled by their own
|
|
45
|
+
* adapters — those chains never flow through the EVM `decimals()` path this
|
|
46
|
+
* constant serves.
|
|
47
|
+
*/
|
|
48
|
+
export declare const EVM_NATIVE_DECIMALS = 18;
|
|
49
|
+
export declare const MIN_ABIS: {
|
|
50
|
+
name: string;
|
|
51
|
+
symbol: string;
|
|
52
|
+
decimals: string;
|
|
53
|
+
totalSupply: string;
|
|
54
|
+
approve: string;
|
|
55
|
+
allowance: string;
|
|
56
|
+
managementFeePercent: string;
|
|
57
|
+
};
|
|
58
|
+
export declare const ORACLE_CONTRACTS: {
|
|
59
|
+
1: string;
|
|
60
|
+
43114: string;
|
|
61
|
+
42161: string;
|
|
62
|
+
8453: string;
|
|
63
|
+
10: string;
|
|
64
|
+
};
|
|
65
|
+
export declare const NETWORKS: Record<IChainId, IChainObj>;
|
|
66
|
+
export declare const AVAILABLE_CHAINS: IChainId[];
|
|
67
|
+
/**
|
|
68
|
+
* Canonical [Multicall3](https://github.com/mds1/multicall) address, deployed
|
|
69
|
+
* via the deterministic deployer to the same address on most EVM chains.
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
export declare const MULTICALL3_ADDRESS = "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
73
|
+
/**
|
|
74
|
+
* Chains where the canonical Multicall3 deployment was **verified on-chain**
|
|
75
|
+
* (`eth_getCode` returned the 3808-byte runtime at {@link MULTICALL3_ADDRESS};
|
|
76
|
+
* checked per chain on 2026-07-14, Tempo checked separately on 2026-07-15) —
|
|
77
|
+
* deterministic-deployer presence is NOT assumed. Chains outside this set
|
|
78
|
+
* keep the per-call read path.
|
|
79
|
+
*
|
|
80
|
+
* Deliberately excluded from `NETWORKS`:
|
|
81
|
+
* - 4114 (Citrea) — `eth_getCode` returned `0x` (not deployed).
|
|
82
|
+
* - -1 (Solana), -3 (Stellar) — non-EVM, no Multicall3.
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
export declare const MULTICALL3_VERIFIED_CHAINS: ReadonlySet<number>;
|
|
86
|
+
/**
|
|
87
|
+
* Fallbacks
|
|
88
|
+
*/
|
|
89
|
+
export declare const FALLBACK_DECIMALS = 18;
|
|
90
|
+
export declare const FALLBACK_CHAINID = 42161;
|
|
91
|
+
export declare const FALLBACK_RPC_URLS: Record<number, string[]>;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FALLBACK_RPC_URLS = exports.FALLBACK_CHAINID = exports.FALLBACK_DECIMALS = exports.MULTICALL3_VERIFIED_CHAINS = exports.MULTICALL3_ADDRESS = exports.AVAILABLE_CHAINS = exports.NETWORKS = exports.ORACLE_CONTRACTS = exports.MIN_ABIS = exports.EVM_NATIVE_DECIMALS = exports.NATIVE_ADDRESS = exports.NON_EVM_CHAIN_IDS = exports.SUI_CHAIN_ID = exports.SPECIAL_CHAINS = void 0;
|
|
4
|
+
// Special Chains
|
|
5
|
+
exports.SPECIAL_CHAINS = {
|
|
6
|
+
solana: {
|
|
7
|
+
name: 'Solana',
|
|
8
|
+
chainId: -1,
|
|
9
|
+
explorer: 'https://solscan.io',
|
|
10
|
+
},
|
|
11
|
+
stellar: {
|
|
12
|
+
name: 'Stellar',
|
|
13
|
+
chainId: -3,
|
|
14
|
+
explorer: 'https://stellar.expert',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Chain ID used to address Sui vaults.
|
|
19
|
+
*
|
|
20
|
+
* Unlike Solana (`-1`) and Stellar (`-3`), Sui does not use a synthetic
|
|
21
|
+
* negative ID — `101` is the SLIP-44-derived value the Sui adapter has always
|
|
22
|
+
* used. It lives here rather than in `adapters/sui/constants.ts` so that
|
|
23
|
+
* `core/` can recognise it without importing the adapter layer (which would
|
|
24
|
+
* create a `core → adapters` back-edge); the adapter re-exports it.
|
|
25
|
+
*/
|
|
26
|
+
exports.SUI_CHAIN_ID = 101;
|
|
27
|
+
/**
|
|
28
|
+
* Chain IDs the SDK understands that are **not** served by an EVM JSON-RPC
|
|
29
|
+
* provider. Callers may legitimately pass these to vault methods without a
|
|
30
|
+
* matching entry in the `providers` map — the request routes through the
|
|
31
|
+
* Solana / Stellar / Sui adapter instead.
|
|
32
|
+
*/
|
|
33
|
+
exports.NON_EVM_CHAIN_IDS = new Set([
|
|
34
|
+
exports.SPECIAL_CHAINS.solana.chainId,
|
|
35
|
+
exports.SPECIAL_CHAINS.stellar.chainId,
|
|
36
|
+
exports.SUI_CHAIN_ID,
|
|
37
|
+
]);
|
|
38
|
+
// General
|
|
39
|
+
exports.NATIVE_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE';
|
|
40
|
+
/**
|
|
41
|
+
* Decimal precision of the native gas token on every EVM chain this SDK
|
|
42
|
+
* supports (ETH, Base, Arbitrum, Avalanche, Polygon, BNB, HyperEVM, Unichain,
|
|
43
|
+
* Mezo, Monad, Plasma, Ink, Flare, Katana, Citrea, Fluent, Tempo).
|
|
44
|
+
*
|
|
45
|
+
* All of them use 18-decimal native tokens, so this is a single constant rather
|
|
46
|
+
* than a per-chain map. It exists because the native token has no ERC-20
|
|
47
|
+
* `decimals()` to read on-chain: when a subgraph row denominates an amount in
|
|
48
|
+
* the native token it is flagged with a sentinel address ({@link NATIVE_ADDRESS}
|
|
49
|
+
* or the zero address) instead of a real contract, and callers must substitute
|
|
50
|
+
* this value rather than attempting (and failing) a `decimals()` read.
|
|
51
|
+
*
|
|
52
|
+
* Non-EVM natives differ (SOL is 9, XLM is 7) and are handled by their own
|
|
53
|
+
* adapters — those chains never flow through the EVM `decimals()` path this
|
|
54
|
+
* constant serves.
|
|
55
|
+
*/
|
|
56
|
+
exports.EVM_NATIVE_DECIMALS = 18;
|
|
57
|
+
exports.MIN_ABIS = {
|
|
58
|
+
name: 'function name() view returns (string)',
|
|
59
|
+
symbol: 'function symbol() view returns (string)',
|
|
60
|
+
decimals: 'function decimals() view returns (uint8)',
|
|
61
|
+
totalSupply: 'function totalSupply() view returns (uint256)',
|
|
62
|
+
approve: 'function approve(address spender, uint256 value) external returns (bool success)',
|
|
63
|
+
allowance: 'function allowance(address owner, address spender) external view returns (uint256)',
|
|
64
|
+
managementFeePercent: 'function managementFeePercent() view returns (uint256)',
|
|
65
|
+
};
|
|
66
|
+
// Search: New Chain
|
|
67
|
+
exports.ORACLE_CONTRACTS = {
|
|
68
|
+
1: '0xA4E24C498D5B28517787D8407eFdcB157A4FbF50', // mainnet
|
|
69
|
+
43114: '0x755537Cb5C76E06Bb492CF7c73567e252769c5f5', // avax
|
|
70
|
+
42161: '0x24F7BC5CA6E4b53cF7311dE1f5bF8Ba528400E1e', // arbitrum
|
|
71
|
+
8453: '0x07858dF2D8D9aB1DCAAA8b743eb80C6250DFA947', // base
|
|
72
|
+
10: '0xe0049eBCCB23Cb81c3d4C9Fa175b32876b70C2AB', // OP
|
|
73
|
+
};
|
|
74
|
+
// Networks
|
|
75
|
+
// Search: New Chain
|
|
76
|
+
// @todo: this should be used for wagmi configs
|
|
77
|
+
exports.NETWORKS = {
|
|
78
|
+
1: {
|
|
79
|
+
name: 'Ethereum',
|
|
80
|
+
chainId: 1,
|
|
81
|
+
explorer: 'https://etherscan.io',
|
|
82
|
+
},
|
|
83
|
+
42161: {
|
|
84
|
+
name: 'Arbitrum One',
|
|
85
|
+
chainId: 42161,
|
|
86
|
+
explorer: 'https://arbiscan.io',
|
|
87
|
+
},
|
|
88
|
+
8453: {
|
|
89
|
+
name: 'Base',
|
|
90
|
+
chainId: 8453,
|
|
91
|
+
explorer: 'https://basescan.org',
|
|
92
|
+
},
|
|
93
|
+
43114: {
|
|
94
|
+
name: 'Avalanche',
|
|
95
|
+
chainId: 43114,
|
|
96
|
+
explorer: 'https://snowscan.xyz',
|
|
97
|
+
},
|
|
98
|
+
137: {
|
|
99
|
+
name: 'Polygon',
|
|
100
|
+
chainId: 137,
|
|
101
|
+
explorer: 'https://polygonscan.com',
|
|
102
|
+
},
|
|
103
|
+
56: {
|
|
104
|
+
name: 'BNB Smart Chain',
|
|
105
|
+
chainId: 56,
|
|
106
|
+
explorer: 'https://bscscan.com',
|
|
107
|
+
},
|
|
108
|
+
999: {
|
|
109
|
+
name: 'HyperEVM',
|
|
110
|
+
chainId: 999,
|
|
111
|
+
explorer: 'https://hyperevmscan.io',
|
|
112
|
+
},
|
|
113
|
+
130: {
|
|
114
|
+
name: 'Unichain',
|
|
115
|
+
chainId: 130,
|
|
116
|
+
explorer: 'https://uniscan.xyz',
|
|
117
|
+
},
|
|
118
|
+
31612: {
|
|
119
|
+
name: 'Mezo',
|
|
120
|
+
chainId: 31612,
|
|
121
|
+
explorer: 'https://explorer.mezo.org',
|
|
122
|
+
},
|
|
123
|
+
143: {
|
|
124
|
+
name: 'Monad',
|
|
125
|
+
chainId: 143,
|
|
126
|
+
explorer: 'https://monadscan.com',
|
|
127
|
+
},
|
|
128
|
+
9745: {
|
|
129
|
+
name: 'Plasma',
|
|
130
|
+
chainId: 9745,
|
|
131
|
+
explorer: 'https://plasmascan.to',
|
|
132
|
+
},
|
|
133
|
+
57073: {
|
|
134
|
+
name: 'Ink',
|
|
135
|
+
chainId: 57073,
|
|
136
|
+
explorer: 'https://explorer.inkonchain.com',
|
|
137
|
+
},
|
|
138
|
+
14: {
|
|
139
|
+
name: 'Flare',
|
|
140
|
+
chainId: 14,
|
|
141
|
+
explorer: 'https://flarescan.com',
|
|
142
|
+
},
|
|
143
|
+
747474: {
|
|
144
|
+
name: 'Katana',
|
|
145
|
+
chainId: 747474,
|
|
146
|
+
explorer: 'https://explorer.katanarpc.com',
|
|
147
|
+
},
|
|
148
|
+
4114: {
|
|
149
|
+
name: 'Citrea',
|
|
150
|
+
chainId: 4114,
|
|
151
|
+
explorer: 'https://explorer.mainnet.citrea.xyz',
|
|
152
|
+
},
|
|
153
|
+
25363: {
|
|
154
|
+
name: 'Fluent',
|
|
155
|
+
chainId: 25363,
|
|
156
|
+
explorer: 'https://fluentscan.xyz',
|
|
157
|
+
},
|
|
158
|
+
4217: {
|
|
159
|
+
name: 'Tempo',
|
|
160
|
+
chainId: 4217,
|
|
161
|
+
explorer: 'https://explore.tempo.xyz',
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
exports.AVAILABLE_CHAINS = Object.keys(exports.NETWORKS).map((c) => Number(c));
|
|
165
|
+
/**
|
|
166
|
+
* Canonical [Multicall3](https://github.com/mds1/multicall) address, deployed
|
|
167
|
+
* via the deterministic deployer to the same address on most EVM chains.
|
|
168
|
+
* @internal
|
|
169
|
+
*/
|
|
170
|
+
exports.MULTICALL3_ADDRESS = '0xcA11bde05977b3631167028862bE2a173976CA11';
|
|
171
|
+
/**
|
|
172
|
+
* Chains where the canonical Multicall3 deployment was **verified on-chain**
|
|
173
|
+
* (`eth_getCode` returned the 3808-byte runtime at {@link MULTICALL3_ADDRESS};
|
|
174
|
+
* checked per chain on 2026-07-14, Tempo checked separately on 2026-07-15) —
|
|
175
|
+
* deterministic-deployer presence is NOT assumed. Chains outside this set
|
|
176
|
+
* keep the per-call read path.
|
|
177
|
+
*
|
|
178
|
+
* Deliberately excluded from `NETWORKS`:
|
|
179
|
+
* - 4114 (Citrea) — `eth_getCode` returned `0x` (not deployed).
|
|
180
|
+
* - -1 (Solana), -3 (Stellar) — non-EVM, no Multicall3.
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
183
|
+
exports.MULTICALL3_VERIFIED_CHAINS = new Set([
|
|
184
|
+
1, // Ethereum
|
|
185
|
+
42161, // Arbitrum One
|
|
186
|
+
8453, // Base
|
|
187
|
+
43114, // Avalanche
|
|
188
|
+
137, // Polygon
|
|
189
|
+
56, // BNB Smart Chain
|
|
190
|
+
999, // HyperEVM
|
|
191
|
+
130, // Unichain
|
|
192
|
+
31612, // Mezo
|
|
193
|
+
143, // Monad
|
|
194
|
+
9745, // Plasma
|
|
195
|
+
57073, // Ink
|
|
196
|
+
14, // Flare
|
|
197
|
+
747474, // Katana
|
|
198
|
+
25363, // Fluent
|
|
199
|
+
4217, // Tempo
|
|
200
|
+
]);
|
|
201
|
+
/**
|
|
202
|
+
* Fallbacks
|
|
203
|
+
*/
|
|
204
|
+
exports.FALLBACK_DECIMALS = 18;
|
|
205
|
+
exports.FALLBACK_CHAINID = 42161;
|
|
206
|
+
exports.FALLBACK_RPC_URLS = {
|
|
207
|
+
// Ethereum Mainnet
|
|
208
|
+
1: ['https://ethereum-rpc.publicnode.com'],
|
|
209
|
+
42161: ['https://arbitrum-one-rpc.publicnode.com'],
|
|
210
|
+
8453: ['https://base-rpc.publicnode.com'],
|
|
211
|
+
43114: ['https://avalanche-c-chain-rpc.publicnode.com'],
|
|
212
|
+
143: ['https://monad-mainnet.g.alchemy.com/v2/public'],
|
|
213
|
+
999: ['https://rpc.hyperliquid.xyz/evm'],
|
|
214
|
+
239: ['https://rpc.ankr.com/tac'],
|
|
215
|
+
80094: ['https://berachain-rpc.publicnode.com'],
|
|
216
|
+
59144: ['https://linea-rpc.publicnode.com'],
|
|
217
|
+
43111: ['https://rpc.hemi.network/rpc'],
|
|
218
|
+
146: ['https://rpc.soniclabs.com'],
|
|
219
|
+
534352: ['https://scroll.api.onfinality.io/public'],
|
|
220
|
+
10: ['https://optimism-mainnet.public.blastapi.io'],
|
|
221
|
+
9745: ['https://rpc.plasma.to'],
|
|
222
|
+
57073: ['https://rpc-gel.inkonchain.com'],
|
|
223
|
+
14: ['https://flare-api.flare.network/ext/C/rpc'],
|
|
224
|
+
747474: ['https://rpc.katana.network'],
|
|
225
|
+
4114: ['https://rpc.mainnet.citrea.xyz'],
|
|
226
|
+
25363: ['https://rpc.fluent.xyz'],
|
|
227
|
+
4217: ['https://rpc.mainnet.tempo.xyz'],
|
|
228
|
+
};
|
|
229
|
+
//# sourceMappingURL=web3.js.map
|