@curvefi/api 2.66.30 → 2.66.31
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/lib/boosting.d.ts +33 -32
- package/lib/boosting.js +320 -252
- package/lib/cached.d.ts +4 -3
- package/lib/cached.js +63 -19
- package/lib/constants/utils.d.ts +14 -1
- package/lib/constants/utils.js +21 -6
- package/lib/curve.d.ts +5 -5
- package/lib/curve.js +21 -38
- package/lib/dao.d.ts +32 -31
- package/lib/dao.js +420 -350
- package/lib/external-api.d.ts +1 -1
- package/lib/external-api.js +2 -2
- package/lib/factory/common.d.ts +2 -1
- package/lib/factory/common.js +1 -1
- package/lib/factory/deploy.d.ts +46 -45
- package/lib/factory/deploy.js +630 -551
- package/lib/factory/factory-api.d.ts +3 -2
- package/lib/factory/factory-api.js +22 -23
- package/lib/factory/factory-crypto.d.ts +1 -1
- package/lib/factory/factory-crypto.js +12 -15
- package/lib/factory/factory-tricrypto.d.ts +1 -1
- package/lib/factory/factory-tricrypto.js +14 -15
- package/lib/factory/factory-twocrypto.d.ts +1 -1
- package/lib/factory/factory-twocrypto.js +12 -13
- package/lib/factory/factory.d.ts +4 -3
- package/lib/factory/factory.js +21 -24
- package/lib/index.d.ts +413 -104
- package/lib/index.js +253 -257
- package/lib/interfaces.d.ts +2 -0
- package/lib/pools/PoolTemplate.d.ts +13 -12
- package/lib/pools/PoolTemplate.js +279 -285
- package/lib/pools/mixins/common.js +2 -2
- package/lib/pools/mixins/depositBalancedAmountsMixins.d.ts +12 -4
- package/lib/pools/mixins/depositBalancedAmountsMixins.js +1 -15
- package/lib/pools/mixins/depositMixins.d.ts +25 -5
- package/lib/pools/mixins/depositMixins.js +38 -76
- package/lib/pools/mixins/depositWrappedMixins.d.ts +10 -2
- package/lib/pools/mixins/depositWrappedMixins.js +17 -33
- package/lib/pools/mixins/poolBalancesMixin.d.ts +6 -2
- package/lib/pools/mixins/poolBalancesMixin.js +3 -5
- package/lib/pools/mixins/swapMixins.d.ts +20 -4
- package/lib/pools/mixins/swapMixins.js +36 -70
- package/lib/pools/mixins/swapWrappedMixins.d.ts +19 -4
- package/lib/pools/mixins/swapWrappedMixins.js +32 -60
- package/lib/pools/mixins/withdrawExpectedMixins.d.ts +12 -4
- package/lib/pools/mixins/withdrawExpectedMixins.js +6 -11
- package/lib/pools/mixins/withdrawImbalanceMixins.d.ts +20 -4
- package/lib/pools/mixins/withdrawImbalanceMixins.js +26 -53
- package/lib/pools/mixins/withdrawImbalanceWrappedMixins.d.ts +10 -2
- package/lib/pools/mixins/withdrawImbalanceWrappedMixins.js +12 -27
- package/lib/pools/mixins/withdrawMixins.d.ts +25 -5
- package/lib/pools/mixins/withdrawMixins.js +33 -67
- package/lib/pools/mixins/withdrawOneCoinExpectedMixins.d.ts +12 -4
- package/lib/pools/mixins/withdrawOneCoinExpectedMixins.js +8 -13
- package/lib/pools/mixins/withdrawOneCoinMixins.d.ts +25 -5
- package/lib/pools/mixins/withdrawOneCoinMixins.js +32 -66
- package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.d.ts +6 -2
- package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.js +4 -7
- package/lib/pools/mixins/withdrawOneCoinWrappedMixins.d.ts +10 -2
- package/lib/pools/mixins/withdrawOneCoinWrappedMixins.js +13 -29
- package/lib/pools/mixins/withdrawWrappedMixins.d.ts +10 -2
- package/lib/pools/mixins/withdrawWrappedMixins.js +14 -28
- package/lib/pools/poolConstructor.d.ts +2 -1
- package/lib/pools/poolConstructor.js +27 -28
- package/lib/pools/subClasses/corePool.d.ts +4 -1
- package/lib/pools/subClasses/corePool.js +5 -7
- package/lib/pools/subClasses/gaugePool.d.ts +5 -3
- package/lib/pools/subClasses/gaugePool.js +19 -18
- package/lib/pools/subClasses/statsPool.d.ts +2 -0
- package/lib/pools/subClasses/statsPool.js +22 -10
- package/lib/pools/subClasses/walletPool.d.ts +2 -1
- package/lib/pools/subClasses/walletPool.js +6 -6
- package/lib/pools/utils.d.ts +7 -6
- package/lib/pools/utils.js +316 -297
- package/lib/route-graph.worker.d.ts +2 -2
- package/lib/route-graph.worker.js +4 -6
- package/lib/router.d.ts +12 -11
- package/lib/router.js +331 -295
- package/lib/utils.d.ts +34 -33
- package/lib/utils.js +481 -435
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { ethers
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
2
|
import { PoolTemplate } from "./pools/index.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} | {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
maxPriorityFeePerGas?: number;
|
|
22
|
-
}): void;
|
|
23
|
-
declare const curve: {
|
|
24
|
-
init: typeof init;
|
|
3
|
+
import { deployCryptoPoolEstimateGas, deployTwocryptoPoolEstimateGas } from './factory/deploy.js';
|
|
4
|
+
export declare const createCurve: () => {
|
|
5
|
+
init: (this: ReturnType<typeof createCurve>, providerType: "JsonRpc" | "Web3" | "Infura" | "Alchemy" | "NoRPC", providerSettings: "NoRPC" | {
|
|
6
|
+
url?: string;
|
|
7
|
+
privateKey?: string;
|
|
8
|
+
batchMaxCount?: number;
|
|
9
|
+
} | {
|
|
10
|
+
externalProvider: ethers.Eip1193Provider;
|
|
11
|
+
} | {
|
|
12
|
+
network?: ethers.Networkish;
|
|
13
|
+
apiKey?: string;
|
|
14
|
+
}, options?: {
|
|
15
|
+
gasPrice?: number;
|
|
16
|
+
maxFeePerGas?: number;
|
|
17
|
+
maxPriorityFeePerGas?: number;
|
|
18
|
+
chainId?: number;
|
|
19
|
+
poolsData?: Record<import("./interfaces.js").IPoolType, import("./interfaces.js").IExtendedPoolDataFromApi>;
|
|
20
|
+
} | undefined) => Promise<void>;
|
|
25
21
|
chainId: number;
|
|
26
22
|
signerAddress: string;
|
|
27
|
-
setCustomFeeData:
|
|
23
|
+
setCustomFeeData: (customFeeData: {
|
|
24
|
+
gasPrice?: number;
|
|
25
|
+
maxFeePerGas?: number;
|
|
26
|
+
maxPriorityFeePerGas?: number;
|
|
27
|
+
}) => void;
|
|
28
28
|
getPoolList: () => string[];
|
|
29
29
|
getMainPoolList: () => string[];
|
|
30
|
-
getUserPoolListByLiquidity: (address?: string) => Promise<string[]>;
|
|
31
|
-
getUserPoolListByClaimable: (address?: string) => Promise<string[]>;
|
|
32
|
-
getUserPoolList: (address?: string, useApi?: boolean) => Promise<string[]>;
|
|
33
|
-
getUserLiquidityUSD: (pools: string[], address?: string) => Promise<string[]>;
|
|
34
|
-
getUserClaimable: (pools: string[], address?: string) => Promise<{
|
|
30
|
+
getUserPoolListByLiquidity: (address?: string | undefined) => Promise<string[]>;
|
|
31
|
+
getUserPoolListByClaimable: (address?: string | undefined) => Promise<string[]>;
|
|
32
|
+
getUserPoolList: (address?: string | undefined, useApi?: boolean | undefined) => Promise<string[]>;
|
|
33
|
+
getUserLiquidityUSD: (pools: string[], address?: string | undefined) => Promise<string[]>;
|
|
34
|
+
getUserClaimable: (pools: string[], address?: string | undefined) => Promise<{
|
|
35
35
|
token: string;
|
|
36
36
|
symbol: string;
|
|
37
37
|
amount: string;
|
|
@@ -45,17 +45,17 @@ declare const curve: {
|
|
|
45
45
|
getGasPriceFromL2: () => Promise<number>;
|
|
46
46
|
getGasInfoForL2: () => Promise<Record<string, number | null>>;
|
|
47
47
|
getGasPrice: () => Promise<number>;
|
|
48
|
-
getTVL: (chainId?: number) => Promise<number>;
|
|
49
|
-
getBalances: (coins: string[], ...addresses: string[] | string[][]) => Promise<import("./interfaces.js").IDict<string[]
|
|
48
|
+
getTVL: (chainId?: number | undefined) => Promise<number>;
|
|
49
|
+
getBalances: (...args: [coins: string[], ...addresses: string[]] | [coins: string[], ...addresses: string[][]]) => Promise<string[] | import("./interfaces.js").IDict<string[]>>;
|
|
50
50
|
getAllowance: (coins: string[], address: string, spender: string) => Promise<string[]>;
|
|
51
|
-
hasAllowance: (coins: string[], amounts: (
|
|
52
|
-
ensureAllowance: (coins: string[], amounts: (
|
|
53
|
-
getCoinsData: (...
|
|
51
|
+
hasAllowance: (coins: string[], amounts: (string | number)[], address: string, spender: string) => Promise<boolean>;
|
|
52
|
+
ensureAllowance: (coins: string[], amounts: (string | number)[], spender: string, isMax?: boolean | undefined) => Promise<string[]>;
|
|
53
|
+
getCoinsData: (...args: string[] | string[][]) => Promise<{
|
|
54
54
|
name: string;
|
|
55
55
|
symbol: string;
|
|
56
56
|
decimals: number;
|
|
57
57
|
}[]>;
|
|
58
|
-
getVolume: (chainId?: number) => Promise<{
|
|
58
|
+
getVolume: (chainId?: number | undefined) => Promise<{
|
|
59
59
|
totalVolume: number;
|
|
60
60
|
cryptoVolume: number;
|
|
61
61
|
cryptoShare: number;
|
|
@@ -70,9 +70,9 @@ declare const curve: {
|
|
|
70
70
|
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
71
71
|
fetchNewPools: () => Promise<string[]>;
|
|
72
72
|
getPoolList: () => string[];
|
|
73
|
-
deployPlainPool: (name: string, symbol: string, coins: string[], A:
|
|
74
|
-
setOracle: (poolAddress: string, oracleAddress?: string, methodName?: string) => Promise<ethers.ContractTransactionResponse>;
|
|
75
|
-
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A:
|
|
73
|
+
deployPlainPool: (name: string, symbol: string, coins: string[], A: string | number, fee: string | number, assetType: 0 | 1 | 2 | 3, implementationIdx: 0 | 1 | 2 | 3 | 4 | 5, emaTime?: number | undefined, oracleAddress?: string | undefined, methodName?: string | undefined) => Promise<ethers.ContractTransactionResponse>;
|
|
74
|
+
setOracle: (poolAddress: string, oracleAddress?: string | undefined, methodName?: string | undefined) => Promise<ethers.ContractTransactionResponse>;
|
|
75
|
+
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A: string | number, fee: string | number, implementationIdx: 0 | 1) => Promise<ethers.ContractTransactionResponse>;
|
|
76
76
|
deployGauge: (poolAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
77
77
|
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
78
78
|
deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -84,9 +84,9 @@ declare const curve: {
|
|
|
84
84
|
fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
|
|
85
85
|
gaugeImplementation: () => string;
|
|
86
86
|
estimateGas: {
|
|
87
|
-
deployPlainPool: (name: string, symbol: string, coins: string[], A:
|
|
88
|
-
setOracle: (poolAddress: string, oracleAddress?: string, methodName?: string) => Promise<number>;
|
|
89
|
-
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A:
|
|
87
|
+
deployPlainPool: (name: string, symbol: string, coins: string[], A: string | number, fee: string | number, assetType: 0 | 1 | 2 | 3, implementationIdx: 0 | 1 | 2 | 3 | 4 | 5, emaTime?: number | undefined, oracleAddress?: string | undefined, methodName?: string | undefined) => Promise<number>;
|
|
88
|
+
setOracle: (poolAddress: string, oracleAddress?: string | undefined, methodName?: string | undefined) => Promise<number>;
|
|
89
|
+
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A: string | number, fee: string | number, implementationIdx: 0 | 1) => Promise<number>;
|
|
90
90
|
deployGauge: (poolAddress: string) => Promise<number>;
|
|
91
91
|
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<number>;
|
|
92
92
|
deployGaugeMirror: (chainId: number, salt: string) => Promise<number>;
|
|
@@ -104,8 +104,8 @@ declare const curve: {
|
|
|
104
104
|
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
105
105
|
fetchNewPools: () => Promise<string[]>;
|
|
106
106
|
getPoolList: () => string[];
|
|
107
|
-
deployPlainPool: (name: string, symbol: string, coins: string[], A:
|
|
108
|
-
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A:
|
|
107
|
+
deployPlainPool: (name: string, symbol: string, coins: string[], A: string | number, fee: string | number, offpegFeeMultiplier: string | number, assetTypes: (0 | 1 | 2 | 3)[], implementationIdx: 0, emaTime: number, oracleAddresses: string[], methodNames: string[]) => Promise<ethers.ContractTransactionResponse>;
|
|
108
|
+
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A: string | number, fee: string | number, offpegFeeMultiplier: string | number, emaTime: number, implementationIdx: 0, assetType: 0 | 1 | 2 | 3, methodName: string, oracleAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
109
109
|
deployGauge: (poolAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
110
110
|
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
111
111
|
deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -116,15 +116,15 @@ declare const curve: {
|
|
|
116
116
|
getDeployedGaugeMirrorAddressByTx: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
117
117
|
fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
|
|
118
118
|
estimateGas: {
|
|
119
|
-
deployPlainPool: (name: string, symbol: string, coins: string[], A:
|
|
120
|
-
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A:
|
|
119
|
+
deployPlainPool: (name: string, symbol: string, coins: string[], A: string | number, fee: string | number, offpegFeeMultiplier: string | number, assetTypes: (0 | 1 | 2 | 3)[], implementationIdx: 0, emaTime: number, oracleAddresses: string[], methodNames: string[]) => Promise<number>;
|
|
120
|
+
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A: string | number, fee: string | number, offpegFeeMultiplier: string | number, assetType: 0 | 1 | 2 | 3, emaTime: number, implementationIdx: 0, methodName: string, oracleAddress: string) => Promise<number>;
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
123
|
cryptoFactory: {
|
|
124
124
|
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
125
125
|
fetchNewPools: () => Promise<string[]>;
|
|
126
126
|
getPoolList: () => string[];
|
|
127
|
-
deployPool: (name: string, symbol: string, coins: string[], A:
|
|
127
|
+
deployPool: (name: string, symbol: string, coins: string[], A: string | number, gamma: string | number, midFee: string | number, outFee: string | number, allowedExtraProfit: string | number, feeGamma: string | number, adjustmentStep: string | number, maHalfTime: number, initialPrice: string | number) => Promise<ethers.ContractTransactionResponse>;
|
|
128
128
|
deployGauge: (poolAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
129
129
|
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
130
130
|
deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -135,7 +135,7 @@ declare const curve: {
|
|
|
135
135
|
fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
|
|
136
136
|
gaugeImplementation: () => string;
|
|
137
137
|
estimateGas: {
|
|
138
|
-
deployPool:
|
|
138
|
+
deployPool: typeof deployCryptoPoolEstimateGas;
|
|
139
139
|
deployGauge: (poolAddress: string) => Promise<number>;
|
|
140
140
|
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<number>;
|
|
141
141
|
deployGaugeMirror: (chainId: number, salt: string) => Promise<number>;
|
|
@@ -145,7 +145,7 @@ declare const curve: {
|
|
|
145
145
|
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
146
146
|
fetchNewPools: () => Promise<string[]>;
|
|
147
147
|
getPoolList: () => string[];
|
|
148
|
-
deployPool: (name: string, symbol: string, coins: string[], A:
|
|
148
|
+
deployPool: (name: string, symbol: string, coins: string[], A: string | number, gamma: string | number, midFee: string | number, outFee: string | number, allowedExtraProfit: string | number, feeGamma: string | number, adjustmentStep: string | number, maHalfTime: number, initialPrice: string | number) => Promise<ethers.ContractTransactionResponse>;
|
|
149
149
|
deployGauge: (poolAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
150
150
|
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
151
151
|
deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -156,7 +156,7 @@ declare const curve: {
|
|
|
156
156
|
fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
|
|
157
157
|
gaugeImplementation: () => string;
|
|
158
158
|
estimateGas: {
|
|
159
|
-
deployPool:
|
|
159
|
+
deployPool: typeof deployTwocryptoPoolEstimateGas;
|
|
160
160
|
deployGauge: (poolAddress: string) => Promise<number>;
|
|
161
161
|
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<number>;
|
|
162
162
|
deployGaugeMirror: (chainId: number, salt: string) => Promise<number>;
|
|
@@ -166,7 +166,7 @@ declare const curve: {
|
|
|
166
166
|
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
167
167
|
fetchNewPools: () => Promise<string[]>;
|
|
168
168
|
getPoolList: () => string[];
|
|
169
|
-
deployPool: (name: string, symbol: string, coins: string[], A:
|
|
169
|
+
deployPool: (name: string, symbol: string, coins: string[], A: string | number, gamma: string | number, midFee: string | number, outFee: string | number, allowedExtraProfit: string | number, feeGamma: string | number, adjustmentStep: string | number, emaTime: number, initialPrices: (string | number)[]) => Promise<ethers.ContractTransactionResponse>;
|
|
170
170
|
deployGauge: (poolAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
171
171
|
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
172
172
|
deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -177,64 +177,64 @@ declare const curve: {
|
|
|
177
177
|
fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
|
|
178
178
|
gaugeImplementation: () => string;
|
|
179
179
|
estimateGas: {
|
|
180
|
-
deployPool: (name: string, symbol: string, coins: string[], A:
|
|
180
|
+
deployPool: (name: string, symbol: string, coins: string[], A: string | number, gamma: string | number, midFee: string | number, outFee: string | number, allowedExtraProfit: string | number, feeGamma: string | number, adjustmentStep: string | number, emaTime: number, initialPrices: (string | number)[]) => Promise<number>;
|
|
181
181
|
deployGauge: (poolAddress: string) => Promise<number>;
|
|
182
182
|
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<number>;
|
|
183
183
|
deployGaugeMirror: (chainId: number, salt: string) => Promise<number>;
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
186
|
estimateGas: {
|
|
187
|
-
ensureAllowance: (coins: string[], amounts: (
|
|
187
|
+
ensureAllowance: (coins: string[], amounts: (string | number)[], spender: string, isMax?: boolean | undefined) => Promise<number | number[]>;
|
|
188
188
|
};
|
|
189
189
|
boosting: {
|
|
190
|
-
getCrv: (...
|
|
191
|
-
getLockedAmountAndUnlockTime: (...
|
|
190
|
+
getCrv: (...args: string[] | string[][]) => Promise<string | import("./interfaces.js").IDict<string>>;
|
|
191
|
+
getLockedAmountAndUnlockTime: (...args: string[] | string[][]) => Promise<import("./interfaces.js").IDict<{
|
|
192
192
|
lockedAmount: string;
|
|
193
193
|
unlockTime: number;
|
|
194
194
|
}> | {
|
|
195
195
|
lockedAmount: string;
|
|
196
196
|
unlockTime: number;
|
|
197
197
|
}>;
|
|
198
|
-
getVeCrv: (...
|
|
199
|
-
getVeCrvPct: (...
|
|
198
|
+
getVeCrv: (...args: string[] | string[][]) => Promise<string | import("./interfaces.js").IDict<string>>;
|
|
199
|
+
getVeCrvPct: (...args: string[] | string[][]) => Promise<string | import("./interfaces.js").IDict<string>>;
|
|
200
200
|
calcUnlockTime: (days: number, start?: number) => number;
|
|
201
|
-
isApproved: (amount:
|
|
202
|
-
approve: (amount:
|
|
203
|
-
createLock: (amount:
|
|
204
|
-
increaseAmount: (amount:
|
|
201
|
+
isApproved: (amount: string | number) => Promise<boolean>;
|
|
202
|
+
approve: (amount: string | number) => Promise<string[]>;
|
|
203
|
+
createLock: (amount: string | number, days: number) => Promise<string>;
|
|
204
|
+
increaseAmount: (amount: string | number) => Promise<string>;
|
|
205
205
|
increaseUnlockTime: (days: number) => Promise<string>;
|
|
206
206
|
withdrawLockedCrv: () => Promise<string>;
|
|
207
|
-
claimableFees: (address?: string) => Promise<string>;
|
|
208
|
-
claimFees: (address?: string) => Promise<string>;
|
|
209
|
-
claimableFeesCrvUSD: (address?: string) => Promise<string>;
|
|
210
|
-
claimFeesCrvUSD: (address?: string) => Promise<string>;
|
|
207
|
+
claimableFees: (address?: string | undefined) => Promise<string>;
|
|
208
|
+
claimFees: (address?: string | undefined) => Promise<string>;
|
|
209
|
+
claimableFeesCrvUSD: (address?: string | undefined) => Promise<string>;
|
|
210
|
+
claimFeesCrvUSD: (address?: string | undefined) => Promise<string>;
|
|
211
211
|
calculateVeCrv: (amount: number | string, unlockTimestamp: number) => number;
|
|
212
212
|
estimateGas: {
|
|
213
|
-
approve: (amount:
|
|
214
|
-
createLock: (amount:
|
|
215
|
-
increaseAmount: (amount:
|
|
213
|
+
approve: (amount: string | number) => Promise<number | number[]>;
|
|
214
|
+
createLock: (amount: string | number, days: number) => Promise<number>;
|
|
215
|
+
increaseAmount: (amount: string | number) => Promise<number>;
|
|
216
216
|
increaseUnlockTime: (days: number) => Promise<number>;
|
|
217
217
|
withdrawLockedCrv: () => Promise<number>;
|
|
218
|
-
claimFees: (address?: string) => Promise<number>;
|
|
219
|
-
claimFeesCrvUSD: (address?: string) => Promise<number>;
|
|
218
|
+
claimFees: (address?: string | undefined) => Promise<number>;
|
|
219
|
+
claimFeesCrvUSD: (address?: string | undefined) => Promise<number>;
|
|
220
220
|
};
|
|
221
221
|
sidechain: {
|
|
222
222
|
lastEthBlock: () => Promise<number>;
|
|
223
223
|
getAnycallBalance: () => Promise<string>;
|
|
224
|
-
topUpAnycall: (amount?: number |
|
|
225
|
-
lastBlockSent: (chainId:
|
|
224
|
+
topUpAnycall: (amount?: string | number | undefined) => Promise<string>;
|
|
225
|
+
lastBlockSent: (chainId: number) => Promise<number>;
|
|
226
226
|
blockToSend: () => Promise<number>;
|
|
227
|
-
sendBlockhash: (block: number, chainId:
|
|
228
|
-
submitProof: (block: number, address?: string) => Promise<string>;
|
|
227
|
+
sendBlockhash: (block: number, chainId: number) => Promise<string>;
|
|
228
|
+
submitProof: (block: number, address?: string | undefined) => Promise<string>;
|
|
229
229
|
estimateGas: {
|
|
230
|
-
topUpAnycall: (amount?: number |
|
|
231
|
-
sendBlockhash: (block: number, chainId:
|
|
232
|
-
submitProof: (block: number, address?: string) => Promise<number>;
|
|
230
|
+
topUpAnycall: (amount?: string | number | undefined) => Promise<number>;
|
|
231
|
+
sendBlockhash: (block: number, chainId: number) => Promise<number>;
|
|
232
|
+
submitProof: (block: number, address?: string | undefined) => Promise<number>;
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
235
|
};
|
|
236
236
|
router: {
|
|
237
|
-
getBestRouteAndOutput: (inputCoin: string, outputCoin: string, amount:
|
|
237
|
+
getBestRouteAndOutput: (inputCoin: string, outputCoin: string, amount: string | number) => Promise<{
|
|
238
238
|
route: import("./interfaces.js").IRoute;
|
|
239
239
|
output: string;
|
|
240
240
|
}>;
|
|
@@ -247,16 +247,16 @@ declare const curve: {
|
|
|
247
247
|
_secondBasePools?: string[];
|
|
248
248
|
_secondBaseTokens?: string[];
|
|
249
249
|
};
|
|
250
|
-
expected: (inputCoin: string, outputCoin: string, amount:
|
|
251
|
-
required: (inputCoin: string, outputCoin: string, outAmount:
|
|
252
|
-
priceImpact: (inputCoin: string, outputCoin: string, amount:
|
|
253
|
-
isApproved: (inputCoin: string, amount:
|
|
254
|
-
approve: (inputCoin: string, amount:
|
|
255
|
-
swap: (inputCoin: string, outputCoin: string, amount:
|
|
250
|
+
expected: (inputCoin: string, outputCoin: string, amount: string | number) => Promise<string>;
|
|
251
|
+
required: (inputCoin: string, outputCoin: string, outAmount: string | number) => Promise<string>;
|
|
252
|
+
priceImpact: (inputCoin: string, outputCoin: string, amount: string | number) => Promise<number>;
|
|
253
|
+
isApproved: (inputCoin: string, amount: string | number) => Promise<boolean>;
|
|
254
|
+
approve: (inputCoin: string, amount: string | number) => Promise<string[]>;
|
|
255
|
+
swap: (inputCoin: string, outputCoin: string, amount: string | number, slippage?: number | undefined) => Promise<ethers.ContractTransactionResponse>;
|
|
256
256
|
getSwappedAmount: (tx: ethers.ContractTransactionResponse, outputCoin: string) => Promise<string>;
|
|
257
257
|
estimateGas: {
|
|
258
|
-
approve: (inputCoin: string, amount:
|
|
259
|
-
swap: (inputCoin: string, outputCoin: string, amount:
|
|
258
|
+
approve: (inputCoin: string, amount: string | number) => Promise<number | number[]>;
|
|
259
|
+
swap: (inputCoin: string, outputCoin: string, amount: string | number) => Promise<number | number[]>;
|
|
260
260
|
};
|
|
261
261
|
};
|
|
262
262
|
dao: {
|
|
@@ -267,47 +267,356 @@ declare const curve: {
|
|
|
267
267
|
veCrv: string;
|
|
268
268
|
averageLockTime: string;
|
|
269
269
|
}>;
|
|
270
|
-
userCrv: (address?: string) => Promise<string>;
|
|
271
|
-
userVeCrv: (address?: string) => Promise<{
|
|
270
|
+
userCrv: (address?: string | undefined) => Promise<string>;
|
|
271
|
+
userVeCrv: (address?: string | undefined) => Promise<{
|
|
272
272
|
veCrv: string;
|
|
273
273
|
veCrvPct: string;
|
|
274
274
|
lockedCrv: string;
|
|
275
275
|
unlockTime: number;
|
|
276
276
|
}>;
|
|
277
|
-
crvLockIsApproved: (amount:
|
|
277
|
+
crvLockIsApproved: (amount: string | number) => Promise<boolean>;
|
|
278
278
|
calcCrvUnlockTime: (days: number | string, start?: number | string) => number;
|
|
279
|
-
claimableFees: (address?: string) => Promise<string>;
|
|
280
|
-
crvLockApprove: (amount:
|
|
281
|
-
createCrvLock: (amount:
|
|
282
|
-
increaseCrvLockedAmount: (amount:
|
|
283
|
-
increaseCrvUnlockTime: (days:
|
|
279
|
+
claimableFees: (address?: string | undefined) => Promise<string>;
|
|
280
|
+
crvLockApprove: (amount: string | number) => Promise<string[]>;
|
|
281
|
+
createCrvLock: (amount: string | number, days: string | number) => Promise<string>;
|
|
282
|
+
increaseCrvLockedAmount: (amount: string | number) => Promise<string>;
|
|
283
|
+
increaseCrvUnlockTime: (days: string | number) => Promise<string>;
|
|
284
284
|
withdrawLockedCrv: () => Promise<string>;
|
|
285
|
-
claimFees: (address?: string) => Promise<string>;
|
|
285
|
+
claimFees: (address?: string | undefined) => Promise<string>;
|
|
286
286
|
getVotingGaugeList: () => Promise<import("./interfaces.js").IVotingGauge[]>;
|
|
287
|
-
userGaugeVotes: (address?: string) => Promise<{
|
|
287
|
+
userGaugeVotes: (address?: string | undefined) => Promise<{
|
|
288
288
|
gauges: import("./interfaces.js").IGaugeUserVote[];
|
|
289
289
|
powerUsed: string;
|
|
290
290
|
veCrvUsed: string;
|
|
291
291
|
}>;
|
|
292
292
|
voteForGaugeNextTime: (gauge: string) => Promise<number>;
|
|
293
|
-
voteForGauge: (gauge: string, power:
|
|
293
|
+
voteForGauge: (gauge: string, power: string | number) => Promise<string>;
|
|
294
294
|
getProposalList: () => Promise<import("./interfaces.js").IDaoProposalListItem[]>;
|
|
295
295
|
getProposal: (type: "PARAMETER" | "OWNERSHIP", id: number) => Promise<import("./interfaces.js").IDaoProposal>;
|
|
296
|
-
userProposalVotes: (address?: string) => Promise<import("./interfaces.js").IDaoProposalUserListItem[]>;
|
|
296
|
+
userProposalVotes: (address?: string | undefined) => Promise<import("./interfaces.js").IDaoProposalUserListItem[]>;
|
|
297
297
|
voteForProposal: (type: import("./interfaces.js").TVoteType, id: number, support: boolean) => Promise<string>;
|
|
298
298
|
executeVote: (type: import("./interfaces.js").TVoteType, id: number) => Promise<string>;
|
|
299
299
|
isCanVoteExecute: (type: import("./interfaces.js").TVoteType, id: number) => Promise<boolean>;
|
|
300
300
|
estimateGas: {
|
|
301
|
-
crvLockApprove: (amount:
|
|
302
|
-
createCrvLock: (amount:
|
|
303
|
-
increaseCrvLockedAmount: (amount:
|
|
304
|
-
increaseCrvUnlockTime: (days:
|
|
301
|
+
crvLockApprove: (amount: string | number) => Promise<number | number[]>;
|
|
302
|
+
createCrvLock: (amount: string | number, days: string | number) => Promise<number | number[]>;
|
|
303
|
+
increaseCrvLockedAmount: (amount: string | number) => Promise<number | number[]>;
|
|
304
|
+
increaseCrvUnlockTime: (days: string | number) => Promise<number | number[]>;
|
|
305
305
|
withdrawLockedCrv: () => Promise<number | number[]>;
|
|
306
|
-
claimFees: (address?: string) => Promise<number | number[]>;
|
|
307
|
-
voteForGauge: (gauge: string, power:
|
|
306
|
+
claimFees: (address?: string | undefined) => Promise<number | number[]>;
|
|
307
|
+
voteForGauge: (gauge: string, power: string | number) => Promise<number | number[]>;
|
|
308
308
|
voteForProposal: (type: import("./interfaces.js").TVoteType, id: number, support: boolean) => Promise<number | number[]>;
|
|
309
309
|
executeVote: (type: import("./interfaces.js").TVoteType, id: number) => Promise<number | number[]>;
|
|
310
310
|
};
|
|
311
311
|
};
|
|
312
312
|
};
|
|
313
|
-
|
|
313
|
+
declare const _default: {
|
|
314
|
+
init: (this: ReturnType<typeof createCurve>, providerType: "JsonRpc" | "Web3" | "Infura" | "Alchemy" | "NoRPC", providerSettings: "NoRPC" | {
|
|
315
|
+
url?: string;
|
|
316
|
+
privateKey?: string;
|
|
317
|
+
batchMaxCount?: number;
|
|
318
|
+
} | {
|
|
319
|
+
externalProvider: ethers.Eip1193Provider;
|
|
320
|
+
} | {
|
|
321
|
+
network?: ethers.Networkish;
|
|
322
|
+
apiKey?: string;
|
|
323
|
+
}, options?: {
|
|
324
|
+
gasPrice?: number;
|
|
325
|
+
maxFeePerGas?: number;
|
|
326
|
+
maxPriorityFeePerGas?: number;
|
|
327
|
+
chainId?: number;
|
|
328
|
+
poolsData?: Record<import("./interfaces.js").IPoolType, import("./interfaces.js").IExtendedPoolDataFromApi>;
|
|
329
|
+
} | undefined) => Promise<void>;
|
|
330
|
+
chainId: number;
|
|
331
|
+
signerAddress: string;
|
|
332
|
+
setCustomFeeData: (customFeeData: {
|
|
333
|
+
gasPrice?: number;
|
|
334
|
+
maxFeePerGas?: number;
|
|
335
|
+
maxPriorityFeePerGas?: number;
|
|
336
|
+
}) => void;
|
|
337
|
+
getPoolList: () => string[];
|
|
338
|
+
getMainPoolList: () => string[];
|
|
339
|
+
getUserPoolListByLiquidity: (address?: string | undefined) => Promise<string[]>;
|
|
340
|
+
getUserPoolListByClaimable: (address?: string | undefined) => Promise<string[]>;
|
|
341
|
+
getUserPoolList: (address?: string | undefined, useApi?: boolean | undefined) => Promise<string[]>;
|
|
342
|
+
getUserLiquidityUSD: (pools: string[], address?: string | undefined) => Promise<string[]>;
|
|
343
|
+
getUserClaimable: (pools: string[], address?: string | undefined) => Promise<{
|
|
344
|
+
token: string;
|
|
345
|
+
symbol: string;
|
|
346
|
+
amount: string;
|
|
347
|
+
price: number;
|
|
348
|
+
}[][]>;
|
|
349
|
+
PoolTemplate: typeof PoolTemplate;
|
|
350
|
+
getBasePools: () => Promise<import("./interfaces.js").IBasePoolShortItem[]>;
|
|
351
|
+
getPool: (poolId: string) => PoolTemplate;
|
|
352
|
+
getUsdRate: (coin: string) => Promise<number>;
|
|
353
|
+
getGasPriceFromL1: () => Promise<number>;
|
|
354
|
+
getGasPriceFromL2: () => Promise<number>;
|
|
355
|
+
getGasInfoForL2: () => Promise<Record<string, number | null>>;
|
|
356
|
+
getGasPrice: () => Promise<number>;
|
|
357
|
+
getTVL: (chainId?: number | undefined) => Promise<number>;
|
|
358
|
+
getBalances: (...args: [coins: string[], ...addresses: string[]] | [coins: string[], ...addresses: string[][]]) => Promise<string[] | import("./interfaces.js").IDict<string[]>>;
|
|
359
|
+
getAllowance: (coins: string[], address: string, spender: string) => Promise<string[]>;
|
|
360
|
+
hasAllowance: (coins: string[], amounts: (string | number)[], address: string, spender: string) => Promise<boolean>;
|
|
361
|
+
ensureAllowance: (coins: string[], amounts: (string | number)[], spender: string, isMax?: boolean | undefined) => Promise<string[]>;
|
|
362
|
+
getCoinsData: (...args: string[] | string[][]) => Promise<{
|
|
363
|
+
name: string;
|
|
364
|
+
symbol: string;
|
|
365
|
+
decimals: number;
|
|
366
|
+
}[]>;
|
|
367
|
+
getVolume: (chainId?: number | undefined) => Promise<{
|
|
368
|
+
totalVolume: number;
|
|
369
|
+
cryptoVolume: number;
|
|
370
|
+
cryptoShare: number;
|
|
371
|
+
}>;
|
|
372
|
+
hasDepositAndStake: () => boolean;
|
|
373
|
+
hasRouter: () => boolean;
|
|
374
|
+
getCurveLiteNetworks: () => Promise<import("./interfaces.js").ICurveLiteNetwork[]>;
|
|
375
|
+
getNetworkConstants: () => import("./interfaces.js").INetworkConstants;
|
|
376
|
+
getIsLiteChain: () => boolean;
|
|
377
|
+
isNoRPC: boolean;
|
|
378
|
+
factory: {
|
|
379
|
+
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
380
|
+
fetchNewPools: () => Promise<string[]>;
|
|
381
|
+
getPoolList: () => string[];
|
|
382
|
+
deployPlainPool: (name: string, symbol: string, coins: string[], A: string | number, fee: string | number, assetType: 0 | 1 | 2 | 3, implementationIdx: 0 | 1 | 2 | 3 | 4 | 5, emaTime?: number | undefined, oracleAddress?: string | undefined, methodName?: string | undefined) => Promise<ethers.ContractTransactionResponse>;
|
|
383
|
+
setOracle: (poolAddress: string, oracleAddress?: string | undefined, methodName?: string | undefined) => Promise<ethers.ContractTransactionResponse>;
|
|
384
|
+
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A: string | number, fee: string | number, implementationIdx: 0 | 1) => Promise<ethers.ContractTransactionResponse>;
|
|
385
|
+
deployGauge: (poolAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
386
|
+
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
387
|
+
deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
388
|
+
getDeployedPlainPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
389
|
+
getDeployedMetaPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
390
|
+
getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
391
|
+
getDeployedGaugeMirrorAddress: (chainId: number) => Promise<string>;
|
|
392
|
+
getDeployedGaugeMirrorAddressByTx: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
393
|
+
fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
|
|
394
|
+
gaugeImplementation: () => string;
|
|
395
|
+
estimateGas: {
|
|
396
|
+
deployPlainPool: (name: string, symbol: string, coins: string[], A: string | number, fee: string | number, assetType: 0 | 1 | 2 | 3, implementationIdx: 0 | 1 | 2 | 3 | 4 | 5, emaTime?: number | undefined, oracleAddress?: string | undefined, methodName?: string | undefined) => Promise<number>;
|
|
397
|
+
setOracle: (poolAddress: string, oracleAddress?: string | undefined, methodName?: string | undefined) => Promise<number>;
|
|
398
|
+
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A: string | number, fee: string | number, implementationIdx: 0 | 1) => Promise<number>;
|
|
399
|
+
deployGauge: (poolAddress: string) => Promise<number>;
|
|
400
|
+
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<number>;
|
|
401
|
+
deployGaugeMirror: (chainId: number, salt: string) => Promise<number>;
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
crvUSDFactory: {
|
|
405
|
+
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
406
|
+
getPoolList: () => string[];
|
|
407
|
+
};
|
|
408
|
+
EYWAFactory: {
|
|
409
|
+
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
410
|
+
getPoolList: () => string[];
|
|
411
|
+
};
|
|
412
|
+
stableNgFactory: {
|
|
413
|
+
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
414
|
+
fetchNewPools: () => Promise<string[]>;
|
|
415
|
+
getPoolList: () => string[];
|
|
416
|
+
deployPlainPool: (name: string, symbol: string, coins: string[], A: string | number, fee: string | number, offpegFeeMultiplier: string | number, assetTypes: (0 | 1 | 2 | 3)[], implementationIdx: 0, emaTime: number, oracleAddresses: string[], methodNames: string[]) => Promise<ethers.ContractTransactionResponse>;
|
|
417
|
+
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A: string | number, fee: string | number, offpegFeeMultiplier: string | number, emaTime: number, implementationIdx: 0, assetType: 0 | 1 | 2 | 3, methodName: string, oracleAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
418
|
+
deployGauge: (poolAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
419
|
+
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
420
|
+
deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
421
|
+
getDeployedPlainPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
422
|
+
getDeployedMetaPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
423
|
+
getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
424
|
+
getDeployedGaugeMirrorAddress: (chainId: number) => Promise<string>;
|
|
425
|
+
getDeployedGaugeMirrorAddressByTx: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
426
|
+
fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
|
|
427
|
+
estimateGas: {
|
|
428
|
+
deployPlainPool: (name: string, symbol: string, coins: string[], A: string | number, fee: string | number, offpegFeeMultiplier: string | number, assetTypes: (0 | 1 | 2 | 3)[], implementationIdx: 0, emaTime: number, oracleAddresses: string[], methodNames: string[]) => Promise<number>;
|
|
429
|
+
deployMetaPool: (basePool: string, name: string, symbol: string, coin: string, A: string | number, fee: string | number, offpegFeeMultiplier: string | number, assetType: 0 | 1 | 2 | 3, emaTime: number, implementationIdx: 0, methodName: string, oracleAddress: string) => Promise<number>;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
cryptoFactory: {
|
|
433
|
+
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
434
|
+
fetchNewPools: () => Promise<string[]>;
|
|
435
|
+
getPoolList: () => string[];
|
|
436
|
+
deployPool: (name: string, symbol: string, coins: string[], A: string | number, gamma: string | number, midFee: string | number, outFee: string | number, allowedExtraProfit: string | number, feeGamma: string | number, adjustmentStep: string | number, maHalfTime: number, initialPrice: string | number) => Promise<ethers.ContractTransactionResponse>;
|
|
437
|
+
deployGauge: (poolAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
438
|
+
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
439
|
+
deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
440
|
+
getDeployedPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
441
|
+
getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
442
|
+
getDeployedGaugeMirrorAddress: (chainId: number) => Promise<string>;
|
|
443
|
+
getDeployedGaugeMirrorAddressByTx: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
444
|
+
fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
|
|
445
|
+
gaugeImplementation: () => string;
|
|
446
|
+
estimateGas: {
|
|
447
|
+
deployPool: typeof deployCryptoPoolEstimateGas;
|
|
448
|
+
deployGauge: (poolAddress: string) => Promise<number>;
|
|
449
|
+
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<number>;
|
|
450
|
+
deployGaugeMirror: (chainId: number, salt: string) => Promise<number>;
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
twocryptoFactory: {
|
|
454
|
+
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
455
|
+
fetchNewPools: () => Promise<string[]>;
|
|
456
|
+
getPoolList: () => string[];
|
|
457
|
+
deployPool: (name: string, symbol: string, coins: string[], A: string | number, gamma: string | number, midFee: string | number, outFee: string | number, allowedExtraProfit: string | number, feeGamma: string | number, adjustmentStep: string | number, maHalfTime: number, initialPrice: string | number) => Promise<ethers.ContractTransactionResponse>;
|
|
458
|
+
deployGauge: (poolAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
459
|
+
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
460
|
+
deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
461
|
+
getDeployedPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
462
|
+
getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
463
|
+
getDeployedGaugeMirrorAddress: (chainId: number) => Promise<string>;
|
|
464
|
+
getDeployedGaugeMirrorAddressByTx: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
465
|
+
fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
|
|
466
|
+
gaugeImplementation: () => string;
|
|
467
|
+
estimateGas: {
|
|
468
|
+
deployPool: typeof deployTwocryptoPoolEstimateGas;
|
|
469
|
+
deployGauge: (poolAddress: string) => Promise<number>;
|
|
470
|
+
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<number>;
|
|
471
|
+
deployGaugeMirror: (chainId: number, salt: string) => Promise<number>;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
tricryptoFactory: {
|
|
475
|
+
fetchPools: (useApi?: boolean) => Promise<void>;
|
|
476
|
+
fetchNewPools: () => Promise<string[]>;
|
|
477
|
+
getPoolList: () => string[];
|
|
478
|
+
deployPool: (name: string, symbol: string, coins: string[], A: string | number, gamma: string | number, midFee: string | number, outFee: string | number, allowedExtraProfit: string | number, feeGamma: string | number, adjustmentStep: string | number, emaTime: number, initialPrices: (string | number)[]) => Promise<ethers.ContractTransactionResponse>;
|
|
479
|
+
deployGauge: (poolAddress: string) => Promise<ethers.ContractTransactionResponse>;
|
|
480
|
+
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
481
|
+
deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
|
|
482
|
+
getDeployedPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
483
|
+
getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
484
|
+
getDeployedGaugeMirrorAddress: (chainId: number) => Promise<string>;
|
|
485
|
+
getDeployedGaugeMirrorAddressByTx: (tx: ethers.ContractTransactionResponse) => Promise<string>;
|
|
486
|
+
fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
|
|
487
|
+
gaugeImplementation: () => string;
|
|
488
|
+
estimateGas: {
|
|
489
|
+
deployPool: (name: string, symbol: string, coins: string[], A: string | number, gamma: string | number, midFee: string | number, outFee: string | number, allowedExtraProfit: string | number, feeGamma: string | number, adjustmentStep: string | number, emaTime: number, initialPrices: (string | number)[]) => Promise<number>;
|
|
490
|
+
deployGauge: (poolAddress: string) => Promise<number>;
|
|
491
|
+
deployGaugeSidechain: (poolAddress: string, salt: string) => Promise<number>;
|
|
492
|
+
deployGaugeMirror: (chainId: number, salt: string) => Promise<number>;
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
estimateGas: {
|
|
496
|
+
ensureAllowance: (coins: string[], amounts: (string | number)[], spender: string, isMax?: boolean | undefined) => Promise<number | number[]>;
|
|
497
|
+
};
|
|
498
|
+
boosting: {
|
|
499
|
+
getCrv: (...args: string[] | string[][]) => Promise<string | import("./interfaces.js").IDict<string>>;
|
|
500
|
+
getLockedAmountAndUnlockTime: (...args: string[] | string[][]) => Promise<import("./interfaces.js").IDict<{
|
|
501
|
+
lockedAmount: string;
|
|
502
|
+
unlockTime: number;
|
|
503
|
+
}> | {
|
|
504
|
+
lockedAmount: string;
|
|
505
|
+
unlockTime: number;
|
|
506
|
+
}>;
|
|
507
|
+
getVeCrv: (...args: string[] | string[][]) => Promise<string | import("./interfaces.js").IDict<string>>;
|
|
508
|
+
getVeCrvPct: (...args: string[] | string[][]) => Promise<string | import("./interfaces.js").IDict<string>>;
|
|
509
|
+
calcUnlockTime: (days: number, start?: number) => number;
|
|
510
|
+
isApproved: (amount: string | number) => Promise<boolean>;
|
|
511
|
+
approve: (amount: string | number) => Promise<string[]>;
|
|
512
|
+
createLock: (amount: string | number, days: number) => Promise<string>;
|
|
513
|
+
increaseAmount: (amount: string | number) => Promise<string>;
|
|
514
|
+
increaseUnlockTime: (days: number) => Promise<string>;
|
|
515
|
+
withdrawLockedCrv: () => Promise<string>;
|
|
516
|
+
claimableFees: (address?: string | undefined) => Promise<string>;
|
|
517
|
+
claimFees: (address?: string | undefined) => Promise<string>;
|
|
518
|
+
claimableFeesCrvUSD: (address?: string | undefined) => Promise<string>;
|
|
519
|
+
claimFeesCrvUSD: (address?: string | undefined) => Promise<string>;
|
|
520
|
+
calculateVeCrv: (amount: number | string, unlockTimestamp: number) => number;
|
|
521
|
+
estimateGas: {
|
|
522
|
+
approve: (amount: string | number) => Promise<number | number[]>;
|
|
523
|
+
createLock: (amount: string | number, days: number) => Promise<number>;
|
|
524
|
+
increaseAmount: (amount: string | number) => Promise<number>;
|
|
525
|
+
increaseUnlockTime: (days: number) => Promise<number>;
|
|
526
|
+
withdrawLockedCrv: () => Promise<number>;
|
|
527
|
+
claimFees: (address?: string | undefined) => Promise<number>;
|
|
528
|
+
claimFeesCrvUSD: (address?: string | undefined) => Promise<number>;
|
|
529
|
+
};
|
|
530
|
+
sidechain: {
|
|
531
|
+
lastEthBlock: () => Promise<number>;
|
|
532
|
+
getAnycallBalance: () => Promise<string>;
|
|
533
|
+
topUpAnycall: (amount?: string | number | undefined) => Promise<string>;
|
|
534
|
+
lastBlockSent: (chainId: number) => Promise<number>;
|
|
535
|
+
blockToSend: () => Promise<number>;
|
|
536
|
+
sendBlockhash: (block: number, chainId: number) => Promise<string>;
|
|
537
|
+
submitProof: (block: number, address?: string | undefined) => Promise<string>;
|
|
538
|
+
estimateGas: {
|
|
539
|
+
topUpAnycall: (amount?: string | number | undefined) => Promise<number>;
|
|
540
|
+
sendBlockhash: (block: number, chainId: number) => Promise<number>;
|
|
541
|
+
submitProof: (block: number, address?: string | undefined) => Promise<number>;
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
router: {
|
|
546
|
+
getBestRouteAndOutput: (inputCoin: string, outputCoin: string, amount: string | number) => Promise<{
|
|
547
|
+
route: import("./interfaces.js").IRoute;
|
|
548
|
+
output: string;
|
|
549
|
+
}>;
|
|
550
|
+
getArgs: (route: import("./interfaces.js").IRoute) => {
|
|
551
|
+
_route: string[];
|
|
552
|
+
_swapParams: number[][];
|
|
553
|
+
_pools?: string[];
|
|
554
|
+
_basePools?: string[];
|
|
555
|
+
_baseTokens?: string[];
|
|
556
|
+
_secondBasePools?: string[];
|
|
557
|
+
_secondBaseTokens?: string[];
|
|
558
|
+
};
|
|
559
|
+
expected: (inputCoin: string, outputCoin: string, amount: string | number) => Promise<string>;
|
|
560
|
+
required: (inputCoin: string, outputCoin: string, outAmount: string | number) => Promise<string>;
|
|
561
|
+
priceImpact: (inputCoin: string, outputCoin: string, amount: string | number) => Promise<number>;
|
|
562
|
+
isApproved: (inputCoin: string, amount: string | number) => Promise<boolean>;
|
|
563
|
+
approve: (inputCoin: string, amount: string | number) => Promise<string[]>;
|
|
564
|
+
swap: (inputCoin: string, outputCoin: string, amount: string | number, slippage?: number | undefined) => Promise<ethers.ContractTransactionResponse>;
|
|
565
|
+
getSwappedAmount: (tx: ethers.ContractTransactionResponse, outputCoin: string) => Promise<string>;
|
|
566
|
+
estimateGas: {
|
|
567
|
+
approve: (inputCoin: string, amount: string | number) => Promise<number | number[]>;
|
|
568
|
+
swap: (inputCoin: string, outputCoin: string, amount: string | number) => Promise<number | number[]>;
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
dao: {
|
|
572
|
+
crvSupplyStats: () => Promise<{
|
|
573
|
+
circulating: string;
|
|
574
|
+
locked: string;
|
|
575
|
+
total: string;
|
|
576
|
+
veCrv: string;
|
|
577
|
+
averageLockTime: string;
|
|
578
|
+
}>;
|
|
579
|
+
userCrv: (address?: string | undefined) => Promise<string>;
|
|
580
|
+
userVeCrv: (address?: string | undefined) => Promise<{
|
|
581
|
+
veCrv: string;
|
|
582
|
+
veCrvPct: string;
|
|
583
|
+
lockedCrv: string;
|
|
584
|
+
unlockTime: number;
|
|
585
|
+
}>;
|
|
586
|
+
crvLockIsApproved: (amount: string | number) => Promise<boolean>;
|
|
587
|
+
calcCrvUnlockTime: (days: number | string, start?: number | string) => number;
|
|
588
|
+
claimableFees: (address?: string | undefined) => Promise<string>;
|
|
589
|
+
crvLockApprove: (amount: string | number) => Promise<string[]>;
|
|
590
|
+
createCrvLock: (amount: string | number, days: string | number) => Promise<string>;
|
|
591
|
+
increaseCrvLockedAmount: (amount: string | number) => Promise<string>;
|
|
592
|
+
increaseCrvUnlockTime: (days: string | number) => Promise<string>;
|
|
593
|
+
withdrawLockedCrv: () => Promise<string>;
|
|
594
|
+
claimFees: (address?: string | undefined) => Promise<string>;
|
|
595
|
+
getVotingGaugeList: () => Promise<import("./interfaces.js").IVotingGauge[]>;
|
|
596
|
+
userGaugeVotes: (address?: string | undefined) => Promise<{
|
|
597
|
+
gauges: import("./interfaces.js").IGaugeUserVote[];
|
|
598
|
+
powerUsed: string;
|
|
599
|
+
veCrvUsed: string;
|
|
600
|
+
}>;
|
|
601
|
+
voteForGaugeNextTime: (gauge: string) => Promise<number>;
|
|
602
|
+
voteForGauge: (gauge: string, power: string | number) => Promise<string>;
|
|
603
|
+
getProposalList: () => Promise<import("./interfaces.js").IDaoProposalListItem[]>;
|
|
604
|
+
getProposal: (type: "PARAMETER" | "OWNERSHIP", id: number) => Promise<import("./interfaces.js").IDaoProposal>;
|
|
605
|
+
userProposalVotes: (address?: string | undefined) => Promise<import("./interfaces.js").IDaoProposalUserListItem[]>;
|
|
606
|
+
voteForProposal: (type: import("./interfaces.js").TVoteType, id: number, support: boolean) => Promise<string>;
|
|
607
|
+
executeVote: (type: import("./interfaces.js").TVoteType, id: number) => Promise<string>;
|
|
608
|
+
isCanVoteExecute: (type: import("./interfaces.js").TVoteType, id: number) => Promise<boolean>;
|
|
609
|
+
estimateGas: {
|
|
610
|
+
crvLockApprove: (amount: string | number) => Promise<number | number[]>;
|
|
611
|
+
createCrvLock: (amount: string | number, days: string | number) => Promise<number | number[]>;
|
|
612
|
+
increaseCrvLockedAmount: (amount: string | number) => Promise<number | number[]>;
|
|
613
|
+
increaseCrvUnlockTime: (days: string | number) => Promise<number | number[]>;
|
|
614
|
+
withdrawLockedCrv: () => Promise<number | number[]>;
|
|
615
|
+
claimFees: (address?: string | undefined) => Promise<number | number[]>;
|
|
616
|
+
voteForGauge: (gauge: string, power: string | number) => Promise<number | number[]>;
|
|
617
|
+
voteForProposal: (type: import("./interfaces.js").TVoteType, id: number, support: boolean) => Promise<number | number[]>;
|
|
618
|
+
executeVote: (type: import("./interfaces.js").TVoteType, id: number) => Promise<number | number[]>;
|
|
619
|
+
};
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
export default _default;
|