@gearbox-protocol/sdk 1.27.2 → 1.27.3
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/contracts/Tokens.sol +0 -4
- package/contracts/TokensData.sol +4 -4
- package/lib/contracts/contractsRegister.d.ts +1 -6
- package/lib/contracts/contractsRegister.js +6 -24
- package/lib/oracles/priceFeeds.js +28 -28
- package/lib/tokens/token.js +4 -4
- package/lib/tokens/tokens.spec.js +21 -2
- package/lib/utils/multicall.d.ts +2 -2
- package/package.json +1 -1
package/contracts/Tokens.sol
CHANGED
package/contracts/TokensData.sol
CHANGED
|
@@ -167,12 +167,9 @@ tokenDataByNetwork[42161].push(TokenData({ id: Tokens.RDNT, addr: 0x3082CC23568e
|
|
|
167
167
|
tokenDataByNetwork[42161].push(TokenData({ id: Tokens.BAL, addr: 0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8, symbol: "BAL", tokenType: TokenType.NORMAL_TOKEN }));
|
|
168
168
|
|
|
169
169
|
|
|
170
|
-
tokenDataByNetwork[42161].push(TokenData({ id: Tokens.crvFRAX, addr: 0xc9b8a3fdecb9d5b218d02555a8baf332e5b740d5, symbol: "crvFRAX", tokenType: TokenType.CURVE_LP_TOKEN }));
|
|
171
|
-
tokenDataByNetwork[42161].push(TokenData({ id: Tokens.steCRV, addr: 0x06325440d014e39736583c165c2963ba99faf14e, symbol: "steCRV", tokenType: TokenType.CURVE_LP_TOKEN }));
|
|
172
170
|
|
|
173
171
|
|
|
174
172
|
|
|
175
|
-
tokenDataByNetwork[42161].push(TokenData({ id: Tokens.crvUSDTWBTCWETH, addr: 0x8e0b8c8bb9db49a46697f3a5bb8a308e744821d2, symbol: "crvUSDTWBTCWETH", tokenType: TokenType.CURVE_LP_TOKEN }));
|
|
176
173
|
|
|
177
174
|
|
|
178
175
|
|
|
@@ -212,7 +209,10 @@ tokenDataByNetwork[42161].push(TokenData({ id: Tokens.crvUSDTWBTCWETH, addr: 0x8
|
|
|
212
209
|
|
|
213
210
|
|
|
214
211
|
|
|
215
|
-
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
tokenDataByNetwork[42161].push(TokenData({ id: Tokens._50OHM_50WETH, addr: 0x89dc7e71e362faF88D92288fE2311D25c6a1B5E0, symbol: "50OHM_50WETH", tokenType: TokenType.BALANCER_LP_TOKEN }));
|
|
216
216
|
|
|
217
217
|
tokenDataByNetwork[42161].push(TokenData({ id: Tokens.aDAI, addr: 0x82E64f49Ed5EC1bC6e43DAD4FC8Af9bb3A2312EE, symbol: "aDAI", tokenType: TokenType.AAVE_V2_A_TOKEN }));
|
|
218
218
|
tokenDataByNetwork[42161].push(TokenData({ id: Tokens.aUSDC, addr: 0x724dc807b04555b71ed48a6896b6F41593b8C637, symbol: "aUSDC", tokenType: TokenType.AAVE_V2_A_TOKEN }));
|
|
@@ -6,11 +6,6 @@ export declare const CREDIT_MANAGER_WETH_V2_MAINNET: string;
|
|
|
6
6
|
export declare const CREDIT_MANAGER_WSTETH_V2_MAINNET: string;
|
|
7
7
|
export declare const CREDIT_MANAGER_WBTC_V2_MAINNET: string;
|
|
8
8
|
export declare const CREDIT_MANAGER_FRAX_V2_MAINNET: string;
|
|
9
|
-
export
|
|
10
|
-
export declare const CREDIT_MANAGER_USDC_V2_ARBITRUM: string;
|
|
11
|
-
export declare const CREDIT_MANAGER_WETH_V2_ARBITRUM: string;
|
|
12
|
-
export declare const CREDIT_MANAGER_WSTETH_V2_ARBITRUM: string;
|
|
13
|
-
export declare const CREDIT_MANAGER_WBTC_V2_ARBITRUM: string;
|
|
14
|
-
export type CreditManagersV2 = typeof CREDIT_MANAGER_DAI_V2_MAINNET | typeof CREDIT_MANAGER_USDC_V2_MAINNET | typeof CREDIT_MANAGER_WETH_V2_MAINNET | typeof CREDIT_MANAGER_WSTETH_V2_MAINNET | typeof CREDIT_MANAGER_WBTC_V2_MAINNET | typeof CREDIT_MANAGER_DAI_V2_ARBITRUM | typeof CREDIT_MANAGER_USDC_V2_ARBITRUM | typeof CREDIT_MANAGER_WETH_V2_ARBITRUM | typeof CREDIT_MANAGER_WSTETH_V2_ARBITRUM | typeof CREDIT_MANAGER_WBTC_V2_ARBITRUM | typeof CREDIT_MANAGER_FRAX_V2_MAINNET;
|
|
9
|
+
export type CreditManagersV2 = typeof CREDIT_MANAGER_DAI_V2_MAINNET | typeof CREDIT_MANAGER_USDC_V2_MAINNET | typeof CREDIT_MANAGER_WETH_V2_MAINNET | typeof CREDIT_MANAGER_WSTETH_V2_MAINNET | typeof CREDIT_MANAGER_WBTC_V2_MAINNET | typeof CREDIT_MANAGER_FRAX_V2_MAINNET;
|
|
15
10
|
export declare const deployedContracts: Record<string, string>;
|
|
16
11
|
export declare function getContractName(address: string): string;
|
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getContractName = exports.deployedContracts = exports.
|
|
3
|
+
exports.getContractName = exports.deployedContracts = exports.CREDIT_MANAGER_FRAX_V2_MAINNET = exports.CREDIT_MANAGER_WBTC_V2_MAINNET = exports.CREDIT_MANAGER_WSTETH_V2_MAINNET = exports.CREDIT_MANAGER_WETH_V2_MAINNET = exports.CREDIT_MANAGER_USDC_V2_MAINNET = exports.CREDIT_MANAGER_DAI_V2_MAINNET = exports.stEthPoolWrapper = void 0;
|
|
4
4
|
const mappers_1 = require("../utils/mappers");
|
|
5
5
|
const contracts_1 = require("./contracts");
|
|
6
6
|
exports.stEthPoolWrapper = {
|
|
7
7
|
Mainnet: "0x5a97e3E43dCBFe620ccF7865739075f92E93F5E4",
|
|
8
8
|
Arbitrum: "0x3fe62a62C022A069952069b32C9d56718D30B7ec",
|
|
9
9
|
};
|
|
10
|
-
exports.CREDIT_MANAGER_DAI_V2_MAINNET = "
|
|
10
|
+
exports.CREDIT_MANAGER_DAI_V2_MAINNET = "0x672461Bfc20DD783444a830Ad4c38b345aB6E2f7".toLowerCase();
|
|
11
11
|
exports.CREDIT_MANAGER_USDC_V2_MAINNET = "0x95357303f995e184A7998dA6C6eA35cC728A1900".toLowerCase();
|
|
12
|
-
exports.CREDIT_MANAGER_WETH_V2_MAINNET = "
|
|
13
|
-
exports.CREDIT_MANAGER_WSTETH_V2_MAINNET = "
|
|
14
|
-
exports.CREDIT_MANAGER_WBTC_V2_MAINNET = "
|
|
15
|
-
exports.CREDIT_MANAGER_FRAX_V2_MAINNET = "
|
|
16
|
-
// Arbitrum
|
|
17
|
-
exports.CREDIT_MANAGER_DAI_V2_ARBITRUM = "0xf7ba434952acaa2e12035a2c3643ca327914a470".toLowerCase();
|
|
18
|
-
exports.CREDIT_MANAGER_USDC_V2_ARBITRUM = "0x2144a7785baecbab32295188285717cad6c1a11c".toLowerCase();
|
|
19
|
-
exports.CREDIT_MANAGER_WETH_V2_ARBITRUM = "0x2ad4a2f1bdd815e285a22cdcc072fbb43818b09b".toLowerCase();
|
|
20
|
-
exports.CREDIT_MANAGER_WSTETH_V2_ARBITRUM = "0x40d542a5c15b2c0c65af047984c285c2c30847af".toLowerCase();
|
|
21
|
-
exports.CREDIT_MANAGER_WBTC_V2_ARBITRUM = "0x6546dd4e8d507e3e45bb924818c0bad2a3aa2c5f".toLowerCase();
|
|
12
|
+
exports.CREDIT_MANAGER_WETH_V2_MAINNET = "0x5887ad4Cb2352E7F01527035fAa3AE0Ef2cE2b9B".toLowerCase();
|
|
13
|
+
exports.CREDIT_MANAGER_WSTETH_V2_MAINNET = "0xe0bCE4460795281d39c91da9B0275BcA968293de".toLowerCase();
|
|
14
|
+
exports.CREDIT_MANAGER_WBTC_V2_MAINNET = "0xc62BF8a7889AdF1c5Dc4665486c7683ae6E74e0F".toLowerCase();
|
|
15
|
+
exports.CREDIT_MANAGER_FRAX_V2_MAINNET = "0xA3E1e0d58FE8dD8C9dd48204699a1178f1B274D8".toLowerCase();
|
|
22
16
|
exports.deployedContracts = {
|
|
23
17
|
// MAINNET
|
|
24
18
|
"0x777E23A2AcB2fCbB35f6ccF98272d03C722Ba6EB": "DAI",
|
|
@@ -39,18 +33,6 @@ exports.deployedContracts = {
|
|
|
39
33
|
[exports.CREDIT_MANAGER_WSTETH_V2_MAINNET]: "wstETH",
|
|
40
34
|
[exports.CREDIT_MANAGER_WBTC_V2_MAINNET]: "WBTC",
|
|
41
35
|
[exports.CREDIT_MANAGER_FRAX_V2_MAINNET]: "FRAX",
|
|
42
|
-
// Arbitrum CM
|
|
43
|
-
[exports.CREDIT_MANAGER_DAI_V2_ARBITRUM]: "DAI",
|
|
44
|
-
[exports.CREDIT_MANAGER_USDC_V2_ARBITRUM]: "USDC",
|
|
45
|
-
[exports.CREDIT_MANAGER_WETH_V2_ARBITRUM]: "WETH",
|
|
46
|
-
[exports.CREDIT_MANAGER_WSTETH_V2_ARBITRUM]: "wstETH",
|
|
47
|
-
[exports.CREDIT_MANAGER_WBTC_V2_ARBITRUM]: "WBTC",
|
|
48
|
-
// Arbitrum pools
|
|
49
|
-
"0xfb422e503f8b768184aba5e73587543d1c871a23": "DAI",
|
|
50
|
-
"0x7c14c88f672d5513c8fa640fa48815f40c781a60": "USDC",
|
|
51
|
-
"0x13376d637ded73a0df20d192f691a88c8af7dd0a": "ETH/WETH",
|
|
52
|
-
"0x3f926a46893af659c2768f118d5f189190baa15c": "WBTC",
|
|
53
|
-
"0xbdf0395fa6f134b8de35ef30c61b2b9711cbd67a": "wstETH",
|
|
54
36
|
};
|
|
55
37
|
const contractNames = Object.entries(contracts_1.contractsByAddress).reduce((acc, [addr, cSymbol]) => {
|
|
56
38
|
const params = contracts_1.contractParams[cSymbol];
|
|
@@ -9,35 +9,35 @@ exports.priceFeedsByNetwork = {
|
|
|
9
9
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
10
10
|
address: {
|
|
11
11
|
Mainnet: "0xc929ad75B72593967DE83E7F7Cda0493458261D9",
|
|
12
|
-
Arbitrum: "
|
|
12
|
+
Arbitrum: "0x4bC735Ef24bf286983024CAd5D03f0738865Aaef",
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
AAVE: {
|
|
16
16
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
17
17
|
address: {
|
|
18
18
|
Mainnet: "0x547a514d5e3769680Ce22B2361c10Ea13619e8a9",
|
|
19
|
-
Arbitrum: "
|
|
19
|
+
Arbitrum: "0xaD1d5344AaDE45F43E596773Bcc4c423EAbdD034",
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
COMP: {
|
|
23
23
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
24
24
|
address: {
|
|
25
25
|
Mainnet: "0xdbd020CAeF83eFd542f4De03e3cF0C28A4428bd5",
|
|
26
|
-
Arbitrum: "
|
|
26
|
+
Arbitrum: "0xe7C53FFd03Eb6ceF7d208bC4C13446c76d1E5884",
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
CRV: {
|
|
30
30
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
31
31
|
address: {
|
|
32
32
|
Mainnet: "0xCd627aA160A6fA45Eb793D19Ef54f5062F20f33f",
|
|
33
|
-
Arbitrum: "
|
|
33
|
+
Arbitrum: "0xaebDA2c976cfd1eE1977Eac079B4382acb849325",
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
DAI: {
|
|
37
37
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
38
38
|
address: {
|
|
39
39
|
Mainnet: "0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9",
|
|
40
|
-
Arbitrum: "
|
|
40
|
+
Arbitrum: "0xc5C8E77B397E531B8EC06BFb0048328B30E9eCfB",
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
DPI: {
|
|
@@ -65,60 +65,60 @@ exports.priceFeedsByNetwork = {
|
|
|
65
65
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
66
66
|
address: {
|
|
67
67
|
Mainnet: "0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c",
|
|
68
|
-
Arbitrum: "
|
|
68
|
+
Arbitrum: "0x86E53CF1B870786351Da77A57575e79CB55812CB",
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
SNX: {
|
|
72
72
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
73
73
|
address: {
|
|
74
74
|
Mainnet: "0xDC3EA94CD0AC27d9A86C180091e7f78C683d3699",
|
|
75
|
-
Arbitrum: "
|
|
75
|
+
Arbitrum: "0x054296f0D036b95531B4E14aFB578B80CFb41252",
|
|
76
76
|
},
|
|
77
77
|
},
|
|
78
78
|
UNI: {
|
|
79
79
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
80
80
|
address: {
|
|
81
81
|
Mainnet: "0x553303d460EE0afB37EdFf9bE42922D8FF63220e",
|
|
82
|
-
Arbitrum: "
|
|
82
|
+
Arbitrum: "0x9C917083fDb403ab5ADbEC26Ee294f6EcAda2720",
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
85
|
USDC: {
|
|
86
86
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
87
87
|
address: {
|
|
88
88
|
Mainnet: "0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6",
|
|
89
|
-
Arbitrum: "
|
|
89
|
+
Arbitrum: "0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3",
|
|
90
90
|
},
|
|
91
91
|
},
|
|
92
92
|
USDT: {
|
|
93
93
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
94
94
|
address: {
|
|
95
95
|
Mainnet: "0x3E7d1eAB13ad0104d2750B8863b489D65364e32D",
|
|
96
|
-
Arbitrum: "
|
|
96
|
+
Arbitrum: "0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7",
|
|
97
97
|
},
|
|
98
98
|
},
|
|
99
99
|
WBTC: {
|
|
100
100
|
type: oracles_1.OracleType.COMPOSITE_ORACLE,
|
|
101
101
|
targetToBasePriceFeed: {
|
|
102
102
|
Mainnet: "0xfdFD9C85aD200c506Cf9e21F1FD8dd01932FBB23",
|
|
103
|
-
Arbitrum: "
|
|
103
|
+
Arbitrum: "0x0017abAc5b6f291F9164e35B1234CA1D697f9CF4",
|
|
104
104
|
},
|
|
105
105
|
baseToUsdPriceFeed: {
|
|
106
106
|
Mainnet: "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c",
|
|
107
|
-
Arbitrum: "
|
|
107
|
+
Arbitrum: "0x6ce185860a4963106506C203335A2910413708e9",
|
|
108
108
|
},
|
|
109
109
|
},
|
|
110
110
|
WETH: {
|
|
111
111
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
112
112
|
address: {
|
|
113
113
|
Mainnet: "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
|
|
114
|
-
Arbitrum: "
|
|
114
|
+
Arbitrum: "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612",
|
|
115
115
|
},
|
|
116
116
|
},
|
|
117
117
|
YFI: {
|
|
118
118
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
119
119
|
address: {
|
|
120
120
|
Mainnet: "0xA027702dbb89fbd58938e4324ac03B58d812b0E1",
|
|
121
|
-
Arbitrum: "
|
|
121
|
+
Arbitrum: "0x745Ab5b69E01E2BE1104Ca84937Bb71f96f5fB21",
|
|
122
122
|
},
|
|
123
123
|
},
|
|
124
124
|
/// UPDATE
|
|
@@ -126,11 +126,11 @@ exports.priceFeedsByNetwork = {
|
|
|
126
126
|
type: oracles_1.OracleType.COMPOSITE_ORACLE,
|
|
127
127
|
targetToBasePriceFeed: {
|
|
128
128
|
Mainnet: "0x86392dC19c0b719886221c78AB11eb8Cf5c52812",
|
|
129
|
-
Arbitrum: "
|
|
129
|
+
Arbitrum: "0xded2c52b75B24732e9107377B7Ba93eC1fFa4BAf",
|
|
130
130
|
},
|
|
131
131
|
baseToUsdPriceFeed: {
|
|
132
132
|
Mainnet: "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
|
|
133
|
-
Arbitrum: "
|
|
133
|
+
Arbitrum: "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612",
|
|
134
134
|
},
|
|
135
135
|
},
|
|
136
136
|
wstETH: {
|
|
@@ -141,21 +141,21 @@ exports.priceFeedsByNetwork = {
|
|
|
141
141
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
142
142
|
address: {
|
|
143
143
|
Mainnet: "0xd962fC30A72A84cE50161031391756Bf2876Af5D",
|
|
144
|
-
Arbitrum: "
|
|
144
|
+
Arbitrum: "0x851175a919f36c8e30197c09a9A49dA932c2CC00",
|
|
145
145
|
},
|
|
146
146
|
},
|
|
147
147
|
FRAX: {
|
|
148
148
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
149
149
|
address: {
|
|
150
150
|
Mainnet: "0xB9E1E3A9feFf48998E45Fa90847ed4D467E8BcfD",
|
|
151
|
-
Arbitrum: "
|
|
151
|
+
Arbitrum: "0x0809E3d38d1B4214958faf06D8b1B1a2b73f2ab8",
|
|
152
152
|
},
|
|
153
153
|
},
|
|
154
154
|
LUSD: {
|
|
155
155
|
type: oracles_1.OracleType.BOUNDED_ORACLE,
|
|
156
156
|
targetPriceFeed: {
|
|
157
157
|
Mainnet: "0x3D7aE7E594f2f2091Ad8798313450130d0Aba3a0",
|
|
158
|
-
Arbitrum: "
|
|
158
|
+
Arbitrum: "0x0411D28c94d85A36bC72Cb0f875dfA8371D8fFfF",
|
|
159
159
|
},
|
|
160
160
|
upperBound: (BigInt(1e8) * 11n) / 10n,
|
|
161
161
|
},
|
|
@@ -170,7 +170,7 @@ exports.priceFeedsByNetwork = {
|
|
|
170
170
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
171
171
|
address: {
|
|
172
172
|
Mainnet: "0x6Ebc52C8C1089be9eB3945C4350B68B8E4C2233f",
|
|
173
|
-
Arbitrum: "
|
|
173
|
+
Arbitrum: "0x36a121448D74Fa81450c992A1a44B9b7377CD3a5",
|
|
174
174
|
},
|
|
175
175
|
},
|
|
176
176
|
LDO: {
|
|
@@ -181,7 +181,7 @@ exports.priceFeedsByNetwork = {
|
|
|
181
181
|
},
|
|
182
182
|
baseToUsdPriceFeed: {
|
|
183
183
|
Mainnet: "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
|
|
184
|
-
Arbitrum: "
|
|
184
|
+
Arbitrum: "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612",
|
|
185
185
|
},
|
|
186
186
|
// ADD ETH-> DAI Oracle!
|
|
187
187
|
},
|
|
@@ -196,7 +196,7 @@ exports.priceFeedsByNetwork = {
|
|
|
196
196
|
},
|
|
197
197
|
baseToUsdPriceFeed: {
|
|
198
198
|
Mainnet: "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
|
|
199
|
-
Arbitrum: "
|
|
199
|
+
Arbitrum: "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612",
|
|
200
200
|
},
|
|
201
201
|
},
|
|
202
202
|
MIM: {
|
|
@@ -210,21 +210,21 @@ exports.priceFeedsByNetwork = {
|
|
|
210
210
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
211
211
|
address: {
|
|
212
212
|
Mainnet: "0x8c110B94C5f1d347fAcF5E1E938AB2db60E3c9a8",
|
|
213
|
-
Arbitrum: "
|
|
213
|
+
Arbitrum: "0x383b3624478124697BEF675F07cA37570b73992f",
|
|
214
214
|
},
|
|
215
215
|
},
|
|
216
216
|
GMX: {
|
|
217
217
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
218
218
|
address: {
|
|
219
219
|
Mainnet: constants_1.NOT_DEPLOYED,
|
|
220
|
-
Arbitrum: "
|
|
220
|
+
Arbitrum: "0xDB98056FecFff59D032aB628337A4887110df3dB",
|
|
221
221
|
},
|
|
222
222
|
},
|
|
223
223
|
ARB: {
|
|
224
224
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
225
225
|
address: {
|
|
226
226
|
Mainnet: constants_1.NOT_DEPLOYED,
|
|
227
|
-
Arbitrum: "
|
|
227
|
+
Arbitrum: "0xb2A824043730FE05F3DA2efaFa1CBbe83fa548D6",
|
|
228
228
|
},
|
|
229
229
|
},
|
|
230
230
|
SHIB: {
|
|
@@ -237,14 +237,14 @@ exports.priceFeedsByNetwork = {
|
|
|
237
237
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
238
238
|
address: {
|
|
239
239
|
Mainnet: constants_1.NOT_DEPLOYED,
|
|
240
|
-
Arbitrum: "
|
|
240
|
+
Arbitrum: "0x20d0Fcab0ECFD078B036b6CAf1FaC69A6453b352",
|
|
241
241
|
},
|
|
242
242
|
},
|
|
243
243
|
BAL: {
|
|
244
244
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
245
245
|
address: {
|
|
246
|
-
Mainnet: "
|
|
247
|
-
Arbitrum: "
|
|
246
|
+
Mainnet: "0xdF2917806E30300537aEB49A7663062F4d1F2b5F",
|
|
247
|
+
Arbitrum: "0xBE5eA816870D11239c543F84b71439511D70B94f",
|
|
248
248
|
},
|
|
249
249
|
},
|
|
250
250
|
yvDAI: {
|
package/lib/tokens/token.js
CHANGED
|
@@ -189,8 +189,8 @@ exports.tokenDataByNetwork = {
|
|
|
189
189
|
yvCurve_FRAX: constants_1.NOT_DEPLOYED,
|
|
190
190
|
// CURVE LP TOKENS
|
|
191
191
|
"3Crv": constants_1.NOT_DEPLOYED,
|
|
192
|
-
crvFRAX:
|
|
193
|
-
steCRV:
|
|
192
|
+
crvFRAX: constants_1.NOT_DEPLOYED,
|
|
193
|
+
steCRV: constants_1.NOT_DEPLOYED,
|
|
194
194
|
FRAX3CRV: constants_1.NOT_DEPLOYED,
|
|
195
195
|
LUSD3CRV: constants_1.NOT_DEPLOYED,
|
|
196
196
|
crvPlain3andSUSD: constants_1.NOT_DEPLOYED,
|
|
@@ -199,7 +199,7 @@ exports.tokenDataByNetwork = {
|
|
|
199
199
|
MIM_3LP3CRV: constants_1.NOT_DEPLOYED,
|
|
200
200
|
crvCRVETH: constants_1.NOT_DEPLOYED,
|
|
201
201
|
crvCVXETH: constants_1.NOT_DEPLOYED,
|
|
202
|
-
crvUSDTWBTCWETH:
|
|
202
|
+
crvUSDTWBTCWETH: constants_1.NOT_DEPLOYED,
|
|
203
203
|
LDOETH: constants_1.NOT_DEPLOYED,
|
|
204
204
|
// CONVEX LP TOKENS
|
|
205
205
|
cvx3Crv: constants_1.NOT_DEPLOYED,
|
|
@@ -231,7 +231,7 @@ exports.tokenDataByNetwork = {
|
|
|
231
231
|
stkcvxLDOETH: constants_1.NOT_DEPLOYED,
|
|
232
232
|
// BALANCER TOKENS
|
|
233
233
|
"50OHM_50DAI": constants_1.NOT_DEPLOYED,
|
|
234
|
-
"50OHM_50WETH": "
|
|
234
|
+
"50OHM_50WETH": "0x89dc7e71e362faF88D92288fE2311D25c6a1B5E0",
|
|
235
235
|
OHM_wstETH: constants_1.NOT_DEPLOYED,
|
|
236
236
|
// GEARBOX
|
|
237
237
|
dDAI: constants_1.NOT_DEPLOYED,
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
/* eslint-disable max-nested-callbacks */
|
|
6
7
|
const ethers_1 = require("ethers");
|
|
7
8
|
const chains_1 = require("../core/chains");
|
|
8
9
|
const types_1 = require("../types");
|
|
@@ -93,6 +94,22 @@ class TokenSuite {
|
|
|
93
94
|
throw new Error(`Expected ${expectedSymbol} but found ${r.symbol} at ${r.address}`);
|
|
94
95
|
}
|
|
95
96
|
}
|
|
97
|
+
assertChecksum(sdkSymbol) {
|
|
98
|
+
const sdkAddress = token_1.tokenDataByNetwork[this.network][sdkSymbol];
|
|
99
|
+
let err;
|
|
100
|
+
try {
|
|
101
|
+
const addr = ethers_1.ethers.utils.getAddress(sdkAddress);
|
|
102
|
+
if (addr !== sdkAddress) {
|
|
103
|
+
err = new Error(`sdk address for token ${sdkSymbol} is not checksummed: expected ${addr}, got ${sdkAddress}`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
catch (e) {
|
|
107
|
+
err = new Error(`sdk address ${sdkAddress} for token ${sdkSymbol} has bad checksum: ${e}`);
|
|
108
|
+
}
|
|
109
|
+
if (err) {
|
|
110
|
+
throw err;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
96
113
|
sanitize(symbol) {
|
|
97
114
|
return symbol.replace(/\-f$/, "").replaceAll("-", "_");
|
|
98
115
|
}
|
|
@@ -105,10 +122,12 @@ describe("Tokens", () => {
|
|
|
105
122
|
});
|
|
106
123
|
suites.forEach(suite => {
|
|
107
124
|
suite.calls.forEach(call => {
|
|
108
|
-
|
|
109
|
-
it(`${call.key} on ${suite.network}`, () => {
|
|
125
|
+
it(`symbol for ${call.key} on ${suite.network}`, () => {
|
|
110
126
|
suite.assertSymbol(call.key);
|
|
111
127
|
});
|
|
128
|
+
it(`address checksum for ${call.key} on ${suite.network}`, () => {
|
|
129
|
+
suite.assertChecksum(call.key);
|
|
130
|
+
});
|
|
112
131
|
});
|
|
113
132
|
});
|
|
114
133
|
});
|
package/lib/utils/multicall.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export interface MCall<T extends ethers.utils.Interface> {
|
|
|
10
10
|
method: keyof T["functions"];
|
|
11
11
|
params?: any;
|
|
12
12
|
}
|
|
13
|
-
export interface KeyedCall<T extends ethers.utils.Interface> extends MCall<T> {
|
|
14
|
-
key:
|
|
13
|
+
export interface KeyedCall<T extends ethers.utils.Interface, K = string> extends MCall<T> {
|
|
14
|
+
key: K;
|
|
15
15
|
}
|
|
16
16
|
export declare function multicall<R extends Array<any>>(calls: Array<MCall<any>>, p: Signer | ethers.providers.Provider, overrides?: CallOverrides): Promise<R>;
|
|
17
17
|
/**
|