@curvefi/api 2.43.0 → 2.43.1
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.
|
@@ -12,6 +12,7 @@ export declare class PoolTemplate {
|
|
|
12
12
|
zap: string | null;
|
|
13
13
|
sRewardContract: string | null;
|
|
14
14
|
rewardContract: string | null;
|
|
15
|
+
implementation: string | null;
|
|
15
16
|
isPlain: boolean;
|
|
16
17
|
isLending: boolean;
|
|
17
18
|
isMeta: boolean;
|
|
@@ -93,6 +94,7 @@ export declare class PoolTemplate {
|
|
|
93
94
|
allCoinBalances: (...addresses: string[] | string[][]) => Promise<IDict<IDict<string>> | IDict<string>>;
|
|
94
95
|
};
|
|
95
96
|
constructor(id: string);
|
|
97
|
+
hasVyperVulnerability(): boolean;
|
|
96
98
|
rewardsOnly(): boolean;
|
|
97
99
|
private statsParameters;
|
|
98
100
|
private statsWrappedBalances;
|
|
@@ -1092,6 +1092,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
1092
1092
|
this.zap = poolData.deposit_address || null;
|
|
1093
1093
|
this.sRewardContract = poolData.sCurveRewards_address || null;
|
|
1094
1094
|
this.rewardContract = poolData.reward_contract || null;
|
|
1095
|
+
this.implementation = poolData.implementation_address || null;
|
|
1095
1096
|
this.isPlain = poolData.is_plain || false;
|
|
1096
1097
|
this.isLending = poolData.is_lending || false;
|
|
1097
1098
|
this.isMeta = poolData.is_meta || false;
|
|
@@ -1157,6 +1158,42 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
1157
1158
|
allCoinBalances: this.walletAllCoinBalances.bind(this),
|
|
1158
1159
|
};
|
|
1159
1160
|
}
|
|
1161
|
+
PoolTemplate.prototype.hasVyperVulnerability = function () {
|
|
1162
|
+
var _c, _d;
|
|
1163
|
+
if (curve.chainId === 1 && this.id === "crveth")
|
|
1164
|
+
return true;
|
|
1165
|
+
if (curve.chainId === 42161 && this.id === "tricrypto")
|
|
1166
|
+
return true;
|
|
1167
|
+
// @ts-ignore
|
|
1168
|
+
var vulnerable_implementations = (_c = {
|
|
1169
|
+
1: [
|
|
1170
|
+
"0x6326DEbBAa15bCFE603d831e7D75f4fc10d9B43E",
|
|
1171
|
+
"0x8c1aB78601c259E1B43F19816923609dC7d7de9B",
|
|
1172
|
+
"0x88855cdF2b0A8413D470B86952E726684de915be",
|
|
1173
|
+
].map(function (a) { return a.toLowerCase(); }),
|
|
1174
|
+
137: [
|
|
1175
|
+
"0xAe00f57663F4C85FC948B13963cd4627dAF01061",
|
|
1176
|
+
"0xA9134FaE98F92217f457918505375Ae91fdc5e3c",
|
|
1177
|
+
"0xf31bcdf0B9a5eCD7AB463eB905551fBc32e51856",
|
|
1178
|
+
].map(function (a) { return a.toLowerCase(); }),
|
|
1179
|
+
250: [
|
|
1180
|
+
"0xE6358f6a45B502477e83CC1CDa759f540E4459ee",
|
|
1181
|
+
"0x5d58Eb45e97B43e471AF05cD2b11CeB4106E1b1a",
|
|
1182
|
+
"0xb11Dc44A9f981fAF1669dca6DD40c3cc2554A2ce",
|
|
1183
|
+
].map(function (a) { return a.toLowerCase(); }),
|
|
1184
|
+
42161: [
|
|
1185
|
+
"0x7DA64233Fefb352f8F501B357c018158ED8aA455",
|
|
1186
|
+
"0xAAe75FAebCae43b9d541Fd875622BE48D9B4f5D0",
|
|
1187
|
+
"0x89287c32c2CAC1C76227F6d300B2DBbab6b75C08",
|
|
1188
|
+
].map(function (a) { return a.toLowerCase(); }),
|
|
1189
|
+
43114: [
|
|
1190
|
+
"0x64448B78561690B70E17CBE8029a3e5c1bB7136e",
|
|
1191
|
+
"0xF1f85a74AD6c64315F85af52d3d46bF715236ADc",
|
|
1192
|
+
"0x0eb0F1FaF5F509Ac53fA224477509EAD167cf410",
|
|
1193
|
+
].map(function (a) { return a.toLowerCase(); }),
|
|
1194
|
+
}[curve.chainId]) !== null && _c !== void 0 ? _c : [];
|
|
1195
|
+
return vulnerable_implementations.includes((_d = this.implementation) !== null && _d !== void 0 ? _d : "");
|
|
1196
|
+
};
|
|
1160
1197
|
PoolTemplate.prototype.rewardsOnly = function () {
|
|
1161
1198
|
if (curve.chainId === 2222 || curve.chainId === 324)
|
|
1162
1199
|
return true; // TODO remove this for Kava and ZkSync
|