@gearbox-protocol/sdk 3.0.0-vfourabi.1 → 3.0.0-vfourabi.3

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 (275) hide show
  1. package/.eslintignore +3 -0
  2. package/.github/workflows/lint_pr.yml +18 -0
  3. package/.github/workflows/pr.yml +39 -0
  4. package/.github/workflows/release.yml +47 -0
  5. package/.gitignore +19 -0
  6. package/.husky/commit-msg +1 -0
  7. package/.husky/pre-commit +1 -0
  8. package/.nvmrc +1 -0
  9. package/.releaserc.json +34 -0
  10. package/.vscode/extensions.json +7 -0
  11. package/.vscode/settings.json +16 -0
  12. package/.yarn/install-state.gz +0 -0
  13. package/.yarnrc.yml +1 -0
  14. package/ContributionAgreement +72 -0
  15. package/dist/cjs/abi/iZapper.cjs +85 -0
  16. package/dist/cjs/abi/iZapper.d.ts +123 -0
  17. package/dist/cjs/sdk/index.cjs +19830 -19764
  18. package/dist/cjs/sdk/index.d.ts +3746 -3061
  19. package/dist/esm/abi/iZapper.d.mts +123 -0
  20. package/dist/esm/abi/iZapper.mjs +83 -0
  21. package/dist/esm/sdk/index.d.mts +3746 -3061
  22. package/dist/esm/sdk/index.mjs +19807 -19765
  23. package/jest.config.js +7 -0
  24. package/package.json +32 -2
  25. package/scripts/example.ts +30 -0
  26. package/src/abi/compressors.ts +3962 -0
  27. package/src/abi/errors.ts +196 -0
  28. package/src/abi/iERC20.ts +122 -0
  29. package/src/abi/iPausable.ts +35 -0
  30. package/src/abi/iPriceFeedStore.ts +227 -0
  31. package/src/abi/iUpdatablePriceFeed.ts +16 -0
  32. package/src/abi/iVersion.ts +28 -0
  33. package/src/abi/iZapper.ts +84 -0
  34. package/src/abi/routerV300.ts +378 -0
  35. package/src/abi/v300.ts +4151 -0
  36. package/src/abi/v310.ts +5179 -0
  37. package/src/adapters/AbstractAdapter.ts +28 -0
  38. package/src/adapters/BalancerV2VaultAdapterContract.ts +19 -0
  39. package/src/adapters/BalancerV3RouterAdapterContract.ts +19 -0
  40. package/src/adapters/CamelotV3AdapterContract.ts +20 -0
  41. package/src/adapters/ConvexV1BaseRewardPoolAdapterContract.ts +20 -0
  42. package/src/adapters/ConvexV1BoosterAdapterContract.ts +20 -0
  43. package/src/adapters/Curve2AssetsAdapterContract.ts +20 -0
  44. package/src/adapters/Curve3AssetsAdapterContract.ts +20 -0
  45. package/src/adapters/Curve4AssetsAdapterContract.ts +20 -0
  46. package/src/adapters/CurveV1AdapterStETHContract.ts +20 -0
  47. package/src/adapters/CurveV1StableNGAdapterContract.ts +20 -0
  48. package/src/adapters/DaiUsdsAdapterContract.ts +21 -0
  49. package/src/adapters/ERC4626AdapterContract.ts +20 -0
  50. package/src/adapters/MellowERC4626VaultAdapterContract.ts +20 -0
  51. package/src/adapters/MellowVaultAdapterContract.ts +20 -0
  52. package/src/adapters/PendleRouterAdapterContract.ts +21 -0
  53. package/src/adapters/StakingRewardsAdapterContract.ts +21 -0
  54. package/src/adapters/UniswapV2AdapterContract.ts +20 -0
  55. package/src/adapters/UniswapV3AdapterContract.ts +170 -0
  56. package/src/adapters/VelodromeV2AdapterContract.ts +20 -0
  57. package/src/adapters/WstETHV1AdapterContract.ts +20 -0
  58. package/src/adapters/YearnV2AdapterContract.ts +20 -0
  59. package/src/adapters/abi/adapters.ts +4325 -0
  60. package/src/adapters/abi/iBalancerV3RouterAdapter.ts +126 -0
  61. package/src/adapters/abi/index.ts +2 -0
  62. package/src/adapters/index.ts +2 -0
  63. package/src/adapters/plugin.ts +90 -0
  64. package/src/adapters/types.ts +62 -0
  65. package/src/dev/AccountOpener.ts +611 -0
  66. package/src/dev/PriceFeedStore.ts +95 -0
  67. package/src/dev/SDKExample.ts +167 -0
  68. package/src/dev/abi.ts +14 -0
  69. package/src/dev/calcLiquidatableLTs.ts +77 -0
  70. package/src/dev/createAnvilClient.ts +155 -0
  71. package/src/dev/index.ts +7 -0
  72. package/src/dev/setLTZero.ts +127 -0
  73. package/src/dev/setLTs.ts +68 -0
  74. package/src/sdk/GearboxSDK.ts +488 -0
  75. package/src/sdk/abi/index.ts +1 -0
  76. package/src/sdk/abi/oracles.ts +4614 -0
  77. package/src/sdk/accounts/CreditAccountsService.ts +1123 -0
  78. package/src/sdk/accounts/index.ts +1 -0
  79. package/src/sdk/base/AddressLabeller.ts +35 -0
  80. package/src/sdk/base/BaseContract.ts +237 -0
  81. package/src/sdk/base/IAddressLabeller.ts +13 -0
  82. package/src/sdk/base/PlaceholderContract.ts +12 -0
  83. package/src/sdk/base/SDKConstruct.ts +35 -0
  84. package/src/sdk/base/TokensMeta.ts +45 -0
  85. package/src/sdk/base/index.ts +6 -0
  86. package/src/sdk/base/types.ts +102 -0
  87. package/src/sdk/bots/BotsService.ts +92 -0
  88. package/src/sdk/bots/index.ts +2 -0
  89. package/src/sdk/bots/utils.ts +19 -0
  90. package/src/sdk/chain/Provider.ts +99 -0
  91. package/src/sdk/chain/chains.ts +41 -0
  92. package/src/sdk/chain/detectChain.ts +21 -0
  93. package/src/sdk/chain/index.ts +3 -0
  94. package/src/sdk/constants/address-provider.ts +47 -0
  95. package/src/sdk/constants/addresses.ts +82 -0
  96. package/src/sdk/constants/bot-permissions.ts +36 -0
  97. package/src/sdk/constants/index.ts +6 -0
  98. package/src/sdk/constants/math.ts +23 -0
  99. package/src/sdk/constants/networks.ts +38 -0
  100. package/src/sdk/constants/periphery.ts +7 -0
  101. package/src/sdk/core/BotListV3Contract.ts +103 -0
  102. package/src/sdk/core/GearStakingV3Contract.ts +84 -0
  103. package/src/sdk/core/address-provider/AbstractAddressProviderContract.ts +101 -0
  104. package/src/sdk/core/address-provider/AddressProviderV3Contract.ts +105 -0
  105. package/src/sdk/core/address-provider/AddressProviderV3_1Contract.ts +92 -0
  106. package/src/sdk/core/address-provider/getAddressProvider.ts +45 -0
  107. package/src/sdk/core/address-provider/index.ts +4 -0
  108. package/src/sdk/core/address-provider/types.ts +17 -0
  109. package/src/sdk/core/index.ts +3 -0
  110. package/src/sdk/gauges/GaugeStakingService.ts +100 -0
  111. package/src/sdk/gauges/index.ts +2 -0
  112. package/src/sdk/gauges/utils.ts +25 -0
  113. package/src/sdk/index.ts +17 -0
  114. package/src/sdk/market/MarketConfiguratorContract.ts +78 -0
  115. package/src/sdk/market/MarketRegister.ts +330 -0
  116. package/src/sdk/market/MarketSuite.ts +83 -0
  117. package/src/sdk/market/adapters/PlaceholderAdapterContracts.ts +18 -0
  118. package/src/sdk/market/adapters/factory.ts +34 -0
  119. package/src/sdk/market/adapters/index.ts +3 -0
  120. package/src/sdk/market/adapters/types.ts +7 -0
  121. package/src/sdk/market/credit/CreditConfiguratorV300Contract.ts +164 -0
  122. package/src/sdk/market/credit/CreditConfiguratorV310Contract.ts +139 -0
  123. package/src/sdk/market/credit/CreditFacadeV300Contract.ts +206 -0
  124. package/src/sdk/market/credit/CreditFacadeV310Contract.ts +190 -0
  125. package/src/sdk/market/credit/CreditManagerV300Contract.ts +122 -0
  126. package/src/sdk/market/credit/CreditManagerV310Contract.ts +122 -0
  127. package/src/sdk/market/credit/CreditSuite.ts +65 -0
  128. package/src/sdk/market/credit/createCreditConfigurator.ts +18 -0
  129. package/src/sdk/market/credit/createCreditFacade.ts +18 -0
  130. package/src/sdk/market/credit/createCreditManager.ts +18 -0
  131. package/src/sdk/market/credit/index.ts +8 -0
  132. package/src/sdk/market/credit/types.ts +42 -0
  133. package/src/sdk/market/index.ts +7 -0
  134. package/src/sdk/market/oracle/PriceOracleBaseContract.ts +376 -0
  135. package/src/sdk/market/oracle/PriceOracleV300Contract.ts +71 -0
  136. package/src/sdk/market/oracle/PriceOracleV310Contract.ts +43 -0
  137. package/src/sdk/market/oracle/createPriceOracle.ts +22 -0
  138. package/src/sdk/market/oracle/index.ts +4 -0
  139. package/src/sdk/market/oracle/types.ts +48 -0
  140. package/src/sdk/market/pool/GaugeContract.ts +120 -0
  141. package/src/sdk/market/pool/LinearInterestRateModelContract.ts +75 -0
  142. package/src/sdk/market/pool/PoolQuotaKeeperV300Contract.ts +89 -0
  143. package/src/sdk/market/pool/PoolQuotaKeeperV310Contract.ts +89 -0
  144. package/src/sdk/market/pool/PoolSuite.ts +76 -0
  145. package/src/sdk/market/pool/PoolV300Contract.ts +144 -0
  146. package/src/sdk/market/pool/PoolV310Contract.ts +144 -0
  147. package/src/sdk/market/pool/TumblerContract.ts +73 -0
  148. package/src/sdk/market/pool/createInterestRateModel.ts +33 -0
  149. package/src/sdk/market/pool/createPool.ts +19 -0
  150. package/src/sdk/market/pool/createPoolQuotaKeeper.ts +20 -0
  151. package/src/sdk/market/pool/createRateKeeper.ts +25 -0
  152. package/src/sdk/market/pool/index.ts +6 -0
  153. package/src/sdk/market/pool/types.ts +28 -0
  154. package/src/sdk/market/pricefeeds/AbstractLPPriceFeed.ts +71 -0
  155. package/src/sdk/market/pricefeeds/AbstractPriceFeed.ts +137 -0
  156. package/src/sdk/market/pricefeeds/BalancerStablePriceFeed.ts +24 -0
  157. package/src/sdk/market/pricefeeds/BalancerWeightedPriceFeed.ts +70 -0
  158. package/src/sdk/market/pricefeeds/BoundedPriceFeed.ts +34 -0
  159. package/src/sdk/market/pricefeeds/ChainlinkPriceFeed.ts +16 -0
  160. package/src/sdk/market/pricefeeds/CompositePriceFeed.ts +25 -0
  161. package/src/sdk/market/pricefeeds/CurveCryptoPriceFeed.ts +24 -0
  162. package/src/sdk/market/pricefeeds/CurveStablePriceFeed.ts +24 -0
  163. package/src/sdk/market/pricefeeds/CurveUSDPriceFeed.ts +24 -0
  164. package/src/sdk/market/pricefeeds/Erc4626PriceFeed.ts +36 -0
  165. package/src/sdk/market/pricefeeds/MellowLRTPriceFeed.ts +26 -0
  166. package/src/sdk/market/pricefeeds/PendleTWAPPTPriceFeed.ts +44 -0
  167. package/src/sdk/market/pricefeeds/PriceFeedRef.ts +34 -0
  168. package/src/sdk/market/pricefeeds/PriceFeedsRegister.ts +293 -0
  169. package/src/sdk/market/pricefeeds/RedstonePriceFeed.ts +65 -0
  170. package/src/sdk/market/pricefeeds/RedstoneUpdater.ts +304 -0
  171. package/src/sdk/market/pricefeeds/WstETHPriceFeed.ts +24 -0
  172. package/src/sdk/market/pricefeeds/YearnPriceFeed.ts +24 -0
  173. package/src/sdk/market/pricefeeds/ZeroPriceFeed.ts +17 -0
  174. package/src/sdk/market/pricefeeds/index.ts +20 -0
  175. package/src/sdk/market/pricefeeds/types.ts +82 -0
  176. package/src/sdk/market/pricefeeds/utils.ts +24 -0
  177. package/src/sdk/plugins/index.ts +10 -0
  178. package/src/sdk/router/PathOptionFactory.ts +147 -0
  179. package/src/sdk/router/RouterV3Contract.ts +558 -0
  180. package/src/sdk/router/index.ts +2 -0
  181. package/src/sdk/router/types.ts +48 -0
  182. package/src/sdk/sdk-gov-legacy/contracts/adapters.ts +39 -0
  183. package/src/sdk/sdk-gov-legacy/contracts/contracts.ts +647 -0
  184. package/src/sdk/sdk-gov-legacy/contracts/index.ts +2 -0
  185. package/src/sdk/sdk-gov-legacy/core/constants.ts +11 -0
  186. package/src/sdk/sdk-gov-legacy/index.ts +4 -0
  187. package/src/sdk/sdk-gov-legacy/oracles/PriceFeedType.ts +24 -0
  188. package/src/sdk/sdk-gov-legacy/oracles/index.ts +1 -0
  189. package/src/sdk/sdk-gov-legacy/tokens/aave.ts +101 -0
  190. package/src/sdk/sdk-gov-legacy/tokens/aura.ts +284 -0
  191. package/src/sdk/sdk-gov-legacy/tokens/balancer.ts +421 -0
  192. package/src/sdk/sdk-gov-legacy/tokens/compound.ts +79 -0
  193. package/src/sdk/sdk-gov-legacy/tokens/convex.ts +561 -0
  194. package/src/sdk/sdk-gov-legacy/tokens/curveLP.ts +480 -0
  195. package/src/sdk/sdk-gov-legacy/tokens/decimals.ts +301 -0
  196. package/src/sdk/sdk-gov-legacy/tokens/erc4626.ts +75 -0
  197. package/src/sdk/sdk-gov-legacy/tokens/gear.ts +273 -0
  198. package/src/sdk/sdk-gov-legacy/tokens/index.ts +18 -0
  199. package/src/sdk/sdk-gov-legacy/tokens/normal.ts +613 -0
  200. package/src/sdk/sdk-gov-legacy/tokens/quoted.ts +10 -0
  201. package/src/sdk/sdk-gov-legacy/tokens/stakingRewards.ts +41 -0
  202. package/src/sdk/sdk-gov-legacy/tokens/token.ts +2354 -0
  203. package/src/sdk/sdk-gov-legacy/tokens/tokenData.ts +44 -0
  204. package/src/sdk/sdk-gov-legacy/tokens/tokenType.ts +33 -0
  205. package/src/sdk/sdk-gov-legacy/tokens/wrapped.ts +28 -0
  206. package/src/sdk/sdk-gov-legacy/tokens/yearn.ts +122 -0
  207. package/src/sdk/sdk-gov-legacy/tokens/zircuit.ts +44 -0
  208. package/src/sdk/sdk-legacy/apy/index.ts +149 -0
  209. package/src/sdk/sdk-legacy/core/assets.ts +200 -0
  210. package/src/sdk/sdk-legacy/core/creditAccount.spec.ts +1966 -0
  211. package/src/sdk/sdk-legacy/core/creditAccount.ts +816 -0
  212. package/src/sdk/sdk-legacy/core/creditManager.ts +316 -0
  213. package/src/sdk/sdk-legacy/core/creditSession.ts +352 -0
  214. package/src/sdk/sdk-legacy/core/endpoint.ts +131 -0
  215. package/src/sdk/sdk-legacy/core/eventOrTx.ts +101 -0
  216. package/src/sdk/sdk-legacy/core/pool.ts +439 -0
  217. package/src/sdk/sdk-legacy/core/strategy.ts +82 -0
  218. package/src/sdk/sdk-legacy/core/transactions.ts +865 -0
  219. package/src/sdk/sdk-legacy/gearboxRewards/api.ts +704 -0
  220. package/src/sdk/sdk-legacy/gearboxRewards/apy.ts +267 -0
  221. package/src/sdk/sdk-legacy/gearboxRewards/extraAPY.ts +165 -0
  222. package/src/sdk/sdk-legacy/gearboxRewards/index.ts +3 -0
  223. package/src/sdk/sdk-legacy/gearboxRewards/merklAPI.ts +151 -0
  224. package/src/sdk/sdk-legacy/index.ts +21 -0
  225. package/src/sdk/sdk-legacy/pathfinder/core.ts +18 -0
  226. package/src/sdk/sdk-legacy/pathfinder/index.ts +1 -0
  227. package/src/sdk/sdk-legacy/payload/creditAccount.ts +48 -0
  228. package/src/sdk/sdk-legacy/payload/creditManager.ts +133 -0
  229. package/src/sdk/sdk-legacy/payload/creditSession.ts +143 -0
  230. package/src/sdk/sdk-legacy/payload/graphPayload.ts +10 -0
  231. package/src/sdk/sdk-legacy/payload/pool.ts +198 -0
  232. package/src/sdk/sdk-legacy/payload/token.ts +13 -0
  233. package/src/sdk/sdk-legacy/tokens/tokenData.ts +57 -0
  234. package/src/sdk/sdk-legacy/types/IAirdropDistributor.ts +103 -0
  235. package/src/sdk/sdk-legacy/types/IBaseRewardPool.ts +249 -0
  236. package/src/sdk/sdk-legacy/types/IDataCompressorV3.ts +957 -0
  237. package/src/sdk/sdk-legacy/types/IDegenDistributor.ts +70 -0
  238. package/src/sdk/sdk-legacy/types/IERC20Permit.ts +35 -0
  239. package/src/sdk/sdk-legacy/types/IERC20ZapperDeposits.ts +99 -0
  240. package/src/sdk/sdk-legacy/types/IETHZapperDeposits.ts +27 -0
  241. package/src/sdk/sdk-legacy/types/IFarmingPool.ts +229 -0
  242. package/src/sdk/sdk-legacy/types/IInterestRateModel.ts +23 -0
  243. package/src/sdk/sdk-legacy/types/IMulticall3.ts +242 -0
  244. package/src/sdk/sdk-legacy/types/IOffchainOracle.ts +31 -0
  245. package/src/sdk/sdk-legacy/types/index.ts +11 -0
  246. package/src/sdk/sdk-legacy/utils/formatter.ts +46 -0
  247. package/src/sdk/sdk-legacy/utils/index.ts +3 -0
  248. package/src/sdk/sdk-legacy/utils/math.ts +6 -0
  249. package/src/sdk/sdk-legacy/utils/price.ts +27 -0
  250. package/src/sdk/types/index.ts +5 -0
  251. package/src/sdk/types/logger.ts +13 -0
  252. package/src/sdk/types/state-human.ts +224 -0
  253. package/src/sdk/types/state.ts +8 -0
  254. package/src/sdk/types/transactions.ts +22 -0
  255. package/src/sdk/types/tvl.ts +4 -0
  256. package/src/sdk/utils/AddressMap.ts +111 -0
  257. package/src/sdk/utils/bytes32ToString.ts +6 -0
  258. package/src/sdk/utils/childLogger.ts +8 -0
  259. package/src/sdk/utils/createRawTx.ts +86 -0
  260. package/src/sdk/utils/etherscan.ts +42 -0
  261. package/src/sdk/utils/filterDust.ts +20 -0
  262. package/src/sdk/utils/formatter.ts +124 -0
  263. package/src/sdk/utils/index.ts +10 -0
  264. package/src/sdk/utils/internal/Hooks.ts +51 -0
  265. package/src/sdk/utils/internal/index.ts +1 -0
  266. package/src/sdk/utils/json.ts +27 -0
  267. package/src/sdk/utils/mappers.ts +38 -0
  268. package/src/sdk/utils/retry.ts +24 -0
  269. package/src/sdk/utils/viem/detectNetwork.ts +27 -0
  270. package/src/sdk/utils/viem/index.ts +3 -0
  271. package/src/sdk/utils/viem/sendRawTx.ts +36 -0
  272. package/src/sdk/utils/viem/simulateMulticall.ts +262 -0
  273. package/tsconfig.build.json +4 -0
  274. package/tsconfig.json +16 -0
  275. package/tsup.config.ts +77 -0
