upshift-sdk 8.20.1

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.
Files changed (316) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +349 -0
  3. package/lib/abis/AddressResolver.d.ts +28 -0
  4. package/lib/abis/AddressResolver.js +23 -0
  5. package/lib/abis/ChainlinkV3.d.ts +87 -0
  6. package/lib/abis/ChainlinkV3.js +117 -0
  7. package/lib/abis/ERC20.d.ts +168 -0
  8. package/lib/abis/ERC20.js +226 -0
  9. package/lib/abis/ERC20_Bytes32.d.ts +139 -0
  10. package/lib/abis/ERC20_Bytes32.js +196 -0
  11. package/lib/abis/ERC4626.d.ts +364 -0
  12. package/lib/abis/ERC4626.js +507 -0
  13. package/lib/abis/ERC721.d.ts +231 -0
  14. package/lib/abis/ERC721.js +321 -0
  15. package/lib/abis/FeeOracle.d.ts +120 -0
  16. package/lib/abis/FeeOracle.js +162 -0
  17. package/lib/abis/LendingPool.d.ts +1393 -0
  18. package/lib/abis/LendingPool.js +1807 -0
  19. package/lib/abis/LendingPoolV2.d.ts +1413 -0
  20. package/lib/abis/LendingPoolV2.js +1833 -0
  21. package/lib/abis/LendingPoolV3.d.ts +1677 -0
  22. package/lib/abis/LendingPoolV3.js +1160 -0
  23. package/lib/abis/Loan.d.ts +837 -0
  24. package/lib/abis/Loan.js +1080 -0
  25. package/lib/abis/MultiAssetNativeDepositWrapper.d.ts +137 -0
  26. package/lib/abis/MultiAssetNativeDepositWrapper.js +125 -0
  27. package/lib/abis/Multicall3.d.ts +30 -0
  28. package/lib/abis/Multicall3.js +97 -0
  29. package/lib/abis/OFT.d.ts +116 -0
  30. package/lib/abis/OFT.js +85 -0
  31. package/lib/abis/PoolAdapter.d.ts +36 -0
  32. package/lib/abis/PoolAdapter.js +51 -0
  33. package/lib/abis/RewardDistributor.d.ts +267 -0
  34. package/lib/abis/RewardDistributor.js +352 -0
  35. package/lib/abis/RwaRedeemSubaccount.d.ts +747 -0
  36. package/lib/abis/RwaRedeemSubaccount.js +548 -0
  37. package/lib/abis/SmartAccount.d.ts +17 -0
  38. package/lib/abis/SmartAccount.js +19 -0
  39. package/lib/abis/SwapRouter.d.ts +1043 -0
  40. package/lib/abis/SwapRouter.js +740 -0
  41. package/lib/abis/TextResolver.d.ts +16 -0
  42. package/lib/abis/TextResolver.js +16 -0
  43. package/lib/abis/TokenizedVaultV2.d.ts +1364 -0
  44. package/lib/abis/TokenizedVaultV2.js +1041 -0
  45. package/lib/abis/TokenizedVaultV2DepositWithPermit.d.ts +1456 -0
  46. package/lib/abis/TokenizedVaultV2DepositWithPermit.js +1878 -0
  47. package/lib/abis/TokenizedVaultV2Receipt.d.ts +1568 -0
  48. package/lib/abis/TokenizedVaultV2Receipt.js +1061 -0
  49. package/lib/abis/TokenizedVaultV2SenderAllocationWhitelist.d.ts +454 -0
  50. package/lib/abis/TokenizedVaultV2SenderAllocationWhitelist.js +327 -0
  51. package/lib/abis/TokenizedVaultV2WhitelistedAllocation.d.ts +1466 -0
  52. package/lib/abis/TokenizedVaultV2WhitelistedAllocation.js +1092 -0
  53. package/lib/abis/TokenizedVaultV2WhitelistedAssets.d.ts +274 -0
  54. package/lib/abis/TokenizedVaultV2WhitelistedAssets.js +167 -0
  55. package/lib/abis/UniversalResolverResolve.d.ts +69 -0
  56. package/lib/abis/UniversalResolverResolve.js +35 -0
  57. package/lib/abis/UniversalSignatureValidator.d.ts +17 -0
  58. package/lib/abis/UniversalSignatureValidator.js +30 -0
  59. package/lib/abis/WrapperAdapter.d.ts +71 -0
  60. package/lib/abis/WrapperAdapter.js +77 -0
  61. package/lib/abis/index.d.ts +34 -0
  62. package/lib/abis/index.js +51 -0
  63. package/lib/adapters/evm/getters.d.ts +19 -0
  64. package/lib/adapters/evm/getters.js +209 -0
  65. package/lib/adapters/evm/index.d.ts +353 -0
  66. package/lib/adapters/evm/index.js +434 -0
  67. package/lib/adapters/evm/utils.d.ts +8 -0
  68. package/lib/adapters/evm/utils.js +51 -0
  69. package/lib/adapters/solana/constants.d.ts +33 -0
  70. package/lib/adapters/solana/constants.js +52 -0
  71. package/lib/adapters/solana/getters.d.ts +11 -0
  72. package/lib/adapters/solana/getters.js +165 -0
  73. package/lib/adapters/solana/idl/vault-idl.d.ts +272 -0
  74. package/lib/adapters/solana/idl/vault-idl.js +1084 -0
  75. package/lib/adapters/solana/index.d.ts +233 -0
  76. package/lib/adapters/solana/index.js +291 -0
  77. package/lib/adapters/solana/types.d.ts +67 -0
  78. package/lib/adapters/solana/types.js +3 -0
  79. package/lib/adapters/solana/utils.d.ts +141 -0
  80. package/lib/adapters/solana/utils.js +595 -0
  81. package/lib/adapters/solana/vault.actions.d.ts +57 -0
  82. package/lib/adapters/solana/vault.actions.js +379 -0
  83. package/lib/adapters/stellar/actions.d.ts +28 -0
  84. package/lib/adapters/stellar/actions.js +77 -0
  85. package/lib/adapters/stellar/constants.d.ts +43 -0
  86. package/lib/adapters/stellar/constants.js +53 -0
  87. package/lib/adapters/stellar/getters.d.ts +68 -0
  88. package/lib/adapters/stellar/getters.js +290 -0
  89. package/lib/adapters/stellar/index.d.ts +114 -0
  90. package/lib/adapters/stellar/index.js +175 -0
  91. package/lib/adapters/stellar/soroban.d.ts +123 -0
  92. package/lib/adapters/stellar/soroban.js +613 -0
  93. package/lib/adapters/stellar/submit.d.ts +34 -0
  94. package/lib/adapters/stellar/submit.js +149 -0
  95. package/lib/adapters/stellar/types.d.ts +58 -0
  96. package/lib/adapters/stellar/types.js +6 -0
  97. package/lib/adapters/stellar/utils.d.ts +24 -0
  98. package/lib/adapters/stellar/utils.js +34 -0
  99. package/lib/adapters/sui/constants.d.ts +14 -0
  100. package/lib/adapters/sui/constants.js +29 -0
  101. package/lib/adapters/sui/getters.d.ts +9 -0
  102. package/lib/adapters/sui/getters.js +60 -0
  103. package/lib/adapters/sui/index.d.ts +45 -0
  104. package/lib/adapters/sui/index.js +101 -0
  105. package/lib/adapters/sui/transformer.d.ts +10 -0
  106. package/lib/adapters/sui/transformer.js +107 -0
  107. package/lib/adapters/sui/types.d.ts +66 -0
  108. package/lib/adapters/sui/types.js +3 -0
  109. package/lib/adapters/sui/utils.d.ts +10 -0
  110. package/lib/adapters/sui/utils.js +29 -0
  111. package/lib/core/analytics/chain-name.d.ts +9 -0
  112. package/lib/core/analytics/chain-name.js +34 -0
  113. package/lib/core/analytics/constants.d.ts +5 -0
  114. package/lib/core/analytics/constants.js +9 -0
  115. package/lib/core/analytics/env.d.ts +29 -0
  116. package/lib/core/analytics/env.js +59 -0
  117. package/lib/core/analytics/index.d.ts +36 -0
  118. package/lib/core/analytics/index.js +79 -0
  119. package/lib/core/analytics/instrumentation.d.ts +29 -0
  120. package/lib/core/analytics/instrumentation.js +277 -0
  121. package/lib/core/analytics/method-taxonomy.d.ts +19 -0
  122. package/lib/core/analytics/method-taxonomy.js +128 -0
  123. package/lib/core/analytics/metrics.d.ts +33 -0
  124. package/lib/core/analytics/metrics.js +116 -0
  125. package/lib/core/analytics/sanitize.d.ts +44 -0
  126. package/lib/core/analytics/sanitize.js +260 -0
  127. package/lib/core/analytics/sentry-runtime.d.ts +15 -0
  128. package/lib/core/analytics/sentry-runtime.js +97 -0
  129. package/lib/core/analytics/sentry.d.ts +67 -0
  130. package/lib/core/analytics/sentry.js +613 -0
  131. package/lib/core/analytics/types.d.ts +48 -0
  132. package/lib/core/analytics/types.js +3 -0
  133. package/lib/core/analytics/user-identity.d.ts +41 -0
  134. package/lib/core/analytics/user-identity.js +141 -0
  135. package/lib/core/analytics/version.d.ts +6 -0
  136. package/lib/core/analytics/version.js +10 -0
  137. package/lib/core/attribution.d.ts +111 -0
  138. package/lib/core/attribution.js +142 -0
  139. package/lib/core/auth/index.d.ts +1 -0
  140. package/lib/core/auth/index.js +18 -0
  141. package/lib/core/auth/verify.d.ts +2 -0
  142. package/lib/core/auth/verify.js +31 -0
  143. package/lib/core/base.class.d.ts +152 -0
  144. package/lib/core/base.class.js +172 -0
  145. package/lib/core/cache.d.ts +9 -0
  146. package/lib/core/cache.js +31 -0
  147. package/lib/core/constants/adapters.d.ts +103 -0
  148. package/lib/core/constants/adapters.js +180 -0
  149. package/lib/core/constants/core.d.ts +133 -0
  150. package/lib/core/constants/core.js +209 -0
  151. package/lib/core/constants/swap-router.d.ts +150 -0
  152. package/lib/core/constants/swap-router.js +169 -0
  153. package/lib/core/constants/vaults.d.ts +93 -0
  154. package/lib/core/constants/vaults.js +273 -0
  155. package/lib/core/constants/web3.d.ts +91 -0
  156. package/lib/core/constants/web3.js +229 -0
  157. package/lib/core/errors/index.d.ts +114 -0
  158. package/lib/core/errors/index.js +183 -0
  159. package/lib/core/fetcher.d.ts +198 -0
  160. package/lib/core/fetcher.js +903 -0
  161. package/lib/core/helpers/adapters.d.ts +13 -0
  162. package/lib/core/helpers/adapters.js +39 -0
  163. package/lib/core/helpers/chain-address.d.ts +13 -0
  164. package/lib/core/helpers/chain-address.js +47 -0
  165. package/lib/core/helpers/chain-error.d.ts +207 -0
  166. package/lib/core/helpers/chain-error.js +682 -0
  167. package/lib/core/helpers/chain-support.d.ts +80 -0
  168. package/lib/core/helpers/chain-support.js +115 -0
  169. package/lib/core/helpers/core.d.ts +68 -0
  170. package/lib/core/helpers/core.js +285 -0
  171. package/lib/core/helpers/explorer-link.d.ts +16 -0
  172. package/lib/core/helpers/explorer-link.js +26 -0
  173. package/lib/core/helpers/multicall.d.ts +68 -0
  174. package/lib/core/helpers/multicall.js +103 -0
  175. package/lib/core/helpers/revert-decode.d.ts +248 -0
  176. package/lib/core/helpers/revert-decode.js +515 -0
  177. package/lib/core/helpers/signer.d.ts +52 -0
  178. package/lib/core/helpers/signer.js +145 -0
  179. package/lib/core/helpers/swap-router.d.ts +211 -0
  180. package/lib/core/helpers/swap-router.js +480 -0
  181. package/lib/core/helpers/vault-version.d.ts +23 -0
  182. package/lib/core/helpers/vault-version.js +75 -0
  183. package/lib/core/helpers/vaults.d.ts +89 -0
  184. package/lib/core/helpers/vaults.js +235 -0
  185. package/lib/core/helpers/web3.d.ts +353 -0
  186. package/lib/core/helpers/web3.js +992 -0
  187. package/lib/core/index.d.ts +23 -0
  188. package/lib/core/index.js +40 -0
  189. package/lib/core/logger/index.d.ts +98 -0
  190. package/lib/core/logger/index.js +144 -0
  191. package/lib/core/logger/slack.d.ts +16 -0
  192. package/lib/core/logger/slack.js +57 -0
  193. package/lib/core/vault-metadata.d.ts +12 -0
  194. package/lib/core/vault-metadata.js +42 -0
  195. package/lib/core/version-check.d.ts +58 -0
  196. package/lib/core/version-check.js +182 -0
  197. package/lib/evm/index.d.ts +2 -0
  198. package/lib/evm/index.js +19 -0
  199. package/lib/evm/methods/crossChainVault.d.ts +128 -0
  200. package/lib/evm/methods/crossChainVault.js +853 -0
  201. package/lib/evm/methods/crossChainVaultRegistry.d.ts +93 -0
  202. package/lib/evm/methods/crossChainVaultRegistry.js +240 -0
  203. package/lib/evm/methods/index.d.ts +2 -0
  204. package/lib/evm/methods/index.js +19 -0
  205. package/lib/evm/types/crossChain.d.ts +363 -0
  206. package/lib/evm/types/crossChain.js +20 -0
  207. package/lib/evm/types/index.d.ts +1 -0
  208. package/lib/evm/types/index.js +18 -0
  209. package/lib/index.d.ts +30 -0
  210. package/lib/index.js +52 -0
  211. package/lib/main.d.ts +527 -0
  212. package/lib/main.js +601 -0
  213. package/lib/modules/api/fetcher.d.ts +82 -0
  214. package/lib/modules/api/fetcher.js +150 -0
  215. package/lib/modules/api/index.d.ts +1 -0
  216. package/lib/modules/api/index.js +6 -0
  217. package/lib/modules/api/main.d.ts +313 -0
  218. package/lib/modules/api/main.js +479 -0
  219. package/lib/modules/sub-accounts/fetcher.d.ts +53 -0
  220. package/lib/modules/sub-accounts/fetcher.js +120 -0
  221. package/lib/modules/sub-accounts/index.d.ts +2 -0
  222. package/lib/modules/sub-accounts/index.js +19 -0
  223. package/lib/modules/sub-accounts/main.d.ts +243 -0
  224. package/lib/modules/sub-accounts/main.js +205 -0
  225. package/lib/modules/sub-accounts/utils.d.ts +106 -0
  226. package/lib/modules/sub-accounts/utils.js +112 -0
  227. package/lib/modules/vaults/adapter.helpers.d.ts +64 -0
  228. package/lib/modules/vaults/adapter.helpers.js +184 -0
  229. package/lib/modules/vaults/fetcher.d.ts +147 -0
  230. package/lib/modules/vaults/fetcher.js +368 -0
  231. package/lib/modules/vaults/getters.d.ts +570 -0
  232. package/lib/modules/vaults/getters.js +3051 -0
  233. package/lib/modules/vaults/index.d.ts +20 -0
  234. package/lib/modules/vaults/index.js +44 -0
  235. package/lib/modules/vaults/main.d.ts +601 -0
  236. package/lib/modules/vaults/main.js +1623 -0
  237. package/lib/modules/vaults/prefetch.d.ts +65 -0
  238. package/lib/modules/vaults/prefetch.js +120 -0
  239. package/lib/modules/vaults/read.actions.d.ts +225 -0
  240. package/lib/modules/vaults/read.actions.js +596 -0
  241. package/lib/modules/vaults/types.d.ts +71 -0
  242. package/lib/modules/vaults/types.js +3 -0
  243. package/lib/modules/vaults/utils/call-data-decoder.d.ts +61 -0
  244. package/lib/modules/vaults/utils/call-data-decoder.js +194 -0
  245. package/lib/modules/vaults/utils/date-utils.d.ts +50 -0
  246. package/lib/modules/vaults/utils/date-utils.js +84 -0
  247. package/lib/modules/vaults/utils.d.ts +140 -0
  248. package/lib/modules/vaults/utils.js +799 -0
  249. package/lib/modules/vaults/write.actions.d.ts +529 -0
  250. package/lib/modules/vaults/write.actions.js +1749 -0
  251. package/lib/polyfills.d.ts +1 -0
  252. package/lib/polyfills.js +12 -0
  253. package/lib/sdk.d.ts +26721 -0
  254. package/lib/services/coingecko/fetcher.d.ts +15 -0
  255. package/lib/services/coingecko/fetcher.js +67 -0
  256. package/lib/services/coingecko/index.d.ts +2 -0
  257. package/lib/services/coingecko/index.js +19 -0
  258. package/lib/services/coingecko/utils.d.ts +1 -0
  259. package/lib/services/coingecko/utils.js +24 -0
  260. package/lib/services/debank/fetcher.d.ts +126 -0
  261. package/lib/services/debank/fetcher.js +47 -0
  262. package/lib/services/debank/index.d.ts +2 -0
  263. package/lib/services/debank/index.js +19 -0
  264. package/lib/services/debank/utils.d.ts +38 -0
  265. package/lib/services/debank/utils.js +297 -0
  266. package/lib/services/layerzero/deposits.d.ts +49 -0
  267. package/lib/services/layerzero/deposits.js +166 -0
  268. package/lib/services/layerzero/redeems.d.ts +20 -0
  269. package/lib/services/layerzero/redeems.js +92 -0
  270. package/lib/services/layerzero/utils.d.ts +9 -0
  271. package/lib/services/layerzero/utils.js +22 -0
  272. package/lib/services/octavfi/fetcher.d.ts +9 -0
  273. package/lib/services/octavfi/fetcher.js +103 -0
  274. package/lib/services/octavfi/index.d.ts +3 -0
  275. package/lib/services/octavfi/index.js +20 -0
  276. package/lib/services/octavfi/types.d.ts +34 -0
  277. package/lib/services/octavfi/types.js +3 -0
  278. package/lib/services/octavfi/utils.d.ts +16 -0
  279. package/lib/services/octavfi/utils.js +212 -0
  280. package/lib/services/subgraph/fetcher.d.ts +2 -0
  281. package/lib/services/subgraph/fetcher.js +61 -0
  282. package/lib/services/subgraph/index.d.ts +2 -0
  283. package/lib/services/subgraph/index.js +19 -0
  284. package/lib/services/subgraph/schema.d.ts +45 -0
  285. package/lib/services/subgraph/schema.js +75 -0
  286. package/lib/services/subgraph/vaults.d.ts +25 -0
  287. package/lib/services/subgraph/vaults.js +1106 -0
  288. package/lib/services/swap-quotes/index.d.ts +105 -0
  289. package/lib/services/swap-quotes/index.js +77 -0
  290. package/lib/services/swap-quotes/paraswap.d.ts +51 -0
  291. package/lib/services/swap-quotes/paraswap.js +138 -0
  292. package/lib/types/api.d.ts +280 -0
  293. package/lib/types/api.js +3 -0
  294. package/lib/types/index.d.ts +12 -0
  295. package/lib/types/index.js +28 -0
  296. package/lib/types/points.d.ts +28 -0
  297. package/lib/types/points.js +3 -0
  298. package/lib/types/pools.d.ts +144 -0
  299. package/lib/types/pools.js +3 -0
  300. package/lib/types/staking.d.ts +28 -0
  301. package/lib/types/staking.js +3 -0
  302. package/lib/types/sub-accounts.d.ts +140 -0
  303. package/lib/types/sub-accounts.js +3 -0
  304. package/lib/types/subgraph.d.ts +74 -0
  305. package/lib/types/subgraph.js +3 -0
  306. package/lib/types/typed-contract.d.ts +102 -0
  307. package/lib/types/typed-contract.js +3 -0
  308. package/lib/types/user.d.ts +1 -0
  309. package/lib/types/user.js +3 -0
  310. package/lib/types/vaults.d.ts +714 -0
  311. package/lib/types/vaults.js +24 -0
  312. package/lib/types/web3.d.ts +51 -0
  313. package/lib/types/web3.js +14 -0
  314. package/lib/types/webserver.d.ts +698 -0
  315. package/lib/types/webserver.js +3 -0
  316. package/package.json +78 -0
