@curvefi/api 2.54.3 → 2.54.5
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/constants/abis/deposit_and_stake.json +7 -4
- package/lib/constants/aliases.js +13 -13
- package/lib/constants/tricryptoDeployImplementations.d.ts +68 -0
- package/lib/constants/tricryptoDeployImplementations.js +68 -0
- package/lib/curve.js +6 -6
- package/lib/factory/deploy.js +3 -2
- package/lib/pools/PoolTemplate.js +3 -8
- package/package.json +1 -1
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "coins",
|
|
25
|
-
"type": "address[
|
|
25
|
+
"type": "address[]"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"name": "amounts",
|
|
29
|
-
"type": "uint256[
|
|
29
|
+
"type": "uint256[]"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"name": "min_mint_amount",
|
|
@@ -36,13 +36,16 @@
|
|
|
36
36
|
"name": "use_underlying",
|
|
37
37
|
"type": "bool"
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
"name": "is_plain_stable_ng",
|
|
41
|
+
"type": "bool"
|
|
42
|
+
},
|
|
39
43
|
{
|
|
40
44
|
"name": "pool",
|
|
41
45
|
"type": "address"
|
|
42
46
|
}
|
|
43
47
|
],
|
|
44
|
-
"outputs": []
|
|
45
|
-
"gas": "409532"
|
|
48
|
+
"outputs": []
|
|
46
49
|
},
|
|
47
50
|
{
|
|
48
51
|
"stateMutability": "payable",
|
package/lib/constants/aliases.js
CHANGED
|
@@ -8,7 +8,7 @@ export var ALIASES_ETHEREUM = lowerCaseValues({
|
|
|
8
8
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
9
9
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
10
10
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
11
|
-
"deposit_and_stake": "
|
|
11
|
+
"deposit_and_stake": "0xBFab8ebc836E1c4D81837798FC076D219C9a1855",
|
|
12
12
|
"stable_calc": "0x0DCDED3545D565bA3B19E683431381007245d983",
|
|
13
13
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
14
14
|
"factory": '0xb9fc157394af804a3578134a6585c0dc9cc990d4',
|
|
@@ -30,7 +30,7 @@ export var ALIASES_POLYGON = lowerCaseValues({
|
|
|
30
30
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
31
31
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
32
32
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
33
|
-
"deposit_and_stake": "
|
|
33
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
34
34
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
35
35
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
36
36
|
"factory": '0x722272d36ef0da72ff51c5a65db7b870e2e8d4ee',
|
|
@@ -49,7 +49,7 @@ export var ALIASES_FANTOM = lowerCaseValues({
|
|
|
49
49
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
50
50
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
51
51
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
52
|
-
"deposit_and_stake": "
|
|
52
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
53
53
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
54
54
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
55
55
|
"factory": "0x686d67265703d1f124c45e33d47d794c566889ba",
|
|
@@ -68,7 +68,7 @@ export var ALIASES_AVALANCHE = lowerCaseValues({
|
|
|
68
68
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
69
69
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
70
70
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
71
|
-
"deposit_and_stake": "
|
|
71
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
72
72
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
73
73
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
74
74
|
"factory": '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
|
|
@@ -87,7 +87,7 @@ export var ALIASES_ARBITRUM = lowerCaseValues({
|
|
|
87
87
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
88
88
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
89
89
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
90
|
-
"deposit_and_stake": "
|
|
90
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
91
91
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
92
92
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
93
93
|
"factory": '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
|
|
@@ -106,7 +106,7 @@ export var ALIASES_OPTIMISM = lowerCaseValues({
|
|
|
106
106
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
107
107
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
108
108
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
109
|
-
"deposit_and_stake": "
|
|
109
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
110
110
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
111
111
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
112
112
|
"factory": '0x2db0E83599a91b508Ac268a6197b8B14F5e72840',
|
|
@@ -126,7 +126,7 @@ export var ALIASES_XDAI = lowerCaseValues({
|
|
|
126
126
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
127
127
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
128
128
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
129
|
-
"deposit_and_stake": "
|
|
129
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
130
130
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
131
131
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
132
132
|
"factory": '0xD19Baeadc667Cf2015e395f2B08668Ef120f41F5',
|
|
@@ -145,7 +145,7 @@ export var ALIASES_MOONBEAM = lowerCaseValues({
|
|
|
145
145
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
146
146
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
147
147
|
"router": "0x0000000000000000000000000000000000000000",
|
|
148
|
-
"deposit_and_stake": "
|
|
148
|
+
"deposit_and_stake": "0x0000000000000000000000000000000000000000",
|
|
149
149
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
150
150
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
151
151
|
"factory": '0x4244eB811D6e0Ef302326675207A95113dB4E1F8',
|
|
@@ -164,7 +164,7 @@ export var ALIASES_AURORA = lowerCaseValues({
|
|
|
164
164
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
165
165
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
166
166
|
"router": "0x0000000000000000000000000000000000000000",
|
|
167
|
-
"deposit_and_stake": "
|
|
167
|
+
"deposit_and_stake": "0x0000000000000000000000000000000000000000",
|
|
168
168
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
169
169
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
170
170
|
"factory": '0xb9fc157394af804a3578134a6585c0dc9cc990d4',
|
|
@@ -183,7 +183,7 @@ export var ALIASES_KAVA = lowerCaseValues({
|
|
|
183
183
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
184
184
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
185
185
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
186
|
-
"deposit_and_stake": "
|
|
186
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
187
187
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
188
188
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
189
189
|
"factory": '0x40bc62805471eF53DdD5C5cF99ed3d9e5aa81b48',
|
|
@@ -202,7 +202,7 @@ export var ALIASES_CELO = lowerCaseValues({
|
|
|
202
202
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
203
203
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
204
204
|
"router": "0x0000000000000000000000000000000000000000",
|
|
205
|
-
"deposit_and_stake": "
|
|
205
|
+
"deposit_and_stake": "0x0000000000000000000000000000000000000000",
|
|
206
206
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
207
207
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
208
208
|
"factory": '0x5277A0226d10392295E8D383E9724D6E416d6e6C',
|
|
@@ -240,7 +240,7 @@ export var ALIASES_BASE = lowerCaseValues({
|
|
|
240
240
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
241
241
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
242
242
|
"router": "0xd6681e74eEA20d196c15038C580f721EF2aB6320",
|
|
243
|
-
"deposit_and_stake": "
|
|
243
|
+
"deposit_and_stake": "0x69522fb5337663d3B4dFB0030b881c1A750Adb4f",
|
|
244
244
|
"stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
|
|
245
245
|
"crypto_calc": '0xEfadDdE5B43917CcC738AdE6962295A0B343f7CE',
|
|
246
246
|
"factory": '0x3093f9B57A428F3EB6285a589cb35bEA6e78c336',
|
|
@@ -260,7 +260,7 @@ export var ALIASES_BSC = lowerCaseValues({
|
|
|
260
260
|
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
261
261
|
"address_provider": "0x0000000000000000000000000000000000000000",
|
|
262
262
|
"router": "0x69522fb5337663d3B4dFB0030b881c1A750Adb4f",
|
|
263
|
-
"deposit_and_stake": "
|
|
263
|
+
"deposit_and_stake": "0x4f37A9d177470499A2dD084621020b023fcffc1F",
|
|
264
264
|
"stable_calc": "0x0fE38dCC905eC14F6099a83Ac5C93BF2601300CF",
|
|
265
265
|
"crypto_calc": '0xd6681e74eEA20d196c15038C580f721EF2aB6320',
|
|
266
266
|
"factory": '0xEfDE221f306152971D8e9f181bFe998447975810',
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export declare const tricryptoDeployImplementations: {
|
|
2
|
+
1: {
|
|
3
|
+
amm_native_transfers_disabled: string;
|
|
4
|
+
amm_native_transfers_enabled: string;
|
|
5
|
+
implementationIdx: number;
|
|
6
|
+
};
|
|
7
|
+
10: {
|
|
8
|
+
amm_native_transfers_disabled: string;
|
|
9
|
+
amm_native_transfers_enabled: string;
|
|
10
|
+
implementationIdx: number;
|
|
11
|
+
};
|
|
12
|
+
56: {
|
|
13
|
+
amm_native_transfers_disabled: string;
|
|
14
|
+
amm_native_transfers_enabled: string;
|
|
15
|
+
implementationIdx: number;
|
|
16
|
+
};
|
|
17
|
+
100: {
|
|
18
|
+
amm_native_transfers_disabled: string;
|
|
19
|
+
amm_native_transfers_enabled: string;
|
|
20
|
+
implementationIdx: number;
|
|
21
|
+
};
|
|
22
|
+
137: {
|
|
23
|
+
amm_native_transfers_disabled: string;
|
|
24
|
+
amm_native_transfers_enabled: string;
|
|
25
|
+
implementationIdx: number;
|
|
26
|
+
};
|
|
27
|
+
250: {
|
|
28
|
+
amm_native_transfers_disabled: string;
|
|
29
|
+
amm_native_transfers_enabled: string;
|
|
30
|
+
implementationIdx: number;
|
|
31
|
+
};
|
|
32
|
+
324: {
|
|
33
|
+
implementationIdx: number;
|
|
34
|
+
};
|
|
35
|
+
1284: {
|
|
36
|
+
implementationIdx: number;
|
|
37
|
+
};
|
|
38
|
+
2222: {
|
|
39
|
+
amm_native_transfers_disabled: string;
|
|
40
|
+
amm_native_transfers_enabled: string;
|
|
41
|
+
implementationIdx: number;
|
|
42
|
+
};
|
|
43
|
+
8453: {
|
|
44
|
+
amm_native_transfers_disabled: string;
|
|
45
|
+
amm_native_transfers_enabled: string;
|
|
46
|
+
implementationIdx: number;
|
|
47
|
+
};
|
|
48
|
+
42161: {
|
|
49
|
+
amm_native_transfers_disabled: string;
|
|
50
|
+
amm_native_transfers_enabled: string;
|
|
51
|
+
implementationIdx: number;
|
|
52
|
+
};
|
|
53
|
+
42220: {
|
|
54
|
+
amm_native_transfers_disabled: string;
|
|
55
|
+
amm_native_transfers_enabled: string;
|
|
56
|
+
implementationIdx: number;
|
|
57
|
+
};
|
|
58
|
+
43114: {
|
|
59
|
+
amm_native_transfers_disabled: string;
|
|
60
|
+
amm_native_transfers_enabled: string;
|
|
61
|
+
implementationIdx: number;
|
|
62
|
+
};
|
|
63
|
+
1313161554: {
|
|
64
|
+
amm_native_transfers_disabled: string;
|
|
65
|
+
amm_native_transfers_enabled: string;
|
|
66
|
+
implementationIdx: number;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export var tricryptoDeployImplementations = {
|
|
2
|
+
1: {
|
|
3
|
+
amm_native_transfers_disabled: '0x0000000000000000000000000000000000000000',
|
|
4
|
+
amm_native_transfers_enabled: '0x66442B0C5260B92cAa9c234ECf2408CBf6b19a6f',
|
|
5
|
+
implementationIdx: 0,
|
|
6
|
+
},
|
|
7
|
+
10: {
|
|
8
|
+
amm_native_transfers_disabled: '0x0458ea5F4CD00E873264Be2031Ceb8f9d9b3116c',
|
|
9
|
+
amm_native_transfers_enabled: '0x1FE2a06c8bd81AE65FD1C5036451890b37976369',
|
|
10
|
+
implementationIdx: 1,
|
|
11
|
+
},
|
|
12
|
+
56: {
|
|
13
|
+
amm_native_transfers_disabled: '0x6A8cbed756804B16E05E741eDaBd5cB544AE21bf',
|
|
14
|
+
amm_native_transfers_enabled: '0xBff334F8D5912AC5c4f2c590A2396d1C5d990123',
|
|
15
|
+
implementationIdx: 1,
|
|
16
|
+
},
|
|
17
|
+
100: {
|
|
18
|
+
amm_native_transfers_disabled: '0x3f445D38E820c010a7A6E33c5F80cBEBE6930f61',
|
|
19
|
+
amm_native_transfers_enabled: '0xa54f3c1dfa5f7dbf2564829d14b3b74a65d26ae2',
|
|
20
|
+
implementationIdx: 1,
|
|
21
|
+
},
|
|
22
|
+
137: {
|
|
23
|
+
amm_native_transfers_disabled: '0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a',
|
|
24
|
+
amm_native_transfers_enabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
|
|
25
|
+
implementationIdx: 1,
|
|
26
|
+
},
|
|
27
|
+
250: {
|
|
28
|
+
amm_native_transfers_disabled: '0xd125E7a0cEddF89c6473412d85835450897be6Dc',
|
|
29
|
+
amm_native_transfers_enabled: '0x76303e4fDcA0AbF28aB3ee42Ce086E6503431F1D',
|
|
30
|
+
implementationIdx: 1,
|
|
31
|
+
},
|
|
32
|
+
324: {
|
|
33
|
+
implementationIdx: 0,
|
|
34
|
+
},
|
|
35
|
+
1284: {
|
|
36
|
+
implementationIdx: 0,
|
|
37
|
+
},
|
|
38
|
+
2222: {
|
|
39
|
+
amm_native_transfers_disabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
|
|
40
|
+
amm_native_transfers_enabled: '0xFAbC421e3368D158d802684A217a83c083c94CeB',
|
|
41
|
+
implementationIdx: 1,
|
|
42
|
+
},
|
|
43
|
+
8453: {
|
|
44
|
+
amm_native_transfers_disabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
|
|
45
|
+
amm_native_transfers_enabled: '0xa274c88e09fDF1798a7517096557e6c1bEa1f65A',
|
|
46
|
+
implementationIdx: 1,
|
|
47
|
+
},
|
|
48
|
+
42161: {
|
|
49
|
+
amm_native_transfers_disabled: '0x1f7C86AffE5bCF7a1D74a8c8E2ef9E03BF31c1BD',
|
|
50
|
+
amm_native_transfers_enabled: '0xd7E72f3615aa65b92A4DBdC211E296a35512988B',
|
|
51
|
+
implementationIdx: 1,
|
|
52
|
+
},
|
|
53
|
+
42220: {
|
|
54
|
+
amm_native_transfers_disabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
|
|
55
|
+
amm_native_transfers_enabled: '0xFAbC421e3368D158d802684A217a83c083c94CeB',
|
|
56
|
+
implementationIdx: 1,
|
|
57
|
+
},
|
|
58
|
+
43114: {
|
|
59
|
+
amm_native_transfers_disabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
|
|
60
|
+
amm_native_transfers_enabled: '0xFAbC421e3368D158d802684A217a83c083c94CeB',
|
|
61
|
+
implementationIdx: 1,
|
|
62
|
+
},
|
|
63
|
+
1313161554: {
|
|
64
|
+
amm_native_transfers_disabled: '0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a',
|
|
65
|
+
amm_native_transfers_enabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
|
|
66
|
+
implementationIdx: 1,
|
|
67
|
+
},
|
|
68
|
+
};
|
package/lib/curve.js
CHANGED
|
@@ -530,8 +530,8 @@ var Curve = /** @class */ (function () {
|
|
|
530
530
|
return __generator(this, function (_k) {
|
|
531
531
|
switch (_k.label) {
|
|
532
532
|
case 0:
|
|
533
|
-
if (
|
|
534
|
-
return [2 /*return*/];
|
|
533
|
+
if ([324, 1284].includes(this.chainId))
|
|
534
|
+
return [2 /*return*/];
|
|
535
535
|
if (!useApi) return [3 /*break*/, 2];
|
|
536
536
|
_a = this.constants;
|
|
537
537
|
_b = lowerCasePoolDataAddresses;
|
|
@@ -673,8 +673,8 @@ var Curve = /** @class */ (function () {
|
|
|
673
673
|
return __generator(this, function (_b) {
|
|
674
674
|
switch (_b.label) {
|
|
675
675
|
case 0:
|
|
676
|
-
if (
|
|
677
|
-
return [2 /*return*/, []];
|
|
676
|
+
if ([324, 1284].includes(this.chainId))
|
|
677
|
+
return [2 /*return*/, []];
|
|
678
678
|
currentPoolIds = Object.keys(this.constants.TRICRYPTO_FACTORY_POOLS_DATA);
|
|
679
679
|
lastPoolIdx = currentPoolIds.length === 0 ? -1 : Number(currentPoolIds[currentPoolIds.length - 1].split("-")[2]);
|
|
680
680
|
_a = lowerCasePoolDataAddresses;
|
|
@@ -743,8 +743,8 @@ var Curve = /** @class */ (function () {
|
|
|
743
743
|
return __generator(this, function (_b) {
|
|
744
744
|
switch (_b.label) {
|
|
745
745
|
case 0:
|
|
746
|
-
if (
|
|
747
|
-
return [2 /*return*/, ''];
|
|
746
|
+
if ([324, 1284].includes(this.chainId))
|
|
747
|
+
return [2 /*return*/, ''];
|
|
748
748
|
_a = lowerCasePoolDataAddresses;
|
|
749
749
|
return [4 /*yield*/, getTricryptoFactoryPoolData.call(this, 0, poolAddress)];
|
|
750
750
|
case 1:
|
package/lib/factory/deploy.js
CHANGED
|
@@ -60,6 +60,7 @@ import { getPool } from "../pools/index.js";
|
|
|
60
60
|
import { parseUnits, BN, mulBy1_3, getPoolIdBySwapAddress, DIGas, smartNumber } from '../utils.js';
|
|
61
61
|
import CurveLpTokenV5ABI from "../constants/abis/curve_lp_token_v5.json" assert { type: 'json' };
|
|
62
62
|
import Plain2ETHOracleABIABI from "../constants/abis/factory-v2/Plain2ETHOracle.json" assert { type: 'json' };
|
|
63
|
+
import { tricryptoDeployImplementations } from "../constants/tricryptoDeployImplementations.js";
|
|
63
64
|
// ------- STABLE PLAIN POOLS -------
|
|
64
65
|
var _deployStablePlainPool = function (name, symbol, coins, A, fee, // %
|
|
65
66
|
assetType, // 0 = USD, 1 = ETH, 2 = BTC, 3 = Other
|
|
@@ -636,7 +637,7 @@ initialPrices, estimateGas) { return __awaiter(void 0, void 0, void 0, function
|
|
|
636
637
|
_emaTime = parseUnits(Math.floor(emaTime / Math.log(2)), 0);
|
|
637
638
|
_initialPrices = [parseUnits(initialPrices[0]), parseUnits(initialPrices[1])];
|
|
638
639
|
contract = curve.contracts[curve.constants.ALIASES.tricrypto_factory].contract;
|
|
639
|
-
return [4 /*yield*/, contract.deploy_pool.estimateGas(name, symbol, coins, curve.constants.ZERO_ADDRESS,
|
|
640
|
+
return [4 /*yield*/, contract.deploy_pool.estimateGas(name, symbol, coins, curve.constants.ZERO_ADDRESS, tricryptoDeployImplementations[curve.chainId].implementationIdx, _A, _gamma, _midFee, _outFee, _feeGamma, _allowedExtraProfit, _adjustmentStep, _emaTime, _initialPrices, curve.constantOptions)];
|
|
640
641
|
case 1:
|
|
641
642
|
gas = _a.sent();
|
|
642
643
|
if (estimateGas)
|
|
@@ -645,7 +646,7 @@ initialPrices, estimateGas) { return __awaiter(void 0, void 0, void 0, function
|
|
|
645
646
|
return [4 /*yield*/, curve.updateFeeData()];
|
|
646
647
|
case 2:
|
|
647
648
|
_a.sent();
|
|
648
|
-
return [4 /*yield*/, contract.deploy_pool(name, symbol, coins, curve.constants.NATIVE_TOKEN.wrappedAddress,
|
|
649
|
+
return [4 /*yield*/, contract.deploy_pool(name, symbol, coins, curve.constants.NATIVE_TOKEN.wrappedAddress, tricryptoDeployImplementations[curve.chainId].implementationIdx, _A, _gamma, _midFee, _outFee, _feeGamma, _allowedExtraProfit, _adjustmentStep, _emaTime, _initialPrices, __assign(__assign({}, curve.options), { gasLimit: gasLimit }))];
|
|
649
650
|
case 3: return [2 /*return*/, _a.sent()];
|
|
650
651
|
}
|
|
651
652
|
});
|
|
@@ -2260,7 +2260,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
2260
2260
|
};
|
|
2261
2261
|
PoolTemplate.prototype._depositAndStake = function (amounts, slippage, isUnderlying, estimateGas) {
|
|
2262
2262
|
return __awaiter(this, void 0, void 0, function () {
|
|
2263
|
-
var coinAddresses, coins, decimals, depositAddress, balances, _c, _d, _e, _f, _g, i, allowance, _h, _amounts, contract, useUnderlying, _expectedLpTokenAmount, _j, _k, _l, _m, _o, minAmountBN, _minMintAmount, ethIndex, value,
|
|
2263
|
+
var coinAddresses, coins, decimals, depositAddress, balances, _c, _d, _e, _f, _g, i, allowance, _h, _amounts, contract, useUnderlying, _expectedLpTokenAmount, _j, _k, _l, _m, _o, minAmountBN, _minMintAmount, ethIndex, value, _gas, gasLimit;
|
|
2264
2264
|
return __generator(this, function (_q) {
|
|
2265
2265
|
switch (_q.label) {
|
|
2266
2266
|
case 0:
|
|
@@ -2336,12 +2336,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
2336
2336
|
_minMintAmount = fromBN(minAmountBN);
|
|
2337
2337
|
ethIndex = getEthIndex(coinAddresses);
|
|
2338
2338
|
value = _amounts[ethIndex] || curve.parseUnits("0");
|
|
2339
|
-
|
|
2340
|
-
for (i = 0; i < maxCoins; i++) {
|
|
2341
|
-
coinAddresses[i] = coinAddresses[i] || curve.constants.ZERO_ADDRESS;
|
|
2342
|
-
_amounts[i] = _amounts[i] || curve.parseUnits("0");
|
|
2343
|
-
}
|
|
2344
|
-
return [4 /*yield*/, contract.deposit_and_stake.estimateGas(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.constantOptions), { value: value }))];
|
|
2339
|
+
return [4 /*yield*/, contract.deposit_and_stake.estimateGas(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, this.isStableNg && this.isPlain, this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.constantOptions), { value: value }))];
|
|
2345
2340
|
case 17:
|
|
2346
2341
|
_gas = (_q.sent());
|
|
2347
2342
|
if (estimateGas)
|
|
@@ -2350,7 +2345,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
2350
2345
|
case 18:
|
|
2351
2346
|
_q.sent();
|
|
2352
2347
|
gasLimit = DIGas(_gas) * curve.parseUnits("200", 0) / curve.parseUnits("100", 0);
|
|
2353
|
-
return [4 /*yield*/, contract.deposit_and_stake(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.options), { gasLimit: gasLimit, value: value }))];
|
|
2348
|
+
return [4 /*yield*/, contract.deposit_and_stake(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, this.isStableNg && this.isPlain, this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.options), { gasLimit: gasLimit, value: value }))];
|
|
2354
2349
|
case 19: return [2 /*return*/, (_q.sent()).hash];
|
|
2355
2350
|
}
|
|
2356
2351
|
});
|