@@ -0,0 +1,196 @@
1
+ export const iRedstonePriceFeedExceptionsAbi = [
2
+ { type: "error", inputs: [], name: "DataPackageTimestampIncorrect" },
3
+ { type: "error", inputs: [], name: "DuplicateSignersException" },
4
+ { type: "error", inputs: [], name: "IncorrectSignersThresholdException" },
5
+ { type: "error", inputs: [], name: "NotEnoughSignersException" },
6
+ { type: "error", inputs: [], name: "RedstonePayloadTimestampIncorrect" },
7
+ ] as const;
8
+
9
+ export const ilpPriceFeedExceptionsAbi = [
10
+ { type: "error", inputs: [], name: "ExchangeRateOutOfBoundsException" },
11
+ { type: "error", inputs: [], name: "LowerBoundCantBeZeroException" },
12
+ { type: "error", inputs: [], name: "ReserveFeedMustNotBeSelfException" },
13
+ { type: "error", inputs: [], name: "UpdateBoundsBeforeCooldownException" },
14
+ { type: "error", inputs: [], name: "UpdateBoundsNotAllowedException" },
15
+ ] as const;
16
+
17
+ export const iRouterV3ErrorsAbi = [
18
+ {
19
+ type: "error",
20
+ inputs: [
21
+ { name: "tokenIn", internalType: "address", type: "address" },
22
+ { name: "tokenOut", internalType: "address", type: "address" },
23
+ ],
24
+ name: "PathNotFoundException",
25
+ },
26
+ {
27
+ type: "error",
28
+ inputs: [
29
+ { name: "ttIn", internalType: "uint8", type: "uint8" },
30
+ { name: "tokenOut", internalType: "address", type: "address" },
31
+ ],
32
+ name: "PathNotFoundExceptionTyped",
33
+ },
34
+ {
35
+ type: "error",
36
+ inputs: [{ name: "tokenOut", internalType: "address", type: "address" }],
37
+ name: "PathToTargetNotFound",
38
+ },
39
+ { type: "error", inputs: [], name: "UnsupportedAdapterType" },
40
+ {
41
+ type: "error",
42
+ inputs: [{ name: "", internalType: "address", type: "address" }],
43
+ name: "UnsupportedRouterComponent",
44
+ },
45
+ ] as const;
46
+
47
+ export const iExceptionsAbi = [
48
+ { type: "error", inputs: [], name: "ActiveCreditAccountNotSetException" },
49
+ { type: "error", inputs: [], name: "ActiveCreditAccountOverridenException" },
50
+ { type: "error", inputs: [], name: "AdapterIsNotRegisteredException" },
51
+ {
52
+ type: "error",
53
+ inputs: [{ name: "", internalType: "address", type: "address" }],
54
+ name: "AddressIsNotContractException",
55
+ },
56
+ { type: "error", inputs: [], name: "AddressNotFoundException" },
57
+ { type: "error", inputs: [], name: "AllowanceFailedException" },
58
+ { type: "error", inputs: [], name: "AmountCantBeZeroException" },
59
+ { type: "error", inputs: [], name: "BalanceLessThanExpectedException" },
60
+ { type: "error", inputs: [], name: "BorrowAmountOutOfLimitsException" },
61
+ { type: "error", inputs: [], name: "BorrowedBlockLimitException" },
62
+ { type: "error", inputs: [], name: "BorrowingMoreThanU2ForbiddenException" },
63
+ { type: "error", inputs: [], name: "CallerNotAccountFactoryException" },
64
+ { type: "error", inputs: [], name: "CallerNotAdapterException" },
65
+ { type: "error", inputs: [], name: "CallerNotConfiguratorException" },
66
+ { type: "error", inputs: [], name: "CallerNotControllerException" },
67
+ { type: "error", inputs: [], name: "CallerNotCreditAccountOwnerException" },
68
+ { type: "error", inputs: [], name: "CallerNotCreditFacadeException" },
69
+ { type: "error", inputs: [], name: "CallerNotCreditManagerException" },
70
+ { type: "error", inputs: [], name: "CallerNotExecutorException" },
71
+ { type: "error", inputs: [], name: "CallerNotGaugeException" },
72
+ { type: "error", inputs: [], name: "CallerNotMigratorException" },
73
+ { type: "error", inputs: [], name: "CallerNotPausableAdminException" },
74
+ { type: "error", inputs: [], name: "CallerNotPoolQuotaKeeperException" },
75
+ { type: "error", inputs: [], name: "CallerNotUnpausableAdminException" },
76
+ { type: "error", inputs: [], name: "CallerNotVetoAdminException" },
77
+ { type: "error", inputs: [], name: "CallerNotVoterException" },
78
+ { type: "error", inputs: [], name: "CloseAccountWithEnabledTokensException" },
79
+ { type: "error", inputs: [], name: "CloseAccountWithNonZeroDebtException" },
80
+ { type: "error", inputs: [], name: "CreditAccountDoesNotExistException" },
81
+ { type: "error", inputs: [], name: "CreditAccountIsInUseException" },
82
+ { type: "error", inputs: [], name: "CreditAccountNotLiquidatableException" },
83
+ { type: "error", inputs: [], name: "CreditManagerCantBorrowException" },
84
+ { type: "error", inputs: [], name: "CustomHealthFactorTooLowException" },
85
+ { type: "error", inputs: [], name: "DebtToZeroWithActiveQuotasException" },
86
+ { type: "error", inputs: [], name: "DebtUpdatedTwiceInOneBlockException" },
87
+ { type: "error", inputs: [], name: "ExpectedBalancesAlreadySetException" },
88
+ { type: "error", inputs: [], name: "ExpectedBalancesNotSetException" },
89
+ { type: "error", inputs: [], name: "ForbiddenInWhitelistedModeException" },
90
+ {
91
+ type: "error",
92
+ inputs: [],
93
+ name: "ForbiddenTokenBalanceIncreasedException",
94
+ },
95
+ { type: "error", inputs: [], name: "ForbiddenTokenEnabledException" },
96
+ { type: "error", inputs: [], name: "ForbiddenTokensException" },
97
+ { type: "error", inputs: [], name: "IncompatibleContractException" },
98
+ { type: "error", inputs: [], name: "IncompatibleCreditManagerException" },
99
+ { type: "error", inputs: [], name: "IncompatiblePoolQuotaKeeperException" },
100
+ { type: "error", inputs: [], name: "IncompatibleSuccessorException" },
101
+ { type: "error", inputs: [], name: "IncorrectExpirationDateException" },
102
+ { type: "error", inputs: [], name: "IncorrectLimitsException" },
103
+ { type: "error", inputs: [], name: "IncorrectLiquidationThresholdException" },
104
+ { type: "error", inputs: [], name: "IncorrectParameterException" },
105
+ { type: "error", inputs: [], name: "IncorrectPriceException" },
106
+ { type: "error", inputs: [], name: "IncorrectPriceFeedException" },
107
+ { type: "error", inputs: [], name: "IncorrectTokenContractException" },
108
+ { type: "error", inputs: [], name: "InsufficientBalanceException" },
109
+ { type: "error", inputs: [], name: "InsufficientRemainingFundsException" },
110
+ { type: "error", inputs: [], name: "InsufficientVotesException" },
111
+ { type: "error", inputs: [], name: "InvalidBotException" },
112
+ { type: "error", inputs: [], name: "InvalidCollateralHintException" },
113
+ {
114
+ type: "error",
115
+ inputs: [],
116
+ name: "MasterCreditAccountAlreadyDeployedException",
117
+ },
118
+ {
119
+ type: "error",
120
+ inputs: [{ name: "permission", internalType: "uint256", type: "uint256" }],
121
+ name: "NoPermissionException",
122
+ },
123
+ { type: "error", inputs: [], name: "NotAllowedAfterExpirationException" },
124
+ { type: "error", inputs: [], name: "NotAllowedWhenNotExpirableException" },
125
+ { type: "error", inputs: [], name: "NotApprovedBotException" },
126
+ { type: "error", inputs: [], name: "NotEnoughCollateralException" },
127
+ { type: "error", inputs: [], name: "NotImplementedException" },
128
+ { type: "error", inputs: [], name: "ParameterChangedAfterQueuedTxException" },
129
+ { type: "error", inputs: [], name: "ParameterChecksFailedException" },
130
+ { type: "error", inputs: [], name: "PriceFeedDoesNotExistException" },
131
+ { type: "error", inputs: [], name: "QuotaIsOutOfBoundsException" },
132
+ { type: "error", inputs: [], name: "ReceiveIsNotAllowedException" },
133
+ { type: "error", inputs: [], name: "RegisteredCreditManagerOnlyException" },
134
+ { type: "error", inputs: [], name: "RegisteredPoolOnlyException" },
135
+ {
136
+ type: "error",
137
+ inputs: [],
138
+ name: "RemainingTokenBalanceIncreasedException",
139
+ },
140
+ { type: "error", inputs: [], name: "StalePriceException" },
141
+ { type: "error", inputs: [], name: "TargetContractNotAllowedException" },
142
+ { type: "error", inputs: [], name: "TokenAlreadyAddedException" },
143
+ { type: "error", inputs: [], name: "TokenIsNotQuotedException" },
144
+ { type: "error", inputs: [], name: "TokenNotAllowedException" },
145
+ { type: "error", inputs: [], name: "TooManyEnabledTokensException" },
146
+ { type: "error", inputs: [], name: "TooManyTokensException" },
147
+ { type: "error", inputs: [], name: "TxExecutedOutsideTimeWindowException" },
148
+ { type: "error", inputs: [], name: "TxExecutionRevertedException" },
149
+ { type: "error", inputs: [], name: "TxNotQueuedException" },
150
+ { type: "error", inputs: [], name: "UnexpectedPermissionsException" },
151
+ { type: "error", inputs: [], name: "UnknownMethodException" },
152
+ { type: "error", inputs: [], name: "UpdateQuotaOnZeroDebtAccountException" },
153
+ { type: "error", inputs: [], name: "ValueOutOfRangeException" },
154
+ { type: "error", inputs: [], name: "VotingContractNotAllowedException" },
155
+ { type: "error", inputs: [], name: "ZeroAddressException" },
156
+ ] as const;
157
+
158
+ export const iRedstoneErrorsAbi = [
159
+ { type: "error", inputs: [], name: "CalldataMustHaveValidPayload" },
160
+ { type: "error", inputs: [], name: "CalldataOverOrUnderFlow" },
161
+ { type: "error", inputs: [], name: "EachSignerMustProvideTheSameValue" },
162
+ { type: "error", inputs: [], name: "EmptyCalldataPointersArr" },
163
+ { type: "error", inputs: [], name: "IncorrectUnsignedMetadataSize" },
164
+ {
165
+ type: "error",
166
+ inputs: [
167
+ {
168
+ name: "receivedSignersCount",
169
+ internalType: "uint256",
170
+ type: "uint256",
171
+ },
172
+ {
173
+ name: "requiredSignersCount",
174
+ internalType: "uint256",
175
+ type: "uint256",
176
+ },
177
+ ],
178
+ name: "InsufficientNumberOfUniqueSigners",
179
+ },
180
+ { type: "error", inputs: [], name: "InvalidCalldataPointer" },
181
+ {
182
+ type: "error",
183
+ inputs: [
184
+ { name: "receivedSigner", internalType: "address", type: "address" },
185
+ ],
186
+ name: "SignerNotAuthorised",
187
+ },
188
+ ] as const;
189
+
190
+ export const errorAbis = [
191
+ ...iExceptionsAbi,
192
+ ...iRedstonePriceFeedExceptionsAbi,
193
+ ...iRedstoneErrorsAbi,
194
+ ...ilpPriceFeedExceptionsAbi,
195
+ ...iRouterV3ErrorsAbi,
196
+ ] as const;
@@ -0,0 +1,122 @@
1
+ /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2
+ // IERC20
3
+ /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4
+
5
+ export const ierc20Abi = [
6
+ {
7
+ type: "function",
8
+ name: "allowance",
9
+ inputs: [
10
+ { name: "owner", type: "address", internalType: "address" },
11
+ { name: "spender", type: "address", internalType: "address" },
12
+ ],
13
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
14
+ stateMutability: "view",
15
+ },
16
+ {
17
+ type: "function",
18
+ name: "approve",
19
+ inputs: [
20
+ { name: "spender", type: "address", internalType: "address" },
21
+ { name: "amount", type: "uint256", internalType: "uint256" },
22
+ ],
23
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
24
+ stateMutability: "nonpayable",
25
+ },
26
+ {
27
+ type: "function",
28
+ name: "balanceOf",
29
+ inputs: [{ name: "account", type: "address", internalType: "address" }],
30
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
31
+ stateMutability: "view",
32
+ },
33
+ {
34
+ type: "function",
35
+ name: "decimals",
36
+ inputs: [],
37
+ outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
38
+ stateMutability: "view",
39
+ },
40
+ {
41
+ type: "function",
42
+ name: "name",
43
+ inputs: [],
44
+ outputs: [{ name: "", type: "string", internalType: "string" }],
45
+ stateMutability: "view",
46
+ },
47
+ {
48
+ type: "function",
49
+ name: "symbol",
50
+ inputs: [],
51
+ outputs: [{ name: "", type: "string", internalType: "string" }],
52
+ stateMutability: "view",
53
+ },
54
+ {
55
+ type: "function",
56
+ name: "totalSupply",
57
+ inputs: [],
58
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
59
+ stateMutability: "view",
60
+ },
61
+ {
62
+ type: "function",
63
+ name: "transfer",
64
+ inputs: [
65
+ { name: "to", type: "address", internalType: "address" },
66
+ { name: "amount", type: "uint256", internalType: "uint256" },
67
+ ],
68
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
69
+ stateMutability: "nonpayable",
70
+ },
71
+ {
72
+ type: "function",
73
+ name: "transferFrom",
74
+ inputs: [
75
+ { name: "from", type: "address", internalType: "address" },
76
+ { name: "to", type: "address", internalType: "address" },
77
+ { name: "amount", type: "uint256", internalType: "uint256" },
78
+ ],
79
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
80
+ stateMutability: "nonpayable",
81
+ },
82
+ {
83
+ type: "event",
84
+ name: "Approval",
85
+ inputs: [
86
+ {
87
+ name: "owner",
88
+ type: "address",
89
+ indexed: true,
90
+ internalType: "address",
91
+ },
92
+ {
93
+ name: "spender",
94
+ type: "address",
95
+ indexed: true,
96
+ internalType: "address",
97
+ },
98
+ {
99
+ name: "value",
100
+ type: "uint256",
101
+ indexed: false,
102
+ internalType: "uint256",
103
+ },
104
+ ],
105
+ anonymous: false,
106
+ },
107
+ {
108
+ type: "event",
109
+ name: "Transfer",
110
+ inputs: [
111
+ { name: "from", type: "address", indexed: true, internalType: "address" },
112
+ { name: "to", type: "address", indexed: true, internalType: "address" },
113
+ {
114
+ name: "value",
115
+ type: "uint256",
116
+ indexed: false,
117
+ internalType: "uint256",
118
+ },
119
+ ],
120
+ anonymous: false,
121
+ },
122
+ ] as const;
@@ -0,0 +1,35 @@
1
+ export const iPausableAbi = [
2
+ {
3
+ type: "function",
4
+ name: "paused",
5
+ inputs: [],
6
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
7
+ stateMutability: "view",
8
+ },
9
+ {
10
+ type: "event",
11
+ name: "Paused",
12
+ inputs: [
13
+ {
14
+ name: "account",
15
+ type: "address",
16
+ indexed: false,
17
+ internalType: "address",
18
+ },
19
+ ],
20
+ anonymous: false,
21
+ },
22
+ {
23
+ type: "event",
24
+ name: "Unpaused",
25
+ inputs: [
26
+ {
27
+ name: "account",
28
+ type: "address",
29
+ indexed: false,
30
+ internalType: "address",
31
+ },
32
+ ],
33
+ anonymous: false,
34
+ },
35
+ ] as const;
@@ -0,0 +1,227 @@
1
+ export const iPriceFeedStoreAbi = [
2
+ {
3
+ type: "function",
4
+ name: "addPriceFeed",
5
+ inputs: [
6
+ { name: "priceFeed", type: "address", internalType: "address" },
7
+ { name: "stalenessPeriod", type: "uint32", internalType: "uint32" },
8
+ ],
9
+ outputs: [],
10
+ stateMutability: "nonpayable",
11
+ },
12
+ {
13
+ type: "function",
14
+ name: "allowPriceFeed",
15
+ inputs: [
16
+ { name: "token", type: "address", internalType: "address" },
17
+ { name: "priceFeed", type: "address", internalType: "address" },
18
+ ],
19
+ outputs: [],
20
+ stateMutability: "nonpayable",
21
+ },
22
+ {
23
+ type: "function",
24
+ name: "contractType",
25
+ inputs: [],
26
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
27
+ stateMutability: "view",
28
+ },
29
+ {
30
+ type: "function",
31
+ name: "forbidPriceFeed",
32
+ inputs: [
33
+ { name: "token", type: "address", internalType: "address" },
34
+ { name: "priceFeed", type: "address", internalType: "address" },
35
+ ],
36
+ outputs: [],
37
+ stateMutability: "nonpayable",
38
+ },
39
+ {
40
+ type: "function",
41
+ name: "getAllowanceTimestamp",
42
+ inputs: [
43
+ { name: "token", type: "address", internalType: "address" },
44
+ { name: "priceFeed", type: "address", internalType: "address" },
45
+ ],
46
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
47
+ stateMutability: "view",
48
+ },
49
+ {
50
+ type: "function",
51
+ name: "getKnownPriceFeeds",
52
+ inputs: [],
53
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
54
+ stateMutability: "view",
55
+ },
56
+ {
57
+ type: "function",
58
+ name: "getKnownTokens",
59
+ inputs: [],
60
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
61
+ stateMutability: "view",
62
+ },
63
+ {
64
+ type: "function",
65
+ name: "getPriceFeeds",
66
+ inputs: [{ name: "token", type: "address", internalType: "address" }],
67
+ outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
68
+ stateMutability: "view",
69
+ },
70
+ {
71
+ type: "function",
72
+ name: "getStalenessPeriod",
73
+ inputs: [{ name: "priceFeed", type: "address", internalType: "address" }],
74
+ outputs: [{ name: "", type: "uint32", internalType: "uint32" }],
75
+ stateMutability: "view",
76
+ },
77
+ {
78
+ type: "function",
79
+ name: "getTokenPriceFeedsMap",
80
+ inputs: [],
81
+ outputs: [
82
+ {
83
+ name: "",
84
+ type: "tuple[]",
85
+ internalType: "struct ConnectedPriceFeed[]",
86
+ components: [
87
+ { name: "token", type: "address", internalType: "address" },
88
+ { name: "priceFeeds", type: "address[]", internalType: "address[]" },
89
+ ],
90
+ },
91
+ ],
92
+ stateMutability: "view",
93
+ },
94
+ {
95
+ type: "function",
96
+ name: "isAllowedPriceFeed",
97
+ inputs: [
98
+ { name: "token", type: "address", internalType: "address" },
99
+ { name: "priceFeed", type: "address", internalType: "address" },
100
+ ],
101
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
102
+ stateMutability: "view",
103
+ },
104
+ {
105
+ type: "function",
106
+ name: "owner",
107
+ inputs: [],
108
+ outputs: [{ name: "", type: "address", internalType: "address" }],
109
+ stateMutability: "view",
110
+ },
111
+ {
112
+ type: "function",
113
+ name: "setStalenessPeriod",
114
+ inputs: [
115
+ { name: "priceFeed", type: "address", internalType: "address" },
116
+ { name: "stalenessPeriod", type: "uint32", internalType: "uint32" },
117
+ ],
118
+ outputs: [],
119
+ stateMutability: "nonpayable",
120
+ },
121
+ {
122
+ type: "function",
123
+ name: "version",
124
+ inputs: [],
125
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
126
+ stateMutability: "view",
127
+ },
128
+ {
129
+ type: "event",
130
+ name: "AddPriceFeed",
131
+ inputs: [
132
+ {
133
+ name: "priceFeed",
134
+ type: "address",
135
+ indexed: false,
136
+ internalType: "address",
137
+ },
138
+ {
139
+ name: "stalenessPeriod",
140
+ type: "uint32",
141
+ indexed: false,
142
+ internalType: "uint32",
143
+ },
144
+ ],
145
+ anonymous: false,
146
+ },
147
+ {
148
+ type: "event",
149
+ name: "AllowPriceFeed",
150
+ inputs: [
151
+ {
152
+ name: "token",
153
+ type: "address",
154
+ indexed: false,
155
+ internalType: "address",
156
+ },
157
+ {
158
+ name: "priceFeed",
159
+ type: "address",
160
+ indexed: false,
161
+ internalType: "address",
162
+ },
163
+ ],
164
+ anonymous: false,
165
+ },
166
+ {
167
+ type: "event",
168
+ name: "ForbidPriceFeed",
169
+ inputs: [
170
+ {
171
+ name: "token",
172
+ type: "address",
173
+ indexed: false,
174
+ internalType: "address",
175
+ },
176
+ {
177
+ name: "priceFeed",
178
+ type: "address",
179
+ indexed: false,
180
+ internalType: "address",
181
+ },
182
+ ],
183
+ anonymous: false,
184
+ },
185
+ {
186
+ type: "event",
187
+ name: "SetStalenessPeriod",
188
+ inputs: [
189
+ {
190
+ name: "priceFeed",
191
+ type: "address",
192
+ indexed: false,
193
+ internalType: "address",
194
+ },
195
+ {
196
+ name: "stalenessPeriod",
197
+ type: "uint32",
198
+ indexed: false,
199
+ internalType: "uint32",
200
+ },
201
+ ],
202
+ anonymous: false,
203
+ },
204
+ {
205
+ type: "error",
206
+ name: "CallerIsNotOwnerException",
207
+ inputs: [{ name: "caller", type: "address", internalType: "address" }],
208
+ },
209
+ {
210
+ type: "error",
211
+ name: "PriceFeedAlreadyAddedException",
212
+ inputs: [{ name: "priceFeed", type: "address", internalType: "address" }],
213
+ },
214
+ {
215
+ type: "error",
216
+ name: "PriceFeedIsNotAllowedException",
217
+ inputs: [
218
+ { name: "token", type: "address", internalType: "address" },
219
+ { name: "priceFeed", type: "address", internalType: "address" },
220
+ ],
221
+ },
222
+ {
223
+ type: "error",
224
+ name: "PriceFeedNotKnownException",
225
+ inputs: [{ name: "priceFeed", type: "address", internalType: "address" }],
226
+ },
227
+ ] as const;
@@ -0,0 +1,16 @@
1
+ export const iUpdatablePriceFeedAbi = [
2
+ {
3
+ type: "function",
4
+ name: "updatable",
5
+ inputs: [],
6
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
7
+ stateMutability: "view",
8
+ },
9
+ {
10
+ type: "function",
11
+ name: "updatePrice",
12
+ inputs: [{ name: "data", type: "bytes", internalType: "bytes" }],
13
+ outputs: [],
14
+ stateMutability: "nonpayable",
15
+ },
16
+ ] as const;
@@ -0,0 +1,28 @@
1
+ export const iVersionAbi = [
2
+ {
3
+ type: "function",
4
+ name: "contractType",
5
+ inputs: [],
6
+ outputs: [
7
+ {
8
+ name: "",
9
+ type: "bytes32",
10
+ internalType: "bytes32",
11
+ },
12
+ ],
13
+ stateMutability: "view",
14
+ },
15
+ {
16
+ type: "function",
17
+ name: "version",
18
+ inputs: [],
19
+ outputs: [
20
+ {
21
+ name: "",
22
+ type: "uint256",
23
+ internalType: "uint256",
24
+ },
25
+ ],
26
+ stateMutability: "view",
27
+ },
28
+ ] as const;