@@ -0,0 +1,740 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ABI_SWAP_ROUTER = void 0;
4
+ /** ABI for the August `SwapRouter` periphery contract. */
5
+ exports.ABI_SWAP_ROUTER = [
6
+ { inputs: [], stateMutability: 'nonpayable', type: 'constructor' },
7
+ { inputs: [], name: 'AlreadyConfigured', type: 'error' },
8
+ { inputs: [], name: 'AssetNotAcceptedByVault', type: 'error' },
9
+ { inputs: [], name: 'ContractIsPaused', type: 'error' },
10
+ { inputs: [], name: 'ContractNotPaused', type: 'error' },
11
+ { inputs: [], name: 'EmptySwapParams', type: 'error' },
12
+ {
13
+ inputs: [{ internalType: 'uint256', name: 'errorCode', type: 'uint256' }],
14
+ name: 'FailedToAcquireLpTokenAddressErrorCode',
15
+ type: 'error',
16
+ },
17
+ {
18
+ inputs: [{ internalType: 'bytes', name: 'lowLevelData', type: 'bytes' }],
19
+ name: 'FailedToAcquireLpTokenAddressLowLevelError',
20
+ type: 'error',
21
+ },
22
+ {
23
+ inputs: [{ internalType: 'string', name: 'reason', type: 'string' }],
24
+ name: 'FailedToAcquireLpTokenAddressStringError',
25
+ type: 'error',
26
+ },
27
+ {
28
+ inputs: [{ internalType: 'uint256', name: 'errorCode', type: 'uint256' }],
29
+ name: 'FailedToAcquireLpTokenDecimalsErrorCode',
30
+ type: 'error',
31
+ },
32
+ {
33
+ inputs: [{ internalType: 'bytes', name: 'lowLevelData', type: 'bytes' }],
34
+ name: 'FailedToAcquireLpTokenDecimalsLowLevelError',
35
+ type: 'error',
36
+ },
37
+ {
38
+ inputs: [{ internalType: 'string', name: 'reason', type: 'string' }],
39
+ name: 'FailedToAcquireLpTokenDecimalsStringError',
40
+ type: 'error',
41
+ },
42
+ { inputs: [], name: 'FeeCollectorNotSet', type: 'error' },
43
+ { inputs: [], name: 'FeesCollectorNoOp', type: 'error' },
44
+ {
45
+ inputs: [{ internalType: 'address', name: 'tokenAddr', type: 'address' }],
46
+ name: 'InputTokenNotSwapped',
47
+ type: 'error',
48
+ },
49
+ {
50
+ inputs: [{ internalType: 'address', name: 'tokenAddr', type: 'address' }],
51
+ name: 'InputTokenNotWhitelisted',
52
+ type: 'error',
53
+ },
54
+ { inputs: [], name: 'InvalidAddress', type: 'error' },
55
+ { inputs: [], name: 'InvalidErc20Token', type: 'error' },
56
+ { inputs: [], name: 'InvalidFeeCollector', type: 'error' },
57
+ { inputs: [], name: 'InvalidLpTokenDecimals', type: 'error' },
58
+ { inputs: [], name: 'InvalidNotWhitelisted', type: 'error' },
59
+ { inputs: [], name: 'InvalidOrigin', type: 'error' },
60
+ { inputs: [], name: 'InvalidPair', type: 'error' },
61
+ { inputs: [], name: 'InvalidPayload', type: 'error' },
62
+ { inputs: [], name: 'InvalidReceiver', type: 'error' },
63
+ { inputs: [], name: 'InvalidRouter', type: 'error' },
64
+ {
65
+ inputs: [
66
+ { internalType: 'address', name: 'routerAddr', type: 'address' },
67
+ { internalType: 'address', name: 'tokenApprovalAddr', type: 'address' },
68
+ ],
69
+ name: 'InvalidRouterPath',
70
+ type: 'error',
71
+ },
72
+ { inputs: [], name: 'InvalidVault', type: 'error' },
73
+ { inputs: [], name: 'InvalidVaultType', type: 'error' },
74
+ { inputs: [], name: 'MissingSlippageProtection', type: 'error' },
75
+ { inputs: [], name: 'NativeReferenceAssetNotSupported', type: 'error' },
76
+ { inputs: [], name: 'NativeSwapFailed', type: 'error' },
77
+ { inputs: [], name: 'NativeTokenTransferFailed', type: 'error' },
78
+ { inputs: [], name: 'NotConfigured', type: 'error' },
79
+ { inputs: [], name: 'OriginAlreadyExists', type: 'error' },
80
+ { inputs: [], name: 'OriginFeeTooHigh', type: 'error' },
81
+ { inputs: [], name: 'OriginFeeTooLow', type: 'error' },
82
+ { inputs: [], name: 'OutputTokenCannotBeNativeToken', type: 'error' },
83
+ {
84
+ inputs: [{ internalType: 'address', name: 'tokenAddr', type: 'address' }],
85
+ name: 'OutputTokenNotWhitelisted',
86
+ type: 'error',
87
+ },
88
+ { inputs: [], name: 'OwnerAddressRequired', type: 'error' },
89
+ { inputs: [], name: 'OwnerOnly', type: 'error' },
90
+ { inputs: [], name: 'ReentrancyGuardReentrantCall', type: 'error' },
91
+ {
92
+ inputs: [{ internalType: 'address', name: 'routerAddr', type: 'address' }],
93
+ name: 'RouterPathAlreadyDisabled',
94
+ type: 'error',
95
+ },
96
+ { inputs: [], name: 'SelectorRequired', type: 'error' },
97
+ {
98
+ inputs: [
99
+ { internalType: 'address', name: 'tokenAddr', type: 'address' },
100
+ { internalType: 'uint256', name: 'amountOut', type: 'uint256' },
101
+ { internalType: 'uint256', name: 'minAmountOut', type: 'uint256' },
102
+ ],
103
+ name: 'SlippageError',
104
+ type: 'error',
105
+ },
106
+ {
107
+ inputs: [{ internalType: 'bytes', name: 'returnData', type: 'bytes' }],
108
+ name: 'SwapFailed',
109
+ type: 'error',
110
+ },
111
+ { inputs: [], name: 'SwapFeeAmountTooLow', type: 'error' },
112
+ { inputs: [], name: 'SwapFeeTooHigh', type: 'error' },
113
+ { inputs: [], name: 'TokenAlreadyDisabled', type: 'error' },
114
+ { inputs: [], name: 'TokenAlreadyEnabled', type: 'error' },
115
+ { inputs: [], name: 'TooManySwaps', type: 'error' },
116
+ { inputs: [], name: 'WrappedNativeTokenAddressNotDefined', type: 'error' },
117
+ { inputs: [], name: 'ZeroAddress', type: 'error' },
118
+ { inputs: [], name: 'ZeroAmount', type: 'error' },
119
+ { inputs: [], name: 'ZeroSharesReceived', type: 'error' },
120
+ { anonymous: false, inputs: [], name: 'ContractConfigured', type: 'event' },
121
+ { anonymous: false, inputs: [], name: 'ContractPaused', type: 'event' },
122
+ { anonymous: false, inputs: [], name: 'ContractResumed', type: 'event' },
123
+ {
124
+ anonymous: false,
125
+ inputs: [
126
+ {
127
+ indexed: true,
128
+ internalType: 'address',
129
+ name: 'newAddr',
130
+ type: 'address',
131
+ },
132
+ ],
133
+ name: 'FeesCollectorUpdated',
134
+ type: 'event',
135
+ },
136
+ {
137
+ anonymous: false,
138
+ inputs: [
139
+ {
140
+ indexed: true,
141
+ internalType: 'bytes32',
142
+ name: 'originCode',
143
+ type: 'bytes32',
144
+ },
145
+ {
146
+ indexed: false,
147
+ internalType: 'uint256',
148
+ name: 'originFee',
149
+ type: 'uint256',
150
+ },
151
+ {
152
+ indexed: false,
153
+ internalType: 'address',
154
+ name: 'originFeeCollector',
155
+ type: 'address',
156
+ },
157
+ ],
158
+ name: 'OriginAdded',
159
+ type: 'event',
160
+ },
161
+ {
162
+ anonymous: false,
163
+ inputs: [
164
+ {
165
+ indexed: true,
166
+ internalType: 'address',
167
+ name: 'vaultAddr',
168
+ type: 'address',
169
+ },
170
+ {
171
+ indexed: true,
172
+ internalType: 'address',
173
+ name: 'assetAddr',
174
+ type: 'address',
175
+ },
176
+ {
177
+ indexed: false,
178
+ internalType: 'uint256',
179
+ name: 'consumableAmount',
180
+ type: 'uint256',
181
+ },
182
+ {
183
+ indexed: false,
184
+ internalType: 'uint256',
185
+ name: 'feeAmount',
186
+ type: 'uint256',
187
+ },
188
+ {
189
+ indexed: true,
190
+ internalType: 'bytes32',
191
+ name: 'originCode',
192
+ type: 'bytes32',
193
+ },
194
+ ],
195
+ name: 'OriginFeeApplied',
196
+ type: 'event',
197
+ },
198
+ {
199
+ anonymous: false,
200
+ inputs: [
201
+ {
202
+ indexed: true,
203
+ internalType: 'bytes32',
204
+ name: 'originCode',
205
+ type: 'bytes32',
206
+ },
207
+ ],
208
+ name: 'OriginRevoked',
209
+ type: 'event',
210
+ },
211
+ {
212
+ anonymous: false,
213
+ inputs: [
214
+ {
215
+ indexed: true,
216
+ internalType: 'bytes32',
217
+ name: 'originCode',
218
+ type: 'bytes32',
219
+ },
220
+ {
221
+ indexed: false,
222
+ internalType: 'uint256',
223
+ name: 'originFee',
224
+ type: 'uint256',
225
+ },
226
+ {
227
+ indexed: false,
228
+ internalType: 'address',
229
+ name: 'originFeeCollector',
230
+ type: 'address',
231
+ },
232
+ ],
233
+ name: 'OriginUpdated',
234
+ type: 'event',
235
+ },
236
+ {
237
+ anonymous: false,
238
+ inputs: [
239
+ {
240
+ indexed: true,
241
+ internalType: 'address',
242
+ name: 'previousOwner',
243
+ type: 'address',
244
+ },
245
+ {
246
+ indexed: true,
247
+ internalType: 'address',
248
+ name: 'newOwner',
249
+ type: 'address',
250
+ },
251
+ ],
252
+ name: 'OwnershipTransferred',
253
+ type: 'event',
254
+ },
255
+ {
256
+ anonymous: false,
257
+ inputs: [
258
+ {
259
+ indexed: true,
260
+ internalType: 'address',
261
+ name: 'token',
262
+ type: 'address',
263
+ },
264
+ { indexed: true, internalType: 'address', name: 'to', type: 'address' },
265
+ {
266
+ indexed: false,
267
+ internalType: 'uint256',
268
+ name: 'amount',
269
+ type: 'uint256',
270
+ },
271
+ ],
272
+ name: 'ResidualBalanceSwept',
273
+ type: 'event',
274
+ },
275
+ {
276
+ anonymous: false,
277
+ inputs: [
278
+ {
279
+ indexed: true,
280
+ internalType: 'address',
281
+ name: 'token',
282
+ type: 'address',
283
+ },
284
+ { indexed: true, internalType: 'address', name: 'to', type: 'address' },
285
+ {
286
+ indexed: false,
287
+ internalType: 'uint256',
288
+ name: 'amount',
289
+ type: 'uint256',
290
+ },
291
+ ],
292
+ name: 'ResidualRefund',
293
+ type: 'event',
294
+ },
295
+ {
296
+ anonymous: false,
297
+ inputs: [
298
+ {
299
+ indexed: true,
300
+ internalType: 'address',
301
+ name: 'routerAddr',
302
+ type: 'address',
303
+ },
304
+ ],
305
+ name: 'RouterPathDisabled',
306
+ type: 'event',
307
+ },
308
+ {
309
+ anonymous: false,
310
+ inputs: [
311
+ {
312
+ indexed: true,
313
+ internalType: 'address',
314
+ name: 'routerAddr',
315
+ type: 'address',
316
+ },
317
+ {
318
+ indexed: true,
319
+ internalType: 'address',
320
+ name: 'tokenApprovalAddr',
321
+ type: 'address',
322
+ },
323
+ ],
324
+ name: 'RouterPathEnabled',
325
+ type: 'event',
326
+ },
327
+ {
328
+ anonymous: false,
329
+ inputs: [
330
+ {
331
+ indexed: true,
332
+ internalType: 'address',
333
+ name: 'vaultAddr',
334
+ type: 'address',
335
+ },
336
+ {
337
+ indexed: true,
338
+ internalType: 'address',
339
+ name: 'tokenOutAddress',
340
+ type: 'address',
341
+ },
342
+ {
343
+ indexed: false,
344
+ internalType: 'uint256',
345
+ name: 'swapAmountOut',
346
+ type: 'uint256',
347
+ },
348
+ {
349
+ indexed: false,
350
+ internalType: 'uint256',
351
+ name: 'feeAmount',
352
+ type: 'uint256',
353
+ },
354
+ ],
355
+ name: 'SwapFeeApplied',
356
+ type: 'event',
357
+ },
358
+ {
359
+ anonymous: false,
360
+ inputs: [
361
+ {
362
+ indexed: true,
363
+ internalType: 'address',
364
+ name: 'tokenAddr',
365
+ type: 'address',
366
+ },
367
+ ],
368
+ name: 'TokenDisabled',
369
+ type: 'event',
370
+ },
371
+ {
372
+ anonymous: false,
373
+ inputs: [
374
+ {
375
+ indexed: true,
376
+ internalType: 'address',
377
+ name: 'tokenAddr',
378
+ type: 'address',
379
+ },
380
+ ],
381
+ name: 'TokenEnabled',
382
+ type: 'event',
383
+ },
384
+ {
385
+ anonymous: false,
386
+ inputs: [
387
+ {
388
+ indexed: true,
389
+ internalType: 'address',
390
+ name: 'vaultAddr',
391
+ type: 'address',
392
+ },
393
+ ],
394
+ name: 'VaultDisabled',
395
+ type: 'event',
396
+ },
397
+ {
398
+ anonymous: false,
399
+ inputs: [
400
+ {
401
+ indexed: true,
402
+ internalType: 'address',
403
+ name: 'vaultAddr',
404
+ type: 'address',
405
+ },
406
+ ],
407
+ name: 'VaultEnabled',
408
+ type: 'event',
409
+ },
410
+ {
411
+ inputs: [],
412
+ name: 'BPS_DENOMINATOR',
413
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
414
+ stateMutability: 'view',
415
+ type: 'function',
416
+ },
417
+ {
418
+ inputs: [],
419
+ name: 'MAX_ORIGIN_FEE_BPS',
420
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
421
+ stateMutability: 'view',
422
+ type: 'function',
423
+ },
424
+ {
425
+ inputs: [],
426
+ name: 'MAX_SWAPS',
427
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
428
+ stateMutability: 'view',
429
+ type: 'function',
430
+ },
431
+ {
432
+ inputs: [],
433
+ name: 'MAX_SWAP_FEE_BPS',
434
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
435
+ stateMutability: 'view',
436
+ type: 'function',
437
+ },
438
+ {
439
+ inputs: [],
440
+ name: 'NATIVE_TOKEN_ADDRESS',
441
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
442
+ stateMutability: 'view',
443
+ type: 'function',
444
+ },
445
+ {
446
+ inputs: [],
447
+ name: 'VAULT_TYPE_ERC4626',
448
+ outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
449
+ stateMutability: 'view',
450
+ type: 'function',
451
+ },
452
+ {
453
+ inputs: [],
454
+ name: 'VAULT_TYPE_TOKENIZED_VAULT_V2',
455
+ outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
456
+ stateMutability: 'view',
457
+ type: 'function',
458
+ },
459
+ {
460
+ inputs: [
461
+ { internalType: 'bytes32', name: 'originCode', type: 'bytes32' },
462
+ { internalType: 'uint256', name: 'originFee', type: 'uint256' },
463
+ { internalType: 'address', name: 'originFeeCollector', type: 'address' },
464
+ ],
465
+ name: 'addOrigin',
466
+ outputs: [],
467
+ stateMutability: 'nonpayable',
468
+ type: 'function',
469
+ },
470
+ {
471
+ inputs: [
472
+ {
473
+ internalType: 'address',
474
+ name: 'newFeesCollectorAddr',
475
+ type: 'address',
476
+ },
477
+ {
478
+ internalType: 'address',
479
+ name: 'wrappedNativeTokenAddr',
480
+ type: 'address',
481
+ },
482
+ ],
483
+ name: 'configure',
484
+ outputs: [],
485
+ stateMutability: 'nonpayable',
486
+ type: 'function',
487
+ },
488
+ {
489
+ inputs: [
490
+ { internalType: 'bytes32', name: 'originCode', type: 'bytes32' },
491
+ { internalType: 'uint256', name: 'depositAmount', type: 'uint256' },
492
+ { internalType: 'address', name: 'vaultAddr', type: 'address' },
493
+ { internalType: 'address', name: 'assetAddr', type: 'address' },
494
+ { internalType: 'address', name: 'receiverAddr', type: 'address' },
495
+ ],
496
+ name: 'deposit',
497
+ outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],
498
+ stateMutability: 'nonpayable',
499
+ type: 'function',
500
+ },
501
+ {
502
+ inputs: [
503
+ { internalType: 'bytes32', name: 'originCode', type: 'bytes32' },
504
+ { internalType: 'address', name: 'vaultAddr', type: 'address' },
505
+ { internalType: 'address', name: 'receiverAddr', type: 'address' },
506
+ ],
507
+ name: 'depositNativeToken',
508
+ outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],
509
+ stateMutability: 'payable',
510
+ type: 'function',
511
+ },
512
+ {
513
+ inputs: [
514
+ { internalType: 'address', name: 'routerAddr', type: 'address' },
515
+ { internalType: 'bytes4', name: 'authorizedSelector', type: 'bytes4' },
516
+ ],
517
+ name: 'disableRouter',
518
+ outputs: [],
519
+ stateMutability: 'nonpayable',
520
+ type: 'function',
521
+ },
522
+ {
523
+ inputs: [{ internalType: 'address', name: 'tokenAddr', type: 'address' }],
524
+ name: 'disableToken',
525
+ outputs: [],
526
+ stateMutability: 'nonpayable',
527
+ type: 'function',
528
+ },
529
+ {
530
+ inputs: [{ internalType: 'address', name: 'vaultAddr', type: 'address' }],
531
+ name: 'disableVault',
532
+ outputs: [],
533
+ stateMutability: 'nonpayable',
534
+ type: 'function',
535
+ },
536
+ {
537
+ inputs: [
538
+ { internalType: 'address', name: 'routerAddr', type: 'address' },
539
+ { internalType: 'address', name: 'tokenApprovalAddr', type: 'address' },
540
+ { internalType: 'bytes4', name: 'authorizedSelector', type: 'bytes4' },
541
+ ],
542
+ name: 'enableRouter',
543
+ outputs: [],
544
+ stateMutability: 'nonpayable',
545
+ type: 'function',
546
+ },
547
+ {
548
+ inputs: [
549
+ {
550
+ internalType: 'contract IERC20Metadata',
551
+ name: 'token',
552
+ type: 'address',
553
+ },
554
+ ],
555
+ name: 'enableToken',
556
+ outputs: [],
557
+ stateMutability: 'nonpayable',
558
+ type: 'function',
559
+ },
560
+ {
561
+ inputs: [
562
+ { internalType: 'address', name: 'vaultAddr', type: 'address' },
563
+ { internalType: 'uint8', name: 'vaultType', type: 'uint8' },
564
+ { internalType: 'uint256', name: 'swapFee', type: 'uint256' },
565
+ ],
566
+ name: 'enableVault',
567
+ outputs: [],
568
+ stateMutability: 'nonpayable',
569
+ type: 'function',
570
+ },
571
+ {
572
+ inputs: [],
573
+ name: 'feesCollector',
574
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
575
+ stateMutability: 'view',
576
+ type: 'function',
577
+ },
578
+ {
579
+ inputs: [
580
+ { internalType: 'address', name: 'routerAddr', type: 'address' },
581
+ { internalType: 'bytes4', name: 'selector', type: 'bytes4' },
582
+ ],
583
+ name: 'isAuthorizedSelector',
584
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
585
+ stateMutability: 'view',
586
+ type: 'function',
587
+ },
588
+ {
589
+ inputs: [],
590
+ name: 'isConfigured',
591
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
592
+ stateMutability: 'view',
593
+ type: 'function',
594
+ },
595
+ {
596
+ inputs: [],
597
+ name: 'isPaused',
598
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
599
+ stateMutability: 'view',
600
+ type: 'function',
601
+ },
602
+ {
603
+ inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
604
+ name: 'origins',
605
+ outputs: [
606
+ { internalType: 'uint256', name: 'originFee', type: 'uint256' },
607
+ { internalType: 'address', name: 'originFeeCollector', type: 'address' },
608
+ ],
609
+ stateMutability: 'view',
610
+ type: 'function',
611
+ },
612
+ {
613
+ inputs: [],
614
+ name: 'owner',
615
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
616
+ stateMutability: 'view',
617
+ type: 'function',
618
+ },
619
+ {
620
+ inputs: [],
621
+ name: 'pause',
622
+ outputs: [],
623
+ stateMutability: 'nonpayable',
624
+ type: 'function',
625
+ },
626
+ {
627
+ inputs: [{ internalType: 'bytes32', name: 'originCode', type: 'bytes32' }],
628
+ name: 'revokeOrigin',
629
+ outputs: [],
630
+ stateMutability: 'nonpayable',
631
+ type: 'function',
632
+ },
633
+ {
634
+ inputs: [
635
+ { internalType: 'bytes32', name: 'originCode', type: 'bytes32' },
636
+ { internalType: 'address', name: 'vaultAddr', type: 'address' },
637
+ { internalType: 'address', name: 'receiverAddr', type: 'address' },
638
+ {
639
+ components: [
640
+ { internalType: 'address', name: 'tokenIn', type: 'address' },
641
+ { internalType: 'address', name: 'tokenOut', type: 'address' },
642
+ { internalType: 'uint256', name: 'amountIn', type: 'uint256' },
643
+ { internalType: 'uint256', name: 'minAmountOut', type: 'uint256' },
644
+ { internalType: 'address', name: 'router', type: 'address' },
645
+ { internalType: 'bytes', name: 'payload', type: 'bytes' },
646
+ ],
647
+ internalType: 'struct ISwapRouter.SwapParams[]',
648
+ name: 'swapParams',
649
+ type: 'tuple[]',
650
+ },
651
+ ],
652
+ name: 'swapAndDeposit',
653
+ outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],
654
+ stateMutability: 'nonpayable',
655
+ type: 'function',
656
+ },
657
+ {
658
+ inputs: [
659
+ { internalType: 'bytes32', name: 'originCode', type: 'bytes32' },
660
+ { internalType: 'address', name: 'vaultAddr', type: 'address' },
661
+ { internalType: 'address', name: 'receiverAddr', type: 'address' },
662
+ ],
663
+ name: 'swapAndDepositNativeToken',
664
+ outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],
665
+ stateMutability: 'payable',
666
+ type: 'function',
667
+ },
668
+ {
669
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
670
+ name: 'tokenTransferProxies',
671
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
672
+ stateMutability: 'view',
673
+ type: 'function',
674
+ },
675
+ {
676
+ inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
677
+ name: 'transferOwnership',
678
+ outputs: [],
679
+ stateMutability: 'nonpayable',
680
+ type: 'function',
681
+ },
682
+ {
683
+ inputs: [],
684
+ name: 'unPause',
685
+ outputs: [],
686
+ stateMutability: 'nonpayable',
687
+ type: 'function',
688
+ },
689
+ {
690
+ inputs: [
691
+ {
692
+ internalType: 'address',
693
+ name: 'newFeesCollectorAddr',
694
+ type: 'address',
695
+ },
696
+ ],
697
+ name: 'updateFeesCollector',
698
+ outputs: [],
699
+ stateMutability: 'nonpayable',
700
+ type: 'function',
701
+ },
702
+ {
703
+ inputs: [
704
+ { internalType: 'bytes32', name: 'originCode', type: 'bytes32' },
705
+ { internalType: 'uint256', name: 'originFee', type: 'uint256' },
706
+ { internalType: 'address', name: 'originFeeCollector', type: 'address' },
707
+ ],
708
+ name: 'updateOrigin',
709
+ outputs: [],
710
+ stateMutability: 'nonpayable',
711
+ type: 'function',
712
+ },
713
+ {
714
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
715
+ name: 'vaultInfo',
716
+ outputs: [
717
+ { internalType: 'uint256', name: 'swapFee', type: 'uint256' },
718
+ { internalType: 'uint8', name: 'vaultType', type: 'uint8' },
719
+ { internalType: 'address', name: 'referenceAsset', type: 'address' },
720
+ { internalType: 'address', name: 'lpTokenAddress', type: 'address' },
721
+ ],
722
+ stateMutability: 'view',
723
+ type: 'function',
724
+ },
725
+ {
726
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
727
+ name: 'whitelistedTokens',
728
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
729
+ stateMutability: 'view',
730
+ type: 'function',
731
+ },
732
+ {
733
+ inputs: [],
734
+ name: 'wrappedNativeTokenAddress',
735
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
736
+ stateMutability: 'view',
737
+ type: 'function',
738
+ },
739
+ ];
740
+ //# sourceMappingURL=SwapRouter.js.map