@mento-protocol/mento-sdk 3.0.0-beta.2 → 3.0.0-beta.21
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/README.md +34 -0
- package/dist/cache/routes.d.ts +13 -0
- package/dist/cache/routes.d.ts.map +1 -0
- package/dist/cache/routes.js +130 -0
- package/dist/cache/routes.js.map +1 -0
- package/dist/cache/tokens.d.ts +67 -0
- package/dist/cache/tokens.d.ts.map +1 -0
- package/dist/cache/tokens.js +379 -0
- package/dist/cache/tokens.js.map +1 -0
- package/dist/core/abis/activePool.d.ts +2 -0
- package/dist/core/abis/activePool.d.ts.map +1 -0
- package/dist/core/abis/activePool.js +14 -0
- package/dist/core/abis/activePool.js.map +1 -0
- package/dist/core/abis/addressesRegistry.d.ts +2 -0
- package/dist/core/abis/addressesRegistry.d.ts.map +1 -0
- package/dist/core/abis/addressesRegistry.js +26 -0
- package/dist/core/abis/addressesRegistry.js.map +1 -0
- package/dist/core/abis/borrowerOperations.d.ts +9 -0
- package/dist/core/abis/borrowerOperations.d.ts.map +1 -0
- package/dist/core/abis/borrowerOperations.js +89 -0
- package/dist/core/abis/borrowerOperations.js.map +1 -0
- package/dist/core/abis/breakerbox.d.ts +13 -0
- package/dist/core/abis/breakerbox.d.ts.map +1 -0
- package/dist/core/abis/breakerbox.js +8 -0
- package/dist/core/abis/breakerbox.js.map +1 -0
- package/dist/core/abis/erc20.d.ts +7 -0
- package/dist/core/abis/erc20.d.ts.map +1 -1
- package/dist/core/abis/erc20.js +7 -0
- package/dist/core/abis/erc20.js.map +1 -1
- package/dist/core/abis/fpmm.d.ts +128 -0
- package/dist/core/abis/fpmm.d.ts.map +1 -1
- package/dist/core/abis/fpmm.js +10 -0
- package/dist/core/abis/fpmm.js.map +1 -1
- package/dist/core/abis/hintHelpers.d.ts +2 -0
- package/dist/core/abis/hintHelpers.d.ts.map +1 -0
- package/dist/core/abis/hintHelpers.js +14 -0
- package/dist/core/abis/hintHelpers.js.map +1 -0
- package/dist/core/abis/index.d.ts +12 -0
- package/dist/core/abis/index.d.ts.map +1 -1
- package/dist/core/abis/index.js +12 -0
- package/dist/core/abis/index.js.map +1 -1
- package/dist/core/abis/multiTroveGetter.d.ts +8 -0
- package/dist/core/abis/multiTroveGetter.d.ts.map +1 -0
- package/dist/core/abis/multiTroveGetter.js +15 -0
- package/dist/core/abis/multiTroveGetter.js.map +1 -0
- package/dist/core/abis/priceFeed.d.ts +7 -0
- package/dist/core/abis/priceFeed.d.ts.map +1 -0
- package/dist/core/abis/priceFeed.js +16 -0
- package/dist/core/abis/priceFeed.js.map +1 -0
- package/dist/core/abis/router.d.ts +436 -1
- package/dist/core/abis/router.d.ts.map +1 -1
- package/dist/core/abis/router.js +13 -0
- package/dist/core/abis/router.js.map +1 -1
- package/dist/core/abis/sortedTroves.d.ts +2 -0
- package/dist/core/abis/sortedTroves.d.ts.map +1 -0
- package/dist/core/abis/sortedTroves.js +15 -0
- package/dist/core/abis/sortedTroves.js.map +1 -0
- package/dist/core/abis/systemParams.d.ts +2 -0
- package/dist/core/abis/systemParams.d.ts.map +1 -0
- package/dist/core/abis/systemParams.js +14 -0
- package/dist/core/abis/systemParams.js.map +1 -0
- package/dist/core/abis/troveManager.d.ts +2 -0
- package/dist/core/abis/troveManager.d.ts.map +1 -0
- package/dist/core/abis/troveManager.js +27 -0
- package/dist/core/abis/troveManager.js.map +1 -0
- package/dist/core/abis/troveNFT.d.ts +2 -0
- package/dist/core/abis/troveNFT.d.ts.map +1 -0
- package/dist/core/abis/troveNFT.js +9 -0
- package/dist/core/abis/troveNFT.js.map +1 -0
- package/dist/core/abis/virtualPool.d.ts +40 -0
- package/dist/core/abis/virtualPool.d.ts.map +1 -1
- package/dist/core/abis/virtualPool.js +6 -1
- package/dist/core/abis/virtualPool.js.map +1 -1
- package/dist/core/abis/virtualPoolFactory.d.ts +8 -0
- package/dist/core/abis/virtualPoolFactory.d.ts.map +1 -1
- package/dist/core/abis/virtualPoolFactory.js +1 -0
- package/dist/core/abis/virtualPoolFactory.js.map +1 -1
- package/dist/core/constants/aaveConfig.js +2 -2
- package/dist/core/constants/addresses.d.ts.map +1 -1
- package/dist/core/constants/addresses.js +9 -4
- package/dist/core/constants/addresses.js.map +1 -1
- package/dist/core/constants/borrowConstants.d.ts +10 -0
- package/dist/core/constants/borrowConstants.d.ts.map +1 -0
- package/dist/core/constants/borrowConstants.js +16 -0
- package/dist/core/constants/borrowConstants.js.map +1 -0
- package/dist/core/constants/borrowRegistries.d.ts +7 -0
- package/dist/core/constants/borrowRegistries.d.ts.map +1 -0
- package/dist/core/constants/borrowRegistries.js +31 -0
- package/dist/core/constants/borrowRegistries.js.map +1 -0
- package/dist/core/constants/index.d.ts +2 -0
- package/dist/core/constants/index.d.ts.map +1 -1
- package/dist/core/constants/index.js +2 -0
- package/dist/core/constants/index.js.map +1 -1
- package/dist/core/errors/index.d.ts +1 -0
- package/dist/core/errors/index.d.ts.map +1 -1
- package/dist/core/errors/index.js +1 -0
- package/dist/core/errors/index.js.map +1 -1
- package/dist/core/errors/oracle.d.ts +9 -0
- package/dist/core/errors/oracle.d.ts.map +1 -0
- package/dist/core/errors/oracle.js +15 -0
- package/dist/core/errors/oracle.js.map +1 -0
- package/dist/core/errors/router.d.ts +6 -0
- package/dist/core/errors/router.d.ts.map +1 -1
- package/dist/core/errors/router.js +11 -1
- package/dist/core/errors/router.js.map +1 -1
- package/dist/core/types/borrow.d.ts +87 -0
- package/dist/core/types/borrow.d.ts.map +1 -0
- package/dist/core/types/borrow.js +3 -0
- package/dist/core/types/borrow.js.map +1 -0
- package/dist/core/types/contractAddresses.d.ts +2 -0
- package/dist/core/types/contractAddresses.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +5 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/index.js +5 -1
- package/dist/core/types/index.js.map +1 -1
- package/dist/core/types/liquidity.d.ts +117 -0
- package/dist/core/types/liquidity.d.ts.map +1 -0
- package/dist/core/types/liquidity.js +3 -0
- package/dist/core/types/liquidity.js.map +1 -0
- package/dist/core/types/pool.d.ts +110 -0
- package/dist/core/types/pool.d.ts.map +1 -1
- package/dist/core/types/provider.d.ts.map +1 -1
- package/dist/core/types/provider.js +0 -1
- package/dist/core/types/provider.js.map +1 -1
- package/dist/core/types/route.d.ts +3 -3
- package/dist/core/types/route.d.ts.map +1 -1
- package/dist/core/types/token.d.ts +13 -3
- package/dist/core/types/token.d.ts.map +1 -1
- package/dist/core/types/tradingLimits.d.ts +91 -0
- package/dist/core/types/tradingLimits.d.ts.map +1 -0
- package/dist/core/types/tradingLimits.js +3 -0
- package/dist/core/types/tradingLimits.js.map +1 -0
- package/dist/core/types/tradingMode.d.ts +24 -0
- package/dist/core/types/tradingMode.d.ts.map +1 -0
- package/dist/core/types/tradingMode.js +31 -0
- package/dist/core/types/tradingMode.js.map +1 -0
- package/dist/core/types/transaction.d.ts +45 -0
- package/dist/core/types/transaction.d.ts.map +1 -0
- package/dist/core/types/transaction.js +3 -0
- package/dist/core/types/transaction.js.map +1 -0
- package/dist/index.d.ts +34 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +47 -10
- package/dist/index.js.map +1 -1
- package/dist/services/borrow/BorrowService.d.ts +54 -0
- package/dist/services/borrow/BorrowService.d.ts.map +1 -0
- package/dist/services/borrow/BorrowService.js +129 -0
- package/dist/services/borrow/BorrowService.js.map +1 -0
- package/dist/services/borrow/borrowHelpers.d.ts +4 -0
- package/dist/services/borrow/borrowHelpers.d.ts.map +1 -0
- package/dist/services/borrow/borrowHelpers.js +13 -0
- package/dist/services/borrow/borrowHelpers.js.map +1 -0
- package/dist/services/borrow/borrowMath.d.ts +13 -0
- package/dist/services/borrow/borrowMath.d.ts.map +1 -0
- package/dist/services/borrow/borrowMath.js +129 -0
- package/dist/services/borrow/borrowMath.js.map +1 -0
- package/dist/services/borrow/index.d.ts +2 -0
- package/dist/services/borrow/index.d.ts.map +1 -0
- package/dist/services/borrow/index.js +18 -0
- package/dist/services/borrow/index.js.map +1 -0
- package/dist/services/borrow/internal/borrowApprovalService.d.ts +14 -0
- package/dist/services/borrow/internal/borrowApprovalService.d.ts.map +1 -0
- package/dist/services/borrow/internal/borrowApprovalService.js +53 -0
- package/dist/services/borrow/internal/borrowApprovalService.js.map +1 -0
- package/dist/services/borrow/internal/borrowContextStore.d.ts +11 -0
- package/dist/services/borrow/internal/borrowContextStore.d.ts.map +1 -0
- package/dist/services/borrow/internal/borrowContextStore.js +40 -0
- package/dist/services/borrow/internal/borrowContextStore.js.map +1 -0
- package/dist/services/borrow/internal/borrowErc20.d.ts +5 -0
- package/dist/services/borrow/internal/borrowErc20.d.ts.map +1 -0
- package/dist/services/borrow/internal/borrowErc20.js +43 -0
- package/dist/services/borrow/internal/borrowErc20.js.map +1 -0
- package/dist/services/borrow/internal/borrowHints.d.ts +7 -0
- package/dist/services/borrow/internal/borrowHints.d.ts.map +1 -0
- package/dist/services/borrow/internal/borrowHints.js +31 -0
- package/dist/services/borrow/internal/borrowHints.js.map +1 -0
- package/dist/services/borrow/internal/borrowPositionParser.d.ts +4 -0
- package/dist/services/borrow/internal/borrowPositionParser.d.ts.map +1 -0
- package/dist/services/borrow/internal/borrowPositionParser.js +87 -0
- package/dist/services/borrow/internal/borrowPositionParser.js.map +1 -0
- package/dist/services/borrow/internal/borrowReadService.d.ts +28 -0
- package/dist/services/borrow/internal/borrowReadService.d.ts.map +1 -0
- package/dist/services/borrow/internal/borrowReadService.js +218 -0
- package/dist/services/borrow/internal/borrowReadService.js.map +1 -0
- package/dist/services/borrow/internal/borrowRegistryReader.d.ts +5 -0
- package/dist/services/borrow/internal/borrowRegistryReader.d.ts.map +1 -0
- package/dist/services/borrow/internal/borrowRegistryReader.js +96 -0
- package/dist/services/borrow/internal/borrowRegistryReader.js.map +1 -0
- package/dist/services/borrow/internal/borrowTransactionService.d.ts +23 -0
- package/dist/services/borrow/internal/borrowTransactionService.d.ts.map +1 -0
- package/dist/services/borrow/internal/borrowTransactionService.js +276 -0
- package/dist/services/borrow/internal/borrowTransactionService.js.map +1 -0
- package/dist/services/borrow/internal/borrowTypes.d.ts +15 -0
- package/dist/services/borrow/internal/borrowTypes.d.ts.map +1 -0
- package/dist/services/borrow/internal/borrowTypes.js +3 -0
- package/dist/services/borrow/internal/borrowTypes.js.map +1 -0
- package/dist/services/borrow/internal/borrowValidation.d.ts +13 -0
- package/dist/services/borrow/internal/borrowValidation.d.ts.map +1 -0
- package/dist/services/borrow/internal/borrowValidation.js +96 -0
- package/dist/services/borrow/internal/borrowValidation.js.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/liquidity/LiquidityService.d.ts +154 -0
- package/dist/services/liquidity/LiquidityService.d.ts.map +1 -0
- package/dist/services/liquidity/LiquidityService.js +184 -0
- package/dist/services/liquidity/LiquidityService.js.map +1 -0
- package/dist/services/liquidity/basicLiquidity.d.ts +11 -0
- package/dist/services/liquidity/basicLiquidity.d.ts.map +1 -0
- package/dist/services/liquidity/basicLiquidity.js +172 -0
- package/dist/services/liquidity/basicLiquidity.js.map +1 -0
- package/dist/services/liquidity/index.d.ts +2 -0
- package/dist/services/liquidity/index.d.ts.map +1 -0
- package/dist/services/liquidity/index.js +18 -0
- package/dist/services/liquidity/index.js.map +1 -0
- package/dist/services/liquidity/liquidityHelpers.d.ts +13 -0
- package/dist/services/liquidity/liquidityHelpers.d.ts.map +1 -0
- package/dist/services/liquidity/liquidityHelpers.js +74 -0
- package/dist/services/liquidity/liquidityHelpers.js.map +1 -0
- package/dist/services/liquidity/zapHelpers.d.ts +66 -0
- package/dist/services/liquidity/zapHelpers.d.ts.map +1 -0
- package/dist/services/liquidity/zapHelpers.js +133 -0
- package/dist/services/liquidity/zapHelpers.js.map +1 -0
- package/dist/services/liquidity/zapIn.d.ts +17 -0
- package/dist/services/liquidity/zapIn.d.ts.map +1 -0
- package/dist/services/liquidity/zapIn.js +125 -0
- package/dist/services/liquidity/zapIn.js.map +1 -0
- package/dist/services/liquidity/zapOut.d.ts +17 -0
- package/dist/services/liquidity/zapOut.d.ts.map +1 -0
- package/dist/services/liquidity/zapOut.js +242 -0
- package/dist/services/liquidity/zapOut.js.map +1 -0
- package/dist/services/pools/PoolService.d.ts +35 -10
- package/dist/services/pools/PoolService.d.ts.map +1 -1
- package/dist/services/pools/PoolService.js +61 -109
- package/dist/services/pools/PoolService.js.map +1 -1
- package/dist/services/pools/poolDetails.d.ts +11 -0
- package/dist/services/pools/poolDetails.d.ts.map +1 -0
- package/dist/services/pools/poolDetails.js +145 -0
- package/dist/services/pools/poolDetails.js.map +1 -0
- package/dist/services/pools/poolDiscovery.d.ts +12 -0
- package/dist/services/pools/poolDiscovery.d.ts.map +1 -0
- package/dist/services/pools/poolDiscovery.js +114 -0
- package/dist/services/pools/poolDiscovery.js.map +1 -0
- package/dist/services/quotes/QuoteService.d.ts +21 -12
- package/dist/services/quotes/QuoteService.d.ts.map +1 -1
- package/dist/services/quotes/QuoteService.js +41 -17
- package/dist/services/quotes/QuoteService.js.map +1 -1
- package/dist/services/routes/RouteService.d.ts +3 -3
- package/dist/services/routes/RouteService.d.ts.map +1 -1
- package/dist/services/routes/RouteService.js +3 -5
- package/dist/services/routes/RouteService.js.map +1 -1
- package/dist/services/swap/SwapService.d.ts +23 -19
- package/dist/services/swap/SwapService.d.ts.map +1 -1
- package/dist/services/swap/SwapService.js +36 -15
- package/dist/services/swap/SwapService.js.map +1 -1
- package/dist/services/tokens/supplyAdjustmentService.d.ts +0 -4
- package/dist/services/tokens/supplyAdjustmentService.d.ts.map +1 -1
- package/dist/services/tokens/supplyAdjustmentService.js +3 -8
- package/dist/services/tokens/supplyAdjustmentService.js.map +1 -1
- package/dist/services/tokens/tokenService.d.ts.map +1 -1
- package/dist/services/tokens/tokenService.js +2 -2
- package/dist/services/tokens/tokenService.js.map +1 -1
- package/dist/services/trading/TradingLimitsService.d.ts +38 -0
- package/dist/services/trading/TradingLimitsService.d.ts.map +1 -0
- package/dist/services/trading/TradingLimitsService.js +157 -0
- package/dist/services/trading/TradingLimitsService.js.map +1 -0
- package/dist/services/trading/TradingService.d.ts +110 -0
- package/dist/services/trading/TradingService.d.ts.map +1 -0
- package/dist/services/trading/TradingService.js +162 -0
- package/dist/services/trading/TradingService.js.map +1 -0
- package/dist/services/trading/index.d.ts +3 -0
- package/dist/services/trading/index.d.ts.map +1 -0
- package/dist/services/trading/index.js +19 -0
- package/dist/services/trading/index.js.map +1 -0
- package/dist/utils/costUtils.js +4 -4
- package/dist/utils/costUtils.js.map +1 -1
- package/dist/utils/deadline.d.ts +21 -0
- package/dist/utils/deadline.d.ts.map +1 -0
- package/dist/utils/deadline.js +26 -0
- package/dist/utils/deadline.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/pathEncoder.d.ts +8 -2
- package/dist/utils/pathEncoder.d.ts.map +1 -1
- package/dist/utils/pathEncoder.js +19 -3
- package/dist/utils/pathEncoder.js.map +1 -1
- package/dist/utils/rateFeed.d.ts +18 -0
- package/dist/utils/rateFeed.d.ts.map +1 -0
- package/dist/utils/rateFeed.js +27 -0
- package/dist/utils/rateFeed.js.map +1 -0
- package/dist/utils/routeUtils.d.ts +53 -53
- package/dist/utils/routeUtils.d.ts.map +1 -1
- package/dist/utils/routeUtils.js +41 -41
- package/dist/utils/routeUtils.js.map +1 -1
- package/dist/utils/routes.d.ts +2 -8
- package/dist/utils/routes.d.ts.map +1 -1
- package/dist/utils/routes.js +5 -46
- package/dist/utils/routes.js.map +1 -1
- package/dist/utils/tokens.d.ts +1 -77
- package/dist/utils/tokens.d.ts.map +1 -1
- package/dist/utils/tokens.js +10 -178
- package/dist/utils/tokens.js.map +1 -1
- package/dist/utils/tradingLimits.d.ts +41 -0
- package/dist/utils/tradingLimits.d.ts.map +1 -0
- package/dist/utils/tradingLimits.js +171 -0
- package/dist/utils/tradingLimits.js.map +1 -0
- package/dist/utils/validation.d.ts +19 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +34 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +3 -1
- package/dist/cache/routes.11142220.js +0 -1
- package/dist/cache/routes.42220.d.ts +0 -3
- package/dist/cache/routes.42220.d.ts.map +0 -1
- package/dist/cache/routes.42220.js +0 -112
- package/dist/cache/routes.42220.js.map +0 -1
- package/dist/cache/tokens.11142220.d.ts +0 -3
- package/dist/cache/tokens.11142220.d.ts.map +0 -1
- package/dist/cache/tokens.11142220.js +0 -129
- package/dist/cache/tokens.11142220.js.map +0 -1
- package/dist/cache/tokens.42220.d.ts +0 -3
- package/dist/cache/tokens.42220.d.ts.map +0 -1
- package/dist/cache/tokens.42220.js +0 -129
- package/dist/cache/tokens.42220.js.map +0 -1
|
@@ -1,2 +1,437 @@
|
|
|
1
|
-
export declare const ROUTER_ABI:
|
|
1
|
+
export declare const ROUTER_ABI: readonly [{
|
|
2
|
+
readonly name: "getAmountsOut";
|
|
3
|
+
readonly type: "function";
|
|
4
|
+
readonly stateMutability: "view";
|
|
5
|
+
readonly inputs: readonly [{
|
|
6
|
+
readonly type: "uint256";
|
|
7
|
+
readonly name: "amountIn";
|
|
8
|
+
}, {
|
|
9
|
+
readonly type: "tuple[]";
|
|
10
|
+
readonly components: readonly [{
|
|
11
|
+
readonly type: "address";
|
|
12
|
+
readonly name: "from";
|
|
13
|
+
}, {
|
|
14
|
+
readonly type: "address";
|
|
15
|
+
readonly name: "to";
|
|
16
|
+
}, {
|
|
17
|
+
readonly type: "address";
|
|
18
|
+
readonly name: "factory";
|
|
19
|
+
}];
|
|
20
|
+
readonly name: "routes";
|
|
21
|
+
}];
|
|
22
|
+
readonly outputs: readonly [{
|
|
23
|
+
readonly type: "uint256[]";
|
|
24
|
+
readonly name: "amounts";
|
|
25
|
+
}];
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "swapExactTokensForTokens";
|
|
28
|
+
readonly type: "function";
|
|
29
|
+
readonly stateMutability: "nonpayable";
|
|
30
|
+
readonly inputs: readonly [{
|
|
31
|
+
readonly type: "uint256";
|
|
32
|
+
readonly name: "amountIn";
|
|
33
|
+
}, {
|
|
34
|
+
readonly type: "uint256";
|
|
35
|
+
readonly name: "amountOutMin";
|
|
36
|
+
}, {
|
|
37
|
+
readonly type: "tuple[]";
|
|
38
|
+
readonly components: readonly [{
|
|
39
|
+
readonly type: "address";
|
|
40
|
+
readonly name: "from";
|
|
41
|
+
}, {
|
|
42
|
+
readonly type: "address";
|
|
43
|
+
readonly name: "to";
|
|
44
|
+
}, {
|
|
45
|
+
readonly type: "address";
|
|
46
|
+
readonly name: "factory";
|
|
47
|
+
}];
|
|
48
|
+
readonly name: "routes";
|
|
49
|
+
}, {
|
|
50
|
+
readonly type: "address";
|
|
51
|
+
readonly name: "to";
|
|
52
|
+
}, {
|
|
53
|
+
readonly type: "uint256";
|
|
54
|
+
readonly name: "deadline";
|
|
55
|
+
}];
|
|
56
|
+
readonly outputs: readonly [{
|
|
57
|
+
readonly type: "uint256[]";
|
|
58
|
+
readonly name: "amounts";
|
|
59
|
+
}];
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "addLiquidity";
|
|
62
|
+
readonly type: "function";
|
|
63
|
+
readonly stateMutability: "nonpayable";
|
|
64
|
+
readonly inputs: readonly [{
|
|
65
|
+
readonly type: "address";
|
|
66
|
+
readonly name: "tokenA";
|
|
67
|
+
}, {
|
|
68
|
+
readonly type: "address";
|
|
69
|
+
readonly name: "tokenB";
|
|
70
|
+
}, {
|
|
71
|
+
readonly type: "uint256";
|
|
72
|
+
readonly name: "amountADesired";
|
|
73
|
+
}, {
|
|
74
|
+
readonly type: "uint256";
|
|
75
|
+
readonly name: "amountBDesired";
|
|
76
|
+
}, {
|
|
77
|
+
readonly type: "uint256";
|
|
78
|
+
readonly name: "amountAMin";
|
|
79
|
+
}, {
|
|
80
|
+
readonly type: "uint256";
|
|
81
|
+
readonly name: "amountBMin";
|
|
82
|
+
}, {
|
|
83
|
+
readonly type: "address";
|
|
84
|
+
readonly name: "to";
|
|
85
|
+
}, {
|
|
86
|
+
readonly type: "uint256";
|
|
87
|
+
readonly name: "deadline";
|
|
88
|
+
}];
|
|
89
|
+
readonly outputs: readonly [{
|
|
90
|
+
readonly type: "uint256";
|
|
91
|
+
readonly name: "amountA";
|
|
92
|
+
}, {
|
|
93
|
+
readonly type: "uint256";
|
|
94
|
+
readonly name: "amountB";
|
|
95
|
+
}, {
|
|
96
|
+
readonly type: "uint256";
|
|
97
|
+
readonly name: "liquidity";
|
|
98
|
+
}];
|
|
99
|
+
}, {
|
|
100
|
+
readonly name: "removeLiquidity";
|
|
101
|
+
readonly type: "function";
|
|
102
|
+
readonly stateMutability: "nonpayable";
|
|
103
|
+
readonly inputs: readonly [{
|
|
104
|
+
readonly type: "address";
|
|
105
|
+
readonly name: "tokenA";
|
|
106
|
+
}, {
|
|
107
|
+
readonly type: "address";
|
|
108
|
+
readonly name: "tokenB";
|
|
109
|
+
}, {
|
|
110
|
+
readonly type: "uint256";
|
|
111
|
+
readonly name: "liquidity";
|
|
112
|
+
}, {
|
|
113
|
+
readonly type: "uint256";
|
|
114
|
+
readonly name: "amountAMin";
|
|
115
|
+
}, {
|
|
116
|
+
readonly type: "uint256";
|
|
117
|
+
readonly name: "amountBMin";
|
|
118
|
+
}, {
|
|
119
|
+
readonly type: "address";
|
|
120
|
+
readonly name: "to";
|
|
121
|
+
}, {
|
|
122
|
+
readonly type: "uint256";
|
|
123
|
+
readonly name: "deadline";
|
|
124
|
+
}];
|
|
125
|
+
readonly outputs: readonly [{
|
|
126
|
+
readonly type: "uint256";
|
|
127
|
+
readonly name: "amountA";
|
|
128
|
+
}, {
|
|
129
|
+
readonly type: "uint256";
|
|
130
|
+
readonly name: "amountB";
|
|
131
|
+
}];
|
|
132
|
+
}, {
|
|
133
|
+
readonly name: "quoteAddLiquidity";
|
|
134
|
+
readonly type: "function";
|
|
135
|
+
readonly stateMutability: "view";
|
|
136
|
+
readonly inputs: readonly [{
|
|
137
|
+
readonly type: "address";
|
|
138
|
+
readonly name: "tokenA";
|
|
139
|
+
}, {
|
|
140
|
+
readonly type: "address";
|
|
141
|
+
readonly name: "tokenB";
|
|
142
|
+
}, {
|
|
143
|
+
readonly type: "address";
|
|
144
|
+
readonly name: "_factory";
|
|
145
|
+
}, {
|
|
146
|
+
readonly type: "uint256";
|
|
147
|
+
readonly name: "amountADesired";
|
|
148
|
+
}, {
|
|
149
|
+
readonly type: "uint256";
|
|
150
|
+
readonly name: "amountBDesired";
|
|
151
|
+
}];
|
|
152
|
+
readonly outputs: readonly [{
|
|
153
|
+
readonly type: "uint256";
|
|
154
|
+
readonly name: "amountA";
|
|
155
|
+
}, {
|
|
156
|
+
readonly type: "uint256";
|
|
157
|
+
readonly name: "amountB";
|
|
158
|
+
}, {
|
|
159
|
+
readonly type: "uint256";
|
|
160
|
+
readonly name: "liquidity";
|
|
161
|
+
}];
|
|
162
|
+
}, {
|
|
163
|
+
readonly name: "quoteRemoveLiquidity";
|
|
164
|
+
readonly type: "function";
|
|
165
|
+
readonly stateMutability: "view";
|
|
166
|
+
readonly inputs: readonly [{
|
|
167
|
+
readonly type: "address";
|
|
168
|
+
readonly name: "tokenA";
|
|
169
|
+
}, {
|
|
170
|
+
readonly type: "address";
|
|
171
|
+
readonly name: "tokenB";
|
|
172
|
+
}, {
|
|
173
|
+
readonly type: "address";
|
|
174
|
+
readonly name: "_factory";
|
|
175
|
+
}, {
|
|
176
|
+
readonly type: "uint256";
|
|
177
|
+
readonly name: "liquidity";
|
|
178
|
+
}];
|
|
179
|
+
readonly outputs: readonly [{
|
|
180
|
+
readonly type: "uint256";
|
|
181
|
+
readonly name: "amountA";
|
|
182
|
+
}, {
|
|
183
|
+
readonly type: "uint256";
|
|
184
|
+
readonly name: "amountB";
|
|
185
|
+
}];
|
|
186
|
+
}, {
|
|
187
|
+
readonly name: "zapIn";
|
|
188
|
+
readonly type: "function";
|
|
189
|
+
readonly stateMutability: "payable";
|
|
190
|
+
readonly inputs: readonly [{
|
|
191
|
+
readonly type: "address";
|
|
192
|
+
readonly name: "tokenIn";
|
|
193
|
+
}, {
|
|
194
|
+
readonly type: "uint256";
|
|
195
|
+
readonly name: "amountInA";
|
|
196
|
+
}, {
|
|
197
|
+
readonly type: "uint256";
|
|
198
|
+
readonly name: "amountInB";
|
|
199
|
+
}, {
|
|
200
|
+
readonly type: "tuple";
|
|
201
|
+
readonly components: readonly [{
|
|
202
|
+
readonly type: "address";
|
|
203
|
+
readonly name: "tokenA";
|
|
204
|
+
}, {
|
|
205
|
+
readonly type: "address";
|
|
206
|
+
readonly name: "tokenB";
|
|
207
|
+
}, {
|
|
208
|
+
readonly type: "address";
|
|
209
|
+
readonly name: "factory";
|
|
210
|
+
}, {
|
|
211
|
+
readonly type: "uint256";
|
|
212
|
+
readonly name: "amountOutMinA";
|
|
213
|
+
}, {
|
|
214
|
+
readonly type: "uint256";
|
|
215
|
+
readonly name: "amountOutMinB";
|
|
216
|
+
}, {
|
|
217
|
+
readonly type: "uint256";
|
|
218
|
+
readonly name: "amountAMin";
|
|
219
|
+
}, {
|
|
220
|
+
readonly type: "uint256";
|
|
221
|
+
readonly name: "amountBMin";
|
|
222
|
+
}];
|
|
223
|
+
readonly name: "zapInPool";
|
|
224
|
+
}, {
|
|
225
|
+
readonly type: "tuple[]";
|
|
226
|
+
readonly components: readonly [{
|
|
227
|
+
readonly type: "address";
|
|
228
|
+
readonly name: "from";
|
|
229
|
+
}, {
|
|
230
|
+
readonly type: "address";
|
|
231
|
+
readonly name: "to";
|
|
232
|
+
}, {
|
|
233
|
+
readonly type: "address";
|
|
234
|
+
readonly name: "factory";
|
|
235
|
+
}];
|
|
236
|
+
readonly name: "routesA";
|
|
237
|
+
}, {
|
|
238
|
+
readonly type: "tuple[]";
|
|
239
|
+
readonly components: readonly [{
|
|
240
|
+
readonly type: "address";
|
|
241
|
+
readonly name: "from";
|
|
242
|
+
}, {
|
|
243
|
+
readonly type: "address";
|
|
244
|
+
readonly name: "to";
|
|
245
|
+
}, {
|
|
246
|
+
readonly type: "address";
|
|
247
|
+
readonly name: "factory";
|
|
248
|
+
}];
|
|
249
|
+
readonly name: "routesB";
|
|
250
|
+
}, {
|
|
251
|
+
readonly type: "address";
|
|
252
|
+
readonly name: "to";
|
|
253
|
+
}];
|
|
254
|
+
readonly outputs: readonly [{
|
|
255
|
+
readonly type: "uint256";
|
|
256
|
+
readonly name: "liquidity";
|
|
257
|
+
}];
|
|
258
|
+
}, {
|
|
259
|
+
readonly name: "zapOut";
|
|
260
|
+
readonly type: "function";
|
|
261
|
+
readonly stateMutability: "nonpayable";
|
|
262
|
+
readonly inputs: readonly [{
|
|
263
|
+
readonly type: "address";
|
|
264
|
+
readonly name: "tokenOut";
|
|
265
|
+
}, {
|
|
266
|
+
readonly type: "uint256";
|
|
267
|
+
readonly name: "liquidity";
|
|
268
|
+
}, {
|
|
269
|
+
readonly type: "tuple";
|
|
270
|
+
readonly components: readonly [{
|
|
271
|
+
readonly type: "address";
|
|
272
|
+
readonly name: "tokenA";
|
|
273
|
+
}, {
|
|
274
|
+
readonly type: "address";
|
|
275
|
+
readonly name: "tokenB";
|
|
276
|
+
}, {
|
|
277
|
+
readonly type: "address";
|
|
278
|
+
readonly name: "factory";
|
|
279
|
+
}, {
|
|
280
|
+
readonly type: "uint256";
|
|
281
|
+
readonly name: "amountOutMinA";
|
|
282
|
+
}, {
|
|
283
|
+
readonly type: "uint256";
|
|
284
|
+
readonly name: "amountOutMinB";
|
|
285
|
+
}, {
|
|
286
|
+
readonly type: "uint256";
|
|
287
|
+
readonly name: "amountAMin";
|
|
288
|
+
}, {
|
|
289
|
+
readonly type: "uint256";
|
|
290
|
+
readonly name: "amountBMin";
|
|
291
|
+
}];
|
|
292
|
+
readonly name: "zapOutPool";
|
|
293
|
+
}, {
|
|
294
|
+
readonly type: "tuple[]";
|
|
295
|
+
readonly components: readonly [{
|
|
296
|
+
readonly type: "address";
|
|
297
|
+
readonly name: "from";
|
|
298
|
+
}, {
|
|
299
|
+
readonly type: "address";
|
|
300
|
+
readonly name: "to";
|
|
301
|
+
}, {
|
|
302
|
+
readonly type: "address";
|
|
303
|
+
readonly name: "factory";
|
|
304
|
+
}];
|
|
305
|
+
readonly name: "routesA";
|
|
306
|
+
}, {
|
|
307
|
+
readonly type: "tuple[]";
|
|
308
|
+
readonly components: readonly [{
|
|
309
|
+
readonly type: "address";
|
|
310
|
+
readonly name: "from";
|
|
311
|
+
}, {
|
|
312
|
+
readonly type: "address";
|
|
313
|
+
readonly name: "to";
|
|
314
|
+
}, {
|
|
315
|
+
readonly type: "address";
|
|
316
|
+
readonly name: "factory";
|
|
317
|
+
}];
|
|
318
|
+
readonly name: "routesB";
|
|
319
|
+
}];
|
|
320
|
+
readonly outputs: readonly [];
|
|
321
|
+
}, {
|
|
322
|
+
readonly name: "generateZapInParams";
|
|
323
|
+
readonly type: "function";
|
|
324
|
+
readonly stateMutability: "view";
|
|
325
|
+
readonly inputs: readonly [{
|
|
326
|
+
readonly type: "address";
|
|
327
|
+
readonly name: "tokenA";
|
|
328
|
+
}, {
|
|
329
|
+
readonly type: "address";
|
|
330
|
+
readonly name: "tokenB";
|
|
331
|
+
}, {
|
|
332
|
+
readonly type: "address";
|
|
333
|
+
readonly name: "_factory";
|
|
334
|
+
}, {
|
|
335
|
+
readonly type: "uint256";
|
|
336
|
+
readonly name: "amountInA";
|
|
337
|
+
}, {
|
|
338
|
+
readonly type: "uint256";
|
|
339
|
+
readonly name: "amountInB";
|
|
340
|
+
}, {
|
|
341
|
+
readonly type: "tuple[]";
|
|
342
|
+
readonly components: readonly [{
|
|
343
|
+
readonly type: "address";
|
|
344
|
+
readonly name: "from";
|
|
345
|
+
}, {
|
|
346
|
+
readonly type: "address";
|
|
347
|
+
readonly name: "to";
|
|
348
|
+
}, {
|
|
349
|
+
readonly type: "address";
|
|
350
|
+
readonly name: "factory";
|
|
351
|
+
}];
|
|
352
|
+
readonly name: "routesA";
|
|
353
|
+
}, {
|
|
354
|
+
readonly type: "tuple[]";
|
|
355
|
+
readonly components: readonly [{
|
|
356
|
+
readonly type: "address";
|
|
357
|
+
readonly name: "from";
|
|
358
|
+
}, {
|
|
359
|
+
readonly type: "address";
|
|
360
|
+
readonly name: "to";
|
|
361
|
+
}, {
|
|
362
|
+
readonly type: "address";
|
|
363
|
+
readonly name: "factory";
|
|
364
|
+
}];
|
|
365
|
+
readonly name: "routesB";
|
|
366
|
+
}];
|
|
367
|
+
readonly outputs: readonly [{
|
|
368
|
+
readonly type: "uint256";
|
|
369
|
+
readonly name: "amountOutMinA";
|
|
370
|
+
}, {
|
|
371
|
+
readonly type: "uint256";
|
|
372
|
+
readonly name: "amountOutMinB";
|
|
373
|
+
}, {
|
|
374
|
+
readonly type: "uint256";
|
|
375
|
+
readonly name: "amountAMin";
|
|
376
|
+
}, {
|
|
377
|
+
readonly type: "uint256";
|
|
378
|
+
readonly name: "amountBMin";
|
|
379
|
+
}];
|
|
380
|
+
}, {
|
|
381
|
+
readonly name: "generateZapOutParams";
|
|
382
|
+
readonly type: "function";
|
|
383
|
+
readonly stateMutability: "view";
|
|
384
|
+
readonly inputs: readonly [{
|
|
385
|
+
readonly type: "address";
|
|
386
|
+
readonly name: "tokenA";
|
|
387
|
+
}, {
|
|
388
|
+
readonly type: "address";
|
|
389
|
+
readonly name: "tokenB";
|
|
390
|
+
}, {
|
|
391
|
+
readonly type: "address";
|
|
392
|
+
readonly name: "_factory";
|
|
393
|
+
}, {
|
|
394
|
+
readonly type: "uint256";
|
|
395
|
+
readonly name: "liquidity";
|
|
396
|
+
}, {
|
|
397
|
+
readonly type: "tuple[]";
|
|
398
|
+
readonly components: readonly [{
|
|
399
|
+
readonly type: "address";
|
|
400
|
+
readonly name: "from";
|
|
401
|
+
}, {
|
|
402
|
+
readonly type: "address";
|
|
403
|
+
readonly name: "to";
|
|
404
|
+
}, {
|
|
405
|
+
readonly type: "address";
|
|
406
|
+
readonly name: "factory";
|
|
407
|
+
}];
|
|
408
|
+
readonly name: "routesA";
|
|
409
|
+
}, {
|
|
410
|
+
readonly type: "tuple[]";
|
|
411
|
+
readonly components: readonly [{
|
|
412
|
+
readonly type: "address";
|
|
413
|
+
readonly name: "from";
|
|
414
|
+
}, {
|
|
415
|
+
readonly type: "address";
|
|
416
|
+
readonly name: "to";
|
|
417
|
+
}, {
|
|
418
|
+
readonly type: "address";
|
|
419
|
+
readonly name: "factory";
|
|
420
|
+
}];
|
|
421
|
+
readonly name: "routesB";
|
|
422
|
+
}];
|
|
423
|
+
readonly outputs: readonly [{
|
|
424
|
+
readonly type: "uint256";
|
|
425
|
+
readonly name: "amountOutMinA";
|
|
426
|
+
}, {
|
|
427
|
+
readonly type: "uint256";
|
|
428
|
+
readonly name: "amountOutMinB";
|
|
429
|
+
}, {
|
|
430
|
+
readonly type: "uint256";
|
|
431
|
+
readonly name: "amountAMin";
|
|
432
|
+
}, {
|
|
433
|
+
readonly type: "uint256";
|
|
434
|
+
readonly name: "amountBMin";
|
|
435
|
+
}];
|
|
436
|
+
}];
|
|
2
437
|
//# sourceMappingURL=router.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../src/core/abis/router.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../src/core/abis/router.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBrB,CAAA"}
|
package/dist/core/abis/router.js
CHANGED
|
@@ -3,8 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ROUTER_ABI = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
exports.ROUTER_ABI = (0, viem_1.parseAbi)([
|
|
6
|
+
// Swap operations
|
|
6
7
|
'function getAmountsOut(uint256 amountIn, Route[] memory routes) view returns (uint256[] memory amounts)',
|
|
7
8
|
'function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, Route[] calldata routes, address to, uint256 deadline) returns (uint256[] memory amounts)',
|
|
9
|
+
// Basic liquidity operations
|
|
10
|
+
'function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns (uint256 amountA, uint256 amountB, uint256 liquidity)',
|
|
11
|
+
'function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns (uint256 amountA, uint256 amountB)',
|
|
12
|
+
'function quoteAddLiquidity(address tokenA, address tokenB, address _factory, uint256 amountADesired, uint256 amountBDesired) view returns (uint256 amountA, uint256 amountB, uint256 liquidity)',
|
|
13
|
+
'function quoteRemoveLiquidity(address tokenA, address tokenB, address _factory, uint256 liquidity) view returns (uint256 amountA, uint256 amountB)',
|
|
14
|
+
// Zap operations
|
|
15
|
+
'function zapIn(address tokenIn, uint256 amountInA, uint256 amountInB, Zap calldata zapInPool, Route[] calldata routesA, Route[] calldata routesB, address to) payable returns (uint256 liquidity)',
|
|
16
|
+
'function zapOut(address tokenOut, uint256 liquidity, Zap calldata zapOutPool, Route[] calldata routesA, Route[] calldata routesB)',
|
|
17
|
+
'function generateZapInParams(address tokenA, address tokenB, address _factory, uint256 amountInA, uint256 amountInB, Route[] calldata routesA, Route[] calldata routesB) view returns (uint256 amountOutMinA, uint256 amountOutMinB, uint256 amountAMin, uint256 amountBMin)',
|
|
18
|
+
'function generateZapOutParams(address tokenA, address tokenB, address _factory, uint256 liquidity, Route[] calldata routesA, Route[] calldata routesB) view returns (uint256 amountOutMinA, uint256 amountOutMinB, uint256 amountAMin, uint256 amountBMin)',
|
|
19
|
+
// Structs
|
|
8
20
|
'struct Route { address from; address to; address factory; }',
|
|
21
|
+
'struct Zap { address tokenA; address tokenB; address factory; uint256 amountOutMinA; uint256 amountOutMinB; uint256 amountAMin; uint256 amountBMin; }',
|
|
9
22
|
]);
|
|
10
23
|
//# sourceMappingURL=router.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../../src/core/abis/router.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAElB,QAAA,UAAU,GAAG,IAAA,eAAQ,EAAC;IACjC,yGAAyG;IACzG,qKAAqK;
|
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../../src/core/abis/router.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAElB,QAAA,UAAU,GAAG,IAAA,eAAQ,EAAC;IACjC,kBAAkB;IAClB,yGAAyG;IACzG,qKAAqK;IAErK,6BAA6B;IAC7B,2OAA2O;IAC3O,8LAA8L;IAC9L,iMAAiM;IACjM,oJAAoJ;IAEpJ,iBAAiB;IACjB,mMAAmM;IACnM,mIAAmI;IACnI,8QAA8Q;IAC9Q,4PAA4P;IAE5P,UAAU;IACV,6DAA6D;IAC7D,uJAAuJ;CACxJ,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortedTroves.d.ts","sourceRoot":"","sources":["../../../src/core/abis/sortedTroves.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,EASxB,GAAG,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SORTED_TROVES_ABI = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
exports.SORTED_TROVES_ABI = (0, viem_1.parseAbi)([
|
|
6
|
+
'function findInsertPosition(uint256 _annualInterestRate, uint256 _prevId, uint256 _nextId) view returns (uint256, uint256)',
|
|
7
|
+
'function getSize() view returns (uint256)',
|
|
8
|
+
'function getFirst() view returns (uint256)',
|
|
9
|
+
'function getLast() view returns (uint256)',
|
|
10
|
+
'function getNext(uint256 _id) view returns (uint256)',
|
|
11
|
+
'function getPrev(uint256 _id) view returns (uint256)',
|
|
12
|
+
'function contains(uint256 _id) view returns (bool)',
|
|
13
|
+
'function isEmpty() view returns (bool)',
|
|
14
|
+
]);
|
|
15
|
+
//# sourceMappingURL=sortedTroves.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortedTroves.js","sourceRoot":"","sources":["../../../src/core/abis/sortedTroves.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAElB,QAAA,iBAAiB,GAAG,IAAA,eAAQ,EAAC;IACxC,4HAA4H;IAC5H,2CAA2C;IAC3C,4CAA4C;IAC5C,2CAA2C;IAC3C,sDAAsD;IACtD,sDAAsD;IACtD,oDAAoD;IACpD,wCAAwC;CACzC,CAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systemParams.d.ts","sourceRoot":"","sources":["../../../src/core/abis/systemParams.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,EAQxB,GAAG,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SYSTEM_PARAMS_ABI = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
exports.SYSTEM_PARAMS_ABI = (0, viem_1.parseAbi)([
|
|
6
|
+
'function CCR() view returns (uint256)',
|
|
7
|
+
'function MCR() view returns (uint256)',
|
|
8
|
+
'function SCR() view returns (uint256)',
|
|
9
|
+
'function BCR() view returns (uint256)',
|
|
10
|
+
'function MIN_DEBT() view returns (uint256)',
|
|
11
|
+
'function ETH_GAS_COMPENSATION() view returns (uint256)',
|
|
12
|
+
'function MIN_ANNUAL_INTEREST_RATE() view returns (uint256)',
|
|
13
|
+
]);
|
|
14
|
+
//# sourceMappingURL=systemParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systemParams.js","sourceRoot":"","sources":["../../../src/core/abis/systemParams.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAElB,QAAA,iBAAiB,GAAG,IAAA,eAAQ,EAAC;IACxC,uCAAuC;IACvC,uCAAuC;IACvC,uCAAuC;IACvC,uCAAuC;IACvC,4CAA4C;IAC5C,wDAAwD;IACxD,4DAA4D;CAC7D,CAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"troveManager.d.ts","sourceRoot":"","sources":["../../../src/core/abis/troveManager.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,EAsBxB,GAAG,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TROVE_MANAGER_ABI = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
exports.TROVE_MANAGER_ABI = (0, viem_1.parseAbi)([
|
|
6
|
+
'function getLatestTroveData(uint256 _troveId) view returns ((uint256 entireDebt, uint256 entireColl, uint256 redistBoldDebtGain, uint256 redistCollGain, uint256 accruedInterest, uint256 recordedDebt, uint256 annualInterestRate, uint256 weightedRecordedDebt, uint256 accruedBatchManagementFee, uint256 lastInterestRateAdjTime))',
|
|
7
|
+
'function getTroveStatus(uint256 _troveId) view returns (uint8)',
|
|
8
|
+
'function getTroveAnnualInterestRate(uint256 _troveId) view returns (uint256)',
|
|
9
|
+
'function Troves(uint256 _id) view returns (uint256 debt, uint256 coll, uint256 stake, uint8 status, uint64 arrayIndex, uint64 lastDebtUpdateTime, uint64 lastInterestRateAdjTime, uint256 annualInterestRate, address interestBatchManager, uint256 batchDebtShares)',
|
|
10
|
+
'function getCurrentICR(uint256 _troveId, uint256 _price) view returns (uint256)',
|
|
11
|
+
'function getTroveIdsCount() view returns (uint256)',
|
|
12
|
+
'function getTroveFromTroveIdsArray(uint256 _index) view returns (uint256)',
|
|
13
|
+
'function shutdownTime() view returns (uint256)',
|
|
14
|
+
// Custom errors
|
|
15
|
+
'error EmptyData()',
|
|
16
|
+
'error NothingToLiquidate()',
|
|
17
|
+
'error CallerNotBorrowerOperations()',
|
|
18
|
+
'error CallerNotCollateralRegistry()',
|
|
19
|
+
'error OnlyOneTroveLeft()',
|
|
20
|
+
'error NotShutDown()',
|
|
21
|
+
'error ZeroAmount()',
|
|
22
|
+
'error NotEnoughBoldBalance()',
|
|
23
|
+
'error MinCollNotReached(uint256 _coll)',
|
|
24
|
+
'error BatchSharesRatioTooHigh()',
|
|
25
|
+
'error L2SequencerDown()',
|
|
26
|
+
]);
|
|
27
|
+
//# sourceMappingURL=troveManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"troveManager.js","sourceRoot":"","sources":["../../../src/core/abis/troveManager.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAElB,QAAA,iBAAiB,GAAG,IAAA,eAAQ,EAAC;IACxC,wUAAwU;IACxU,gEAAgE;IAChE,8EAA8E;IAC9E,sQAAsQ;IACtQ,iFAAiF;IACjF,oDAAoD;IACpD,2EAA2E;IAC3E,gDAAgD;IAEhD,gBAAgB;IAChB,mBAAmB;IACnB,4BAA4B;IAC5B,qCAAqC;IACrC,qCAAqC;IACrC,0BAA0B;IAC1B,qBAAqB;IACrB,oBAAoB;IACpB,8BAA8B;IAC9B,wCAAwC;IACxC,iCAAiC;IACjC,yBAAyB;CAC1B,CAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"troveNFT.d.ts","sourceRoot":"","sources":["../../../src/core/abis/troveNFT.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAGpB,GAAG,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TROVE_NFT_ABI = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
exports.TROVE_NFT_ABI = (0, viem_1.parseAbi)([
|
|
6
|
+
'function balanceOf(address owner) view returns (uint256)',
|
|
7
|
+
'function ownerOf(uint256 tokenId) view returns (address)',
|
|
8
|
+
]);
|
|
9
|
+
//# sourceMappingURL=troveNFT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"troveNFT.js","sourceRoot":"","sources":["../../../src/core/abis/troveNFT.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAElB,QAAA,aAAa,GAAG,IAAA,eAAQ,EAAC;IACpC,0DAA0D;IAC1D,0DAA0D;CAC3D,CAAQ,CAAA"}
|
|
@@ -6,5 +6,45 @@ export declare const VIRTUAL_POOL_ABI: readonly [{
|
|
|
6
6
|
readonly outputs: readonly [{
|
|
7
7
|
readonly type: "uint256";
|
|
8
8
|
}];
|
|
9
|
+
}, {
|
|
10
|
+
readonly name: "getReserves";
|
|
11
|
+
readonly type: "function";
|
|
12
|
+
readonly stateMutability: "view";
|
|
13
|
+
readonly inputs: readonly [];
|
|
14
|
+
readonly outputs: readonly [{
|
|
15
|
+
readonly type: "uint256";
|
|
16
|
+
}, {
|
|
17
|
+
readonly type: "uint256";
|
|
18
|
+
}, {
|
|
19
|
+
readonly type: "uint256";
|
|
20
|
+
}];
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "metadata";
|
|
23
|
+
readonly type: "function";
|
|
24
|
+
readonly stateMutability: "view";
|
|
25
|
+
readonly inputs: readonly [];
|
|
26
|
+
readonly outputs: readonly [{
|
|
27
|
+
readonly type: "uint256";
|
|
28
|
+
}, {
|
|
29
|
+
readonly type: "uint256";
|
|
30
|
+
}, {
|
|
31
|
+
readonly type: "uint256";
|
|
32
|
+
}, {
|
|
33
|
+
readonly type: "uint256";
|
|
34
|
+
}, {
|
|
35
|
+
readonly type: "address";
|
|
36
|
+
}, {
|
|
37
|
+
readonly type: "address";
|
|
38
|
+
}];
|
|
39
|
+
}, {
|
|
40
|
+
readonly name: "tokens";
|
|
41
|
+
readonly type: "function";
|
|
42
|
+
readonly stateMutability: "view";
|
|
43
|
+
readonly inputs: readonly [];
|
|
44
|
+
readonly outputs: readonly [{
|
|
45
|
+
readonly type: "address";
|
|
46
|
+
}, {
|
|
47
|
+
readonly type: "address";
|
|
48
|
+
}];
|
|
9
49
|
}];
|
|
10
50
|
//# sourceMappingURL=virtualPool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtualPool.d.ts","sourceRoot":"","sources":["../../../src/core/abis/virtualPool.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"virtualPool.d.ts","sourceRoot":"","sources":["../../../src/core/abis/virtualPool.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK3B,CAAA"}
|
|
@@ -2,5 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VIRTUAL_POOL_ABI = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
|
-
exports.VIRTUAL_POOL_ABI = (0, viem_1.parseAbi)([
|
|
5
|
+
exports.VIRTUAL_POOL_ABI = (0, viem_1.parseAbi)([
|
|
6
|
+
'function protocolFee() view returns (uint256)',
|
|
7
|
+
'function getReserves() view returns (uint256, uint256, uint256)',
|
|
8
|
+
'function metadata() view returns (uint256, uint256, uint256, uint256, address, address)',
|
|
9
|
+
'function tokens() view returns (address, address)',
|
|
10
|
+
]);
|
|
6
11
|
//# sourceMappingURL=virtualPool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtualPool.js","sourceRoot":"","sources":["../../../src/core/abis/virtualPool.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAElB,QAAA,gBAAgB,GAAG,IAAA,eAAQ,EAAC
|
|
1
|
+
{"version":3,"file":"virtualPool.js","sourceRoot":"","sources":["../../../src/core/abis/virtualPool.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAElB,QAAA,gBAAgB,GAAG,IAAA,eAAQ,EAAC;IACvC,+CAA+C;IAC/C,iEAAiE;IACjE,yFAAyF;IACzF,mDAAmD;CACpD,CAAC,CAAA"}
|
|
@@ -23,5 +23,13 @@ export declare const VIRTUAL_POOL_FACTORY_ABI: readonly [{
|
|
|
23
23
|
readonly outputs: readonly [{
|
|
24
24
|
readonly type: "bool";
|
|
25
25
|
}];
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "getAllPools";
|
|
28
|
+
readonly type: "function";
|
|
29
|
+
readonly stateMutability: "view";
|
|
30
|
+
readonly inputs: readonly [];
|
|
31
|
+
readonly outputs: readonly [{
|
|
32
|
+
readonly type: "address[]";
|
|
33
|
+
}];
|
|
26
34
|
}];
|
|
27
35
|
//# sourceMappingURL=virtualPoolFactory.d.ts.map
|