@curvefi/api 2.64.0 → 2.65.0
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.
|
@@ -2,8 +2,11 @@ import { lowerCaseValues } from "../utils.js";
|
|
|
2
2
|
export const COINS_ETHEREUM = lowerCaseValues({
|
|
3
3
|
crv: "0xD533a949740bb3306d119CC777fa900bA034cd52",
|
|
4
4
|
// --- USD ---
|
|
5
|
-
'crvusd': "0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E",
|
|
6
5
|
'3crv': "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490",
|
|
6
|
+
crvusd: "0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E",
|
|
7
|
+
scrvusd: "0x0655977FEb2f289A4aB78af67BAB0d17aAb84367",
|
|
8
|
+
usde: "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3",
|
|
9
|
+
susde: "0x9D39A5DE30e57443BfF2A8307A4256c8797A3497",
|
|
7
10
|
ycdai: "0x99d1Fa417f94dcD62BfE781a1213c092a47041Bc",
|
|
8
11
|
ycusdc: "0x9777d7E2b60bB01759D0E2f8be2095df444cb07E",
|
|
9
12
|
ycusdt: "0x1bE5d71F2dA660BFdee8012dDc58D024448A0A59",
|
|
@@ -11,7 +11,8 @@ const ALIASES_ETHEREUM = lowerCaseValues({
|
|
|
11
11
|
"fee_distributor_crvusd": "0xD16d5eC345Dd86Fb63C6a9C43c517210F1027914",
|
|
12
12
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
13
13
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
14
|
-
"router": "0x16C6521Dff6baB339122a0FE25a9116693265353",
|
|
14
|
+
// "router": "0x16C6521Dff6baB339122a0FE25a9116693265353", v1.1.0
|
|
15
|
+
"router": "0x45312ea0eFf7E09C83CBE249fa1d7598c4C8cd4e",
|
|
15
16
|
"deposit_and_stake": "0x56C526b0159a258887e0d79ec3a80dfb940d0cD7",
|
|
16
17
|
"stable_calc": "0x0DCDED3545D565bA3B19E683431381007245d983",
|
|
17
18
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
package/lib/curve.js
CHANGED
|
@@ -513,6 +513,8 @@ class Curve {
|
|
|
513
513
|
this.setContract(this.constants.NATIVE_TOKEN.wrappedAddress, ERC20Abi);
|
|
514
514
|
this.setContract(this.constants.ALIASES.crv, ERC20Abi);
|
|
515
515
|
this.constants.DECIMALS[this.constants.ALIASES.crv] = 18;
|
|
516
|
+
this.setContract(this.constants.COINS.scrvusd, ERC20Abi);
|
|
517
|
+
this.constants.DECIMALS[this.constants.COINS.scrvusd] = 18;
|
|
516
518
|
if (this.chainId === 1) {
|
|
517
519
|
this.setContract(this.constants.ALIASES.minter, minterMainnetABI);
|
|
518
520
|
this.setContract(this.constants.ALIASES.fee_distributor_crvusd, feeDistributorCrvUSDABI);
|
|
@@ -102,7 +102,7 @@ export function routeGraphWorker() {
|
|
|
102
102
|
swapAddress: constants.COINS.sfrxeth,
|
|
103
103
|
inputCoinAddress: constants.COINS.frxeth,
|
|
104
104
|
outputCoinAddress: constants.COINS.sfrxeth,
|
|
105
|
-
swapParams: [0,
|
|
105
|
+
swapParams: [0, 1, 9, 0, 0],
|
|
106
106
|
poolAddress: constants.ZERO_ADDRESS,
|
|
107
107
|
basePool: constants.ZERO_ADDRESS,
|
|
108
108
|
baseToken: constants.ZERO_ADDRESS,
|
|
@@ -116,7 +116,55 @@ export function routeGraphWorker() {
|
|
|
116
116
|
swapAddress: constants.COINS.sfrxeth,
|
|
117
117
|
inputCoinAddress: constants.COINS.sfrxeth,
|
|
118
118
|
outputCoinAddress: constants.COINS.frxeth,
|
|
119
|
-
swapParams: [
|
|
119
|
+
swapParams: [1, 0, 9, 0, 0],
|
|
120
|
+
poolAddress: constants.ZERO_ADDRESS,
|
|
121
|
+
basePool: constants.ZERO_ADDRESS,
|
|
122
|
+
baseToken: constants.ZERO_ADDRESS,
|
|
123
|
+
secondBasePool: constants.ZERO_ADDRESS,
|
|
124
|
+
secondBaseToken: constants.ZERO_ADDRESS,
|
|
125
|
+
tvl: Infinity,
|
|
126
|
+
}];
|
|
127
|
+
}
|
|
128
|
+
// crvUSD <-> scrvUSD (Ethereum only)
|
|
129
|
+
if (chainId === 1) {
|
|
130
|
+
routerGraph[constants.COINS.crvusd] = {};
|
|
131
|
+
routerGraph[constants.COINS.crvusd][constants.COINS.scrvusd] = [{
|
|
132
|
+
poolId: "scrvUSD wrapper",
|
|
133
|
+
swapAddress: constants.COINS.scrvusd,
|
|
134
|
+
inputCoinAddress: constants.COINS.crvusd,
|
|
135
|
+
outputCoinAddress: constants.COINS.scrvusd,
|
|
136
|
+
swapParams: [0, 1, 9, 0, 0],
|
|
137
|
+
poolAddress: constants.ZERO_ADDRESS,
|
|
138
|
+
basePool: constants.ZERO_ADDRESS,
|
|
139
|
+
baseToken: constants.ZERO_ADDRESS,
|
|
140
|
+
secondBasePool: constants.ZERO_ADDRESS,
|
|
141
|
+
secondBaseToken: constants.ZERO_ADDRESS,
|
|
142
|
+
tvl: Infinity,
|
|
143
|
+
}];
|
|
144
|
+
routerGraph[constants.COINS.scrvusd] = {};
|
|
145
|
+
routerGraph[constants.COINS.scrvusd][constants.COINS.crvusd] = [{
|
|
146
|
+
poolId: "scrvUSD wrapper",
|
|
147
|
+
swapAddress: constants.COINS.scrvusd,
|
|
148
|
+
inputCoinAddress: constants.COINS.scrvusd,
|
|
149
|
+
outputCoinAddress: constants.COINS.crvusd,
|
|
150
|
+
swapParams: [1, 0, 9, 0, 0],
|
|
151
|
+
poolAddress: constants.ZERO_ADDRESS,
|
|
152
|
+
basePool: constants.ZERO_ADDRESS,
|
|
153
|
+
baseToken: constants.ZERO_ADDRESS,
|
|
154
|
+
secondBasePool: constants.ZERO_ADDRESS,
|
|
155
|
+
secondBaseToken: constants.ZERO_ADDRESS,
|
|
156
|
+
tvl: Infinity,
|
|
157
|
+
}];
|
|
158
|
+
}
|
|
159
|
+
// USDe -> sUSDe (Ethereum only)
|
|
160
|
+
if (chainId === 1) {
|
|
161
|
+
routerGraph[constants.COINS.usde] = {};
|
|
162
|
+
routerGraph[constants.COINS.usde][constants.COINS.susde] = [{
|
|
163
|
+
poolId: "sUSDe wrapper",
|
|
164
|
+
swapAddress: constants.COINS.susde,
|
|
165
|
+
inputCoinAddress: constants.COINS.usde,
|
|
166
|
+
outputCoinAddress: constants.COINS.susde,
|
|
167
|
+
swapParams: [0, 1, 9, 0, 0],
|
|
120
168
|
poolAddress: constants.ZERO_ADDRESS,
|
|
121
169
|
basePool: constants.ZERO_ADDRESS,
|
|
122
170
|
baseToken: constants.ZERO_ADDRESS,
|