@defisaver/positions-sdk 0.0.12 → 0.0.13

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 (75) hide show
  1. package/cjs/config/contracts.d.ts +183 -71
  2. package/cjs/config/contracts.js +16 -0
  3. package/cjs/markets/curveUsd/index.d.ts +2 -0
  4. package/cjs/markets/curveUsd/index.js +14 -1
  5. package/cjs/types/contracts/generated/CrvUSDtBTCAmm.d.ts +139 -0
  6. package/cjs/types/contracts/generated/CrvUSDtBTCAmm.js +5 -0
  7. package/cjs/types/contracts/generated/CrvUSDtBTCController.d.ts +204 -0
  8. package/cjs/types/contracts/generated/CrvUSDtBTCController.js +5 -0
  9. package/cjs/types/contracts/generated/index.d.ts +2 -0
  10. package/cjs/types/curveUsd.d.ts +2 -1
  11. package/cjs/types/curveUsd.js +1 -0
  12. package/esm/config/contracts.d.ts +183 -71
  13. package/esm/config/contracts.js +16 -0
  14. package/esm/markets/curveUsd/index.d.ts +2 -0
  15. package/esm/markets/curveUsd/index.js +12 -0
  16. package/esm/types/contracts/generated/CrvUSDtBTCAmm.d.ts +139 -0
  17. package/esm/types/contracts/generated/CrvUSDtBTCAmm.js +4 -0
  18. package/esm/types/contracts/generated/CrvUSDtBTCController.d.ts +204 -0
  19. package/esm/types/contracts/generated/CrvUSDtBTCController.js +4 -0
  20. package/esm/types/contracts/generated/index.d.ts +2 -0
  21. package/esm/types/curveUsd.d.ts +2 -1
  22. package/esm/types/curveUsd.js +1 -0
  23. package/package.json +40 -40
  24. package/src/aaveV2/index.ts +220 -220
  25. package/src/aaveV3/index.ts +550 -550
  26. package/src/assets/index.ts +60 -60
  27. package/src/chickenBonds/index.ts +123 -123
  28. package/src/compoundV2/index.ts +206 -206
  29. package/src/compoundV3/index.ts +269 -269
  30. package/src/config/contracts.js +635 -619
  31. package/src/constants/index.ts +3 -3
  32. package/src/contracts.ts +100 -100
  33. package/src/curveUsd/index.ts +228 -228
  34. package/src/exchange/index.ts +17 -17
  35. package/src/helpers/aaveHelpers/index.ts +134 -134
  36. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  37. package/src/helpers/compoundHelpers/index.ts +181 -181
  38. package/src/helpers/curveUsdHelpers/index.ts +32 -32
  39. package/src/helpers/index.ts +5 -5
  40. package/src/helpers/makerHelpers/index.ts +94 -94
  41. package/src/helpers/sparkHelpers/index.ts +106 -106
  42. package/src/index.ts +40 -40
  43. package/src/liquity/index.ts +103 -103
  44. package/src/maker/index.ts +101 -101
  45. package/src/markets/aave/index.ts +80 -80
  46. package/src/markets/aave/marketAssets.ts +32 -32
  47. package/src/markets/compound/index.ts +85 -85
  48. package/src/markets/compound/marketsAssets.ts +35 -35
  49. package/src/markets/curveUsd/index.ts +56 -42
  50. package/src/markets/index.ts +3 -3
  51. package/src/markets/spark/index.ts +29 -29
  52. package/src/markets/spark/marketAssets.ts +9 -9
  53. package/src/moneymarket/moneymarketCommonService.ts +75 -75
  54. package/src/morpho/markets.ts +39 -39
  55. package/src/morphoAaveV2/index.ts +254 -254
  56. package/src/morphoAaveV3/index.ts +614 -614
  57. package/src/multicall/index.ts +22 -22
  58. package/src/services/dsrService.ts +15 -15
  59. package/src/services/priceService.ts +21 -21
  60. package/src/services/utils.ts +34 -34
  61. package/src/spark/index.ts +413 -413
  62. package/src/staking/staking.ts +167 -167
  63. package/src/types/aave.ts +256 -256
  64. package/src/types/chickenBonds.ts +45 -45
  65. package/src/types/common.ts +83 -83
  66. package/src/types/compound.ts +121 -121
  67. package/src/types/contracts/generated/CrvUSDtBTCAmm.ts +286 -0
  68. package/src/types/contracts/generated/CrvUSDtBTCController.ts +397 -0
  69. package/src/types/contracts/generated/index.ts +2 -0
  70. package/src/types/curveUsd.ts +111 -110
  71. package/src/types/index.ts +6 -6
  72. package/src/types/liquity.ts +29 -29
  73. package/src/types/maker.ts +50 -50
  74. package/src/types/spark.ts +106 -106
  75. package/yarn-error.log +64 -0
@@ -1,84 +1,84 @@
1
- // General
2
- export type EthAddress = string;
3
- export type Blockish = number | 'latest';
4
- export type AssetSymbol = string;
5
- export type Amount = string | number;
6
-
7
- export enum NetworkNumber {
8
- Eth = 1,
9
- Opt = 10,
10
- Arb = 42161,
11
- Base = 8453,
12
- }
13
- export type Networkish = string | NetworkNumber;
14
-
15
- // Common
16
- export interface MMAssetData {
17
- symbol: string,
18
- supplyRate: string,
19
- borrowRate: string,
20
- price: string,
21
- collateralFactor: string,
22
- underlyingTokenAddress: string,
23
- marketLiquidity: string,
24
- utilization: string,
25
- borrowCap: string,
26
- totalSupply: string,
27
- canBeBorrowed: boolean,
28
- canBeSupplied: boolean,
29
- totalBorrow: string,
30
- incentiveBorrowApy?: string,
31
- incentiveBorrowToken?: string,
32
- incentiveSupplyApy?: string,
33
- incentiveSupplyToken?: string,
34
- borrowRateP2P?: string,
35
- supplyRateP2P?: string,
36
- }
37
-
38
- export interface MMAssetsData {
39
- [token: string]: MMAssetData,
40
- }
41
- export interface MMMarketData {
42
- assetsData: MMAssetData[],
43
- }
44
- export interface MMUsedAsset {
45
- symbol: string,
46
- supplied: string,
47
- suppliedUsd: string,
48
- isSupplied: boolean,
49
- borrowed: string,
50
- borrowedUsd: string,
51
- isBorrowed: boolean,
52
- debt: string,
53
- supplyRate?: string,
54
- borrowRate?: string,
55
- discountedBorrowRate?: string,
56
- stableBorrowRate?: string,
57
- interestMode?: string,
58
- collateral?: boolean,
59
- }
60
- export interface MMUsedAssets {
61
- [token: string]: MMUsedAsset,
62
- }
63
- export interface MMUsedAssetWStableB extends MMUsedAsset {
64
- stableBorrowRate: string,
65
- borrowedStable: string,
66
- borrowedVariable: string,
67
- borrowedUsdStable: string,
68
- borrowedUsdVariable: string,
69
- interestMode: string,
70
- }
71
- export interface MMPositionData {
72
- usedAssets: any,
73
- netApy: string,
74
- lastUpdated: number,
75
- // ...
76
- }
77
-
78
- export type Balances = Record<AssetSymbol, Amount>;
79
- export interface PositionBalances {
80
- collateral?: Balances,
81
- debt?: Balances,
82
- selling?: Balances,
83
- deposited?: Balances,
1
+ // General
2
+ export type EthAddress = string;
3
+ export type Blockish = number | 'latest';
4
+ export type AssetSymbol = string;
5
+ export type Amount = string | number;
6
+
7
+ export enum NetworkNumber {
8
+ Eth = 1,
9
+ Opt = 10,
10
+ Arb = 42161,
11
+ Base = 8453,
12
+ }
13
+ export type Networkish = string | NetworkNumber;
14
+
15
+ // Common
16
+ export interface MMAssetData {
17
+ symbol: string,
18
+ supplyRate: string,
19
+ borrowRate: string,
20
+ price: string,
21
+ collateralFactor: string,
22
+ underlyingTokenAddress: string,
23
+ marketLiquidity: string,
24
+ utilization: string,
25
+ borrowCap: string,
26
+ totalSupply: string,
27
+ canBeBorrowed: boolean,
28
+ canBeSupplied: boolean,
29
+ totalBorrow: string,
30
+ incentiveBorrowApy?: string,
31
+ incentiveBorrowToken?: string,
32
+ incentiveSupplyApy?: string,
33
+ incentiveSupplyToken?: string,
34
+ borrowRateP2P?: string,
35
+ supplyRateP2P?: string,
36
+ }
37
+
38
+ export interface MMAssetsData {
39
+ [token: string]: MMAssetData,
40
+ }
41
+ export interface MMMarketData {
42
+ assetsData: MMAssetData[],
43
+ }
44
+ export interface MMUsedAsset {
45
+ symbol: string,
46
+ supplied: string,
47
+ suppliedUsd: string,
48
+ isSupplied: boolean,
49
+ borrowed: string,
50
+ borrowedUsd: string,
51
+ isBorrowed: boolean,
52
+ debt: string,
53
+ supplyRate?: string,
54
+ borrowRate?: string,
55
+ discountedBorrowRate?: string,
56
+ stableBorrowRate?: string,
57
+ interestMode?: string,
58
+ collateral?: boolean,
59
+ }
60
+ export interface MMUsedAssets {
61
+ [token: string]: MMUsedAsset,
62
+ }
63
+ export interface MMUsedAssetWStableB extends MMUsedAsset {
64
+ stableBorrowRate: string,
65
+ borrowedStable: string,
66
+ borrowedVariable: string,
67
+ borrowedUsdStable: string,
68
+ borrowedUsdVariable: string,
69
+ interestMode: string,
70
+ }
71
+ export interface MMPositionData {
72
+ usedAssets: any,
73
+ netApy: string,
74
+ lastUpdated: number,
75
+ // ...
76
+ }
77
+
78
+ export type Balances = Record<AssetSymbol, Amount>;
79
+ export interface PositionBalances {
80
+ collateral?: Balances,
81
+ debt?: Balances,
82
+ selling?: Balances,
83
+ deposited?: Balances,
84
84
  }
@@ -1,122 +1,122 @@
1
- import {
2
- MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber,
3
- } from './common';
4
-
5
- export enum CompoundVersions {
6
- 'CompoundV2' = 'v2',
7
- 'CompoundV3USDC' = 'v3-USDC',
8
- 'CompoundV3ETH' = 'v3-ETH',
9
- 'CompoundV3USDbC' = 'v3-USDbC',
10
- }
11
-
12
- export interface CompoundMarketData {
13
- chainIds: NetworkNumber[],
14
- label: string,
15
- shortLabel: string,
16
- value: CompoundVersions,
17
- baseAsset: string,
18
- collAssets: readonly string[],
19
- baseMarket: string,
20
- baseMarketAddress: string,
21
- secondLabel: string,
22
- bulkerName: string,
23
- bulkerAddress: string,
24
- bulkerOptions: { supply: string | number, withdraw: string | number },
25
- // icon: Function,
26
- }
27
-
28
- export interface CompoundUsedAsset extends MMUsedAsset {
29
- collateral: boolean,
30
- limit?: string,
31
- }
32
-
33
- export interface CompoundV2UsedAsset extends CompoundUsedAsset {
34
- }
35
- export interface CompoundV3UsedAsset extends CompoundUsedAsset {
36
- }
37
-
38
- export interface CompoundUsedAssets<T> {
39
- [token: string]: T,
40
- }
41
-
42
- export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
43
- export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
44
-
45
- export interface CompoundAssetData extends MMAssetData {
46
- supplyCapAlternative?: string,
47
- totalSupplyAlternative?: string,
48
- priceAlternative?: string,
49
- sortIndex?: number,
50
- }
51
-
52
- export interface CompoundV2AssetData extends CompoundAssetData {
53
- }
54
- export interface CompoundV3AssetData extends CompoundAssetData {
55
- borrowCollateralFactor: string,
56
- liquidateCollateralFactor: string,
57
- minDebt: string,
58
- liquidationRatio: string,
59
- supplyCap: string,
60
- }
61
-
62
- export interface CompoundAssetsData<T> {
63
- [token: string]: T
64
- }
65
- export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
66
- export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
67
-
68
- export type CompoundMarketsData<T> = { assetsData: T };
69
- export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
70
- export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
71
-
72
- export interface BaseAdditionalAssetData {
73
- totalBorrow: string,
74
- utilization: string,
75
- marketLiquidity: string,
76
- rewardSupplySpeed: string,
77
- rewardBorrowSpeed: string,
78
- minDebt: string,
79
- isBase: boolean,
80
- }
81
-
82
- export interface CompoundAggregatedPositionData {
83
- suppliedUsd: string,
84
- suppliedCollateralUsd: string,
85
- borrowedUsd: string,
86
- borrowLimitUsd: string,
87
- liquidationLimitUsd: string,
88
- leftToBorrowUsd: string,
89
- ratio: string,
90
- collRatio: string,
91
- netApy: string,
92
- incentiveUsd: string,
93
- totalInterestUsd: string,
94
- liqRatio: string,
95
- liqPercent: string,
96
- leveragedType: string,
97
- leveragedAsset?: string,
98
- leveragedLsdAssetRatio?: string,
99
- liquidationPrice?: string,
100
- minRatio: string,
101
- debtTooLow: boolean,
102
- minDebt: string,
103
- }
104
-
105
- export interface CompoundPositionData extends MMPositionData {
106
- ratio: string,
107
- minRatio: string,
108
- borrowedUsd: string,
109
- borrowLimitUsd: string,
110
- incentiveUsd: string,
111
- totalInterestUsd: string,
112
- isSubscribedToAutomation?: boolean,
113
- automationResubscribeRequired?: boolean,
114
- }
115
-
116
- export interface CompoundV2PositionData extends CompoundPositionData {
117
- usedAssets: CompoundV2UsedAssets,
118
- }
119
-
120
- export interface CompoundV3PositionData extends CompoundPositionData {
121
- usedAssets: CompoundV3UsedAssets,
1
+ import {
2
+ MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber,
3
+ } from './common';
4
+
5
+ export enum CompoundVersions {
6
+ 'CompoundV2' = 'v2',
7
+ 'CompoundV3USDC' = 'v3-USDC',
8
+ 'CompoundV3ETH' = 'v3-ETH',
9
+ 'CompoundV3USDbC' = 'v3-USDbC',
10
+ }
11
+
12
+ export interface CompoundMarketData {
13
+ chainIds: NetworkNumber[],
14
+ label: string,
15
+ shortLabel: string,
16
+ value: CompoundVersions,
17
+ baseAsset: string,
18
+ collAssets: readonly string[],
19
+ baseMarket: string,
20
+ baseMarketAddress: string,
21
+ secondLabel: string,
22
+ bulkerName: string,
23
+ bulkerAddress: string,
24
+ bulkerOptions: { supply: string | number, withdraw: string | number },
25
+ // icon: Function,
26
+ }
27
+
28
+ export interface CompoundUsedAsset extends MMUsedAsset {
29
+ collateral: boolean,
30
+ limit?: string,
31
+ }
32
+
33
+ export interface CompoundV2UsedAsset extends CompoundUsedAsset {
34
+ }
35
+ export interface CompoundV3UsedAsset extends CompoundUsedAsset {
36
+ }
37
+
38
+ export interface CompoundUsedAssets<T> {
39
+ [token: string]: T,
40
+ }
41
+
42
+ export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
43
+ export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
44
+
45
+ export interface CompoundAssetData extends MMAssetData {
46
+ supplyCapAlternative?: string,
47
+ totalSupplyAlternative?: string,
48
+ priceAlternative?: string,
49
+ sortIndex?: number,
50
+ }
51
+
52
+ export interface CompoundV2AssetData extends CompoundAssetData {
53
+ }
54
+ export interface CompoundV3AssetData extends CompoundAssetData {
55
+ borrowCollateralFactor: string,
56
+ liquidateCollateralFactor: string,
57
+ minDebt: string,
58
+ liquidationRatio: string,
59
+ supplyCap: string,
60
+ }
61
+
62
+ export interface CompoundAssetsData<T> {
63
+ [token: string]: T
64
+ }
65
+ export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
66
+ export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
67
+
68
+ export type CompoundMarketsData<T> = { assetsData: T };
69
+ export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
70
+ export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
71
+
72
+ export interface BaseAdditionalAssetData {
73
+ totalBorrow: string,
74
+ utilization: string,
75
+ marketLiquidity: string,
76
+ rewardSupplySpeed: string,
77
+ rewardBorrowSpeed: string,
78
+ minDebt: string,
79
+ isBase: boolean,
80
+ }
81
+
82
+ export interface CompoundAggregatedPositionData {
83
+ suppliedUsd: string,
84
+ suppliedCollateralUsd: string,
85
+ borrowedUsd: string,
86
+ borrowLimitUsd: string,
87
+ liquidationLimitUsd: string,
88
+ leftToBorrowUsd: string,
89
+ ratio: string,
90
+ collRatio: string,
91
+ netApy: string,
92
+ incentiveUsd: string,
93
+ totalInterestUsd: string,
94
+ liqRatio: string,
95
+ liqPercent: string,
96
+ leveragedType: string,
97
+ leveragedAsset?: string,
98
+ leveragedLsdAssetRatio?: string,
99
+ liquidationPrice?: string,
100
+ minRatio: string,
101
+ debtTooLow: boolean,
102
+ minDebt: string,
103
+ }
104
+
105
+ export interface CompoundPositionData extends MMPositionData {
106
+ ratio: string,
107
+ minRatio: string,
108
+ borrowedUsd: string,
109
+ borrowLimitUsd: string,
110
+ incentiveUsd: string,
111
+ totalInterestUsd: string,
112
+ isSubscribedToAutomation?: boolean,
113
+ automationResubscribeRequired?: boolean,
114
+ }
115
+
116
+ export interface CompoundV2PositionData extends CompoundPositionData {
117
+ usedAssets: CompoundV2UsedAssets,
118
+ }
119
+
120
+ export interface CompoundV3PositionData extends CompoundPositionData {
121
+ usedAssets: CompoundV3UsedAssets,
122
122
  }
@@ -0,0 +1,286 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type BN from "bn.js";
6
+ import type { ContractOptions } from "web3-eth-contract";
7
+ import type { EventLog } from "web3-core";
8
+ import type { EventEmitter } from "events";
9
+ import type {
10
+ Callback,
11
+ PayableTransactionObject,
12
+ NonPayableTransactionObject,
13
+ BlockType,
14
+ ContractEventLog,
15
+ BaseContract,
16
+ } from "./types";
17
+
18
+ export interface EventOptions {
19
+ filter?: object;
20
+ fromBlock?: BlockType;
21
+ topics?: string[];
22
+ }
23
+
24
+ export type TokenExchange = ContractEventLog<{
25
+ buyer: string;
26
+ sold_id: string;
27
+ tokens_sold: string;
28
+ bought_id: string;
29
+ tokens_bought: string;
30
+ 0: string;
31
+ 1: string;
32
+ 2: string;
33
+ 3: string;
34
+ 4: string;
35
+ }>;
36
+ export type Deposit = ContractEventLog<{
37
+ provider: string;
38
+ amount: string;
39
+ n1: string;
40
+ n2: string;
41
+ 0: string;
42
+ 1: string;
43
+ 2: string;
44
+ 3: string;
45
+ }>;
46
+ export type Withdraw = ContractEventLog<{
47
+ provider: string;
48
+ amount_borrowed: string;
49
+ amount_collateral: string;
50
+ 0: string;
51
+ 1: string;
52
+ 2: string;
53
+ }>;
54
+ export type SetRate = ContractEventLog<{
55
+ rate: string;
56
+ rate_mul: string;
57
+ time: string;
58
+ 0: string;
59
+ 1: string;
60
+ 2: string;
61
+ }>;
62
+ export type SetFee = ContractEventLog<{
63
+ fee: string;
64
+ 0: string;
65
+ }>;
66
+ export type SetAdminFee = ContractEventLog<{
67
+ fee: string;
68
+ 0: string;
69
+ }>;
70
+
71
+ export interface CrvUSDtBTCAmm extends BaseContract {
72
+ constructor(
73
+ jsonInterface: any[],
74
+ address?: string,
75
+ options?: ContractOptions
76
+ ): CrvUSDtBTCAmm;
77
+ clone(): CrvUSDtBTCAmm;
78
+ methods: {
79
+ set_admin(_admin: string): NonPayableTransactionObject<void>;
80
+
81
+ coins(i: number | string | BN): NonPayableTransactionObject<string>;
82
+
83
+ price_oracle(): NonPayableTransactionObject<string>;
84
+
85
+ dynamic_fee(): NonPayableTransactionObject<string>;
86
+
87
+ get_rate_mul(): NonPayableTransactionObject<string>;
88
+
89
+ get_base_price(): NonPayableTransactionObject<string>;
90
+
91
+ p_current_up(n: number | string | BN): NonPayableTransactionObject<string>;
92
+
93
+ p_current_down(
94
+ n: number | string | BN
95
+ ): NonPayableTransactionObject<string>;
96
+
97
+ p_oracle_up(n: number | string | BN): NonPayableTransactionObject<string>;
98
+
99
+ p_oracle_down(n: number | string | BN): NonPayableTransactionObject<string>;
100
+
101
+ get_p(): NonPayableTransactionObject<string>;
102
+
103
+ read_user_tick_numbers(
104
+ user: string
105
+ ): NonPayableTransactionObject<[string, string]>;
106
+
107
+ can_skip_bands(
108
+ n_end: number | string | BN
109
+ ): NonPayableTransactionObject<boolean>;
110
+
111
+ active_band_with_skip(): NonPayableTransactionObject<string>;
112
+
113
+ has_liquidity(user: string): NonPayableTransactionObject<boolean>;
114
+
115
+ deposit_range(
116
+ user: string,
117
+ amount: number | string | BN,
118
+ n1: number | string | BN,
119
+ n2: number | string | BN
120
+ ): NonPayableTransactionObject<void>;
121
+
122
+ withdraw(
123
+ user: string,
124
+ frac: number | string | BN
125
+ ): NonPayableTransactionObject<[string, string]>;
126
+
127
+ get_dy(
128
+ i: number | string | BN,
129
+ j: number | string | BN,
130
+ in_amount: number | string | BN
131
+ ): NonPayableTransactionObject<string>;
132
+
133
+ get_dxdy(
134
+ i: number | string | BN,
135
+ j: number | string | BN,
136
+ in_amount: number | string | BN
137
+ ): NonPayableTransactionObject<[string, string]>;
138
+
139
+ get_dx(
140
+ i: number | string | BN,
141
+ j: number | string | BN,
142
+ out_amount: number | string | BN
143
+ ): NonPayableTransactionObject<string>;
144
+
145
+ get_dydx(
146
+ i: number | string | BN,
147
+ j: number | string | BN,
148
+ out_amount: number | string | BN
149
+ ): NonPayableTransactionObject<[string, string]>;
150
+
151
+ "exchange(uint256,uint256,uint256,uint256)"(
152
+ i: number | string | BN,
153
+ j: number | string | BN,
154
+ in_amount: number | string | BN,
155
+ min_amount: number | string | BN
156
+ ): NonPayableTransactionObject<[string, string]>;
157
+
158
+ "exchange(uint256,uint256,uint256,uint256,address)"(
159
+ i: number | string | BN,
160
+ j: number | string | BN,
161
+ in_amount: number | string | BN,
162
+ min_amount: number | string | BN,
163
+ _for: string
164
+ ): NonPayableTransactionObject<[string, string]>;
165
+
166
+ "exchange_dy(uint256,uint256,uint256,uint256)"(
167
+ i: number | string | BN,
168
+ j: number | string | BN,
169
+ out_amount: number | string | BN,
170
+ max_amount: number | string | BN
171
+ ): NonPayableTransactionObject<[string, string]>;
172
+
173
+ "exchange_dy(uint256,uint256,uint256,uint256,address)"(
174
+ i: number | string | BN,
175
+ j: number | string | BN,
176
+ out_amount: number | string | BN,
177
+ max_amount: number | string | BN,
178
+ _for: string
179
+ ): NonPayableTransactionObject<[string, string]>;
180
+
181
+ get_y_up(user: string): NonPayableTransactionObject<string>;
182
+
183
+ get_x_down(user: string): NonPayableTransactionObject<string>;
184
+
185
+ get_sum_xy(user: string): NonPayableTransactionObject<[string, string]>;
186
+
187
+ get_xy(user: string): NonPayableTransactionObject<[string[], string[]]>;
188
+
189
+ get_amount_for_price(
190
+ p: number | string | BN
191
+ ): NonPayableTransactionObject<[string, boolean]>;
192
+
193
+ set_rate(rate: number | string | BN): NonPayableTransactionObject<string>;
194
+
195
+ set_fee(fee: number | string | BN): NonPayableTransactionObject<void>;
196
+
197
+ set_admin_fee(fee: number | string | BN): NonPayableTransactionObject<void>;
198
+
199
+ reset_admin_fees(): NonPayableTransactionObject<void>;
200
+
201
+ set_callback(
202
+ liquidity_mining_callback: string
203
+ ): NonPayableTransactionObject<void>;
204
+
205
+ admin(): NonPayableTransactionObject<string>;
206
+
207
+ A(): NonPayableTransactionObject<string>;
208
+
209
+ fee(): NonPayableTransactionObject<string>;
210
+
211
+ admin_fee(): NonPayableTransactionObject<string>;
212
+
213
+ rate(): NonPayableTransactionObject<string>;
214
+
215
+ active_band(): NonPayableTransactionObject<string>;
216
+
217
+ min_band(): NonPayableTransactionObject<string>;
218
+
219
+ max_band(): NonPayableTransactionObject<string>;
220
+
221
+ admin_fees_x(): NonPayableTransactionObject<string>;
222
+
223
+ admin_fees_y(): NonPayableTransactionObject<string>;
224
+
225
+ price_oracle_contract(): NonPayableTransactionObject<string>;
226
+
227
+ bands_x(arg0: number | string | BN): NonPayableTransactionObject<string>;
228
+
229
+ bands_y(arg0: number | string | BN): NonPayableTransactionObject<string>;
230
+
231
+ liquidity_mining_callback(): NonPayableTransactionObject<string>;
232
+ };
233
+ events: {
234
+ TokenExchange(cb?: Callback<TokenExchange>): EventEmitter;
235
+ TokenExchange(
236
+ options?: EventOptions,
237
+ cb?: Callback<TokenExchange>
238
+ ): EventEmitter;
239
+
240
+ Deposit(cb?: Callback<Deposit>): EventEmitter;
241
+ Deposit(options?: EventOptions, cb?: Callback<Deposit>): EventEmitter;
242
+
243
+ Withdraw(cb?: Callback<Withdraw>): EventEmitter;
244
+ Withdraw(options?: EventOptions, cb?: Callback<Withdraw>): EventEmitter;
245
+
246
+ SetRate(cb?: Callback<SetRate>): EventEmitter;
247
+ SetRate(options?: EventOptions, cb?: Callback<SetRate>): EventEmitter;
248
+
249
+ SetFee(cb?: Callback<SetFee>): EventEmitter;
250
+ SetFee(options?: EventOptions, cb?: Callback<SetFee>): EventEmitter;
251
+
252
+ SetAdminFee(cb?: Callback<SetAdminFee>): EventEmitter;
253
+ SetAdminFee(
254
+ options?: EventOptions,
255
+ cb?: Callback<SetAdminFee>
256
+ ): EventEmitter;
257
+
258
+ allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
259
+ };
260
+
261
+ once(event: "TokenExchange", cb: Callback<TokenExchange>): void;
262
+ once(
263
+ event: "TokenExchange",
264
+ options: EventOptions,
265
+ cb: Callback<TokenExchange>
266
+ ): void;
267
+
268
+ once(event: "Deposit", cb: Callback<Deposit>): void;
269
+ once(event: "Deposit", options: EventOptions, cb: Callback<Deposit>): void;
270
+
271
+ once(event: "Withdraw", cb: Callback<Withdraw>): void;
272
+ once(event: "Withdraw", options: EventOptions, cb: Callback<Withdraw>): void;
273
+
274
+ once(event: "SetRate", cb: Callback<SetRate>): void;
275
+ once(event: "SetRate", options: EventOptions, cb: Callback<SetRate>): void;
276
+
277
+ once(event: "SetFee", cb: Callback<SetFee>): void;
278
+ once(event: "SetFee", options: EventOptions, cb: Callback<SetFee>): void;
279
+
280
+ once(event: "SetAdminFee", cb: Callback<SetAdminFee>): void;
281
+ once(
282
+ event: "SetAdminFee",
283
+ options: EventOptions,
284
+ cb: Callback<SetAdminFee>
285
+ ): void;
286
+ }