@defisaver/positions-sdk 0.0.63-dev1 → 0.0.64
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/cjs/config/contracts.d.ts +0 -9
- package/cjs/config/contracts.js +0 -9
- package/cjs/markets/aave/marketAssets.js +1 -1
- package/cjs/markets/compound/index.js +2 -3
- package/cjs/markets/compound/marketsAssets.d.ts +1 -2
- package/cjs/markets/compound/marketsAssets.js +2 -3
- package/esm/config/contracts.d.ts +0 -9
- package/esm/config/contracts.js +0 -9
- package/esm/markets/aave/marketAssets.js +1 -1
- package/esm/markets/compound/index.js +2 -3
- package/esm/markets/compound/marketsAssets.d.ts +1 -2
- package/esm/markets/compound/marketsAssets.js +1 -2
- package/package.json +2 -2
- package/src/config/contracts.js +0 -9
- package/src/markets/aave/marketAssets.ts +2 -2
- package/src/markets/compound/index.ts +3 -4
- package/src/markets/compound/marketsAssets.ts +1 -2
- package/yarn-error.log +0 -64
|
@@ -1126,9 +1126,6 @@ export namespace cUSDCv3 {
|
|
|
1126
1126
|
"1": {
|
|
1127
1127
|
address: string;
|
|
1128
1128
|
};
|
|
1129
|
-
"10": {
|
|
1130
|
-
address: string;
|
|
1131
|
-
};
|
|
1132
1129
|
"8453": {
|
|
1133
1130
|
address: string;
|
|
1134
1131
|
};
|
|
@@ -1498,9 +1495,6 @@ export namespace CompV3View {
|
|
|
1498
1495
|
};
|
|
1499
1496
|
};
|
|
1500
1497
|
};
|
|
1501
|
-
"10": {
|
|
1502
|
-
address: string;
|
|
1503
|
-
};
|
|
1504
1498
|
"8453": {
|
|
1505
1499
|
address: string;
|
|
1506
1500
|
};
|
|
@@ -1694,9 +1688,6 @@ export namespace CompV3BulkerL2 {
|
|
|
1694
1688
|
})[];
|
|
1695
1689
|
export { abi_20 as abi };
|
|
1696
1690
|
let networks_20: {
|
|
1697
|
-
"10": {
|
|
1698
|
-
address: string;
|
|
1699
|
-
};
|
|
1700
1691
|
"8453": {
|
|
1701
1692
|
address: string;
|
|
1702
1693
|
};
|
package/cjs/config/contracts.js
CHANGED
|
@@ -246,9 +246,6 @@ module.exports = {
|
|
|
246
246
|
"1": {
|
|
247
247
|
"address": "0xc3d688B66703497DAA19211EEdff47f25384cdc3"
|
|
248
248
|
},
|
|
249
|
-
"10": {
|
|
250
|
-
"address": "0x2e44e174f7D53F0212823acC11C01A11d58c5bCB"
|
|
251
|
-
},
|
|
252
249
|
"8453": {
|
|
253
250
|
"address": "0xb125E6687d4313864e53df431d5425969c15Eb2F"
|
|
254
251
|
},
|
|
@@ -297,9 +294,6 @@ module.exports = {
|
|
|
297
294
|
}
|
|
298
295
|
}
|
|
299
296
|
},
|
|
300
|
-
"10": {
|
|
301
|
-
"address": "0x969d845618596787DBc64687Ee90b16931BBBCBC"
|
|
302
|
-
},
|
|
303
297
|
"8453": {
|
|
304
298
|
"address": "0x22591183c0eb7B2Fe07F6F44fd360d1117D07b4f"
|
|
305
299
|
},
|
|
@@ -327,9 +321,6 @@ module.exports = {
|
|
|
327
321
|
"CompV3BulkerL2": {
|
|
328
322
|
"abi": [{ "inputs": [{ "internalType": "address", "name": "admin_", "type": "address" }, { "internalType": "address payable", "name": "wrappedNativeToken_", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "FailedToSendNativeToken", "type": "error" }, { "inputs": [], "name": "InvalidAddress", "type": "error" }, { "inputs": [], "name": "InvalidArgument", "type": "error" }, { "inputs": [], "name": "TransferInFailed", "type": "error" }, { "inputs": [], "name": "TransferOutFailed", "type": "error" }, { "inputs": [], "name": "Unauthorized", "type": "error" }, { "inputs": [], "name": "UnhandledAction", "type": "error" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "oldAdmin", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newAdmin", "type": "address" }], "name": "AdminTransferred", "type": "event" }, { "inputs": [], "name": "ACTION_CLAIM_REWARD", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ACTION_SUPPLY_ASSET", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ACTION_SUPPLY_NATIVE_TOKEN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ACTION_TRANSFER_ASSET", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ACTION_WITHDRAW_ASSET", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ACTION_WITHDRAW_NATIVE_TOKEN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "admin", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32[]", "name": "actions", "type": "bytes32[]" }, { "internalType": "bytes[]", "name": "data", "type": "bytes[]" }], "name": "invoke", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "recipient", "type": "address" }], "name": "sweepNativeToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "address", "name": "asset", "type": "address" }], "name": "sweepToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newAdmin", "type": "address" }], "name": "transferAdmin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "wrappedNativeToken", "outputs": [{ "internalType": "address payable", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "stateMutability": "payable", "type": "receive" }],
|
|
329
323
|
"networks": {
|
|
330
|
-
"10": {
|
|
331
|
-
"address": "0xcb3643CC8294B23171272845473dEc49739d4Ba3"
|
|
332
|
-
},
|
|
333
324
|
"8453": {
|
|
334
325
|
"address": "0x78D0677032A35c63D142a48A2037048871212a8C"
|
|
335
326
|
},
|
|
@@ -12,7 +12,7 @@ exports.aaveV3AssetsDefaultMarketOpt = [
|
|
|
12
12
|
'DAI', 'USDC.e', 'USDT', 'SUSD', 'AAVE', 'LINK', 'WBTC', 'ETH', 'OP', 'wstETH', 'LUSD', 'MAI', 'rETH', 'USDC',
|
|
13
13
|
];
|
|
14
14
|
exports.aaveV3AssetsDefaultMarketArb = [
|
|
15
|
-
'ETH', 'DAI', 'EURS', 'USDC', 'USDT', 'AAVE', 'LINK', 'WBTC', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC.e', 'FRAX', 'ARB',
|
|
15
|
+
'ETH', 'DAI', 'EURS', 'USDC', 'USDT', 'AAVE', 'LINK', 'WBTC', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC.e', 'FRAX', 'ARB', 'weETH',
|
|
16
16
|
];
|
|
17
17
|
exports.aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC'];
|
|
18
18
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
@@ -36,11 +36,10 @@ const BULKER_OPTIONS = {
|
|
|
36
36
|
[types_1.CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
37
37
|
},
|
|
38
38
|
[common_1.NetworkNumber.Opt]: {
|
|
39
|
-
[types_1.CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
|
|
40
|
-
// Non-existing markets, keeping it because of typescript
|
|
41
39
|
[types_1.CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
|
|
42
40
|
[types_1.CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
43
41
|
[types_1.CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
42
|
+
[types_1.CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
|
|
44
43
|
[types_1.CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
45
44
|
},
|
|
46
45
|
};
|
|
@@ -60,7 +59,7 @@ exports.COMPOUND_V2 = {
|
|
|
60
59
|
// icon: SvgAdapter(protocolIcons.compound),
|
|
61
60
|
};
|
|
62
61
|
const COMPOUND_V3_USDC = (networkId) => ({
|
|
63
|
-
chainIds: [common_1.NetworkNumber.Eth, common_1.NetworkNumber.Arb, common_1.NetworkNumber.Base
|
|
62
|
+
chainIds: [common_1.NetworkNumber.Eth, common_1.NetworkNumber.Arb, common_1.NetworkNumber.Base],
|
|
64
63
|
label: 'Compound V3 - USDC',
|
|
65
64
|
shortLabel: 'v3',
|
|
66
65
|
value: types_1.CompoundVersions.CompoundV3USDC,
|
|
@@ -2,10 +2,9 @@ export declare const compoundV2CollateralAssets: import("@defisaver/tokens/esm/t
|
|
|
2
2
|
export declare const v3USDCCollAssetsEth: string[];
|
|
3
3
|
export declare const v3USDCCollAssetsArb: string[];
|
|
4
4
|
export declare const v3USDCCollAssetsBase: string[];
|
|
5
|
-
export declare const v3USDCCollAssetsOpt: string[];
|
|
6
5
|
export declare const v3USDCCollAssets: {
|
|
7
6
|
readonly 1: string[];
|
|
8
|
-
readonly 10:
|
|
7
|
+
readonly 10: readonly [];
|
|
9
8
|
readonly 42161: string[];
|
|
10
9
|
readonly 8453: string[];
|
|
11
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.v3USDbCCollAssets = exports.v3USDbCCollAssetsBase = exports.v3ETHCollAssets = exports.v3ETHCollAssetsBase = exports.v3ETHCollAssetsEth = exports.v3USDCeCollAssets = exports.v3USDCeCollAssetsArb = exports.v3USDCCollAssets = exports.
|
|
3
|
+
exports.v3USDbCCollAssets = exports.v3USDbCCollAssetsBase = exports.v3ETHCollAssets = exports.v3ETHCollAssetsBase = exports.v3ETHCollAssetsEth = exports.v3USDCeCollAssets = exports.v3USDCeCollAssetsArb = exports.v3USDCCollAssets = exports.v3USDCCollAssetsBase = exports.v3USDCCollAssetsArb = exports.v3USDCCollAssetsEth = exports.compoundV2CollateralAssets = void 0;
|
|
4
4
|
const tokens_1 = require("@defisaver/tokens");
|
|
5
5
|
const common_1 = require("../../types/common");
|
|
6
6
|
exports.compoundV2CollateralAssets = [
|
|
@@ -10,11 +10,10 @@ exports.compoundV2CollateralAssets = [
|
|
|
10
10
|
exports.v3USDCCollAssetsEth = ['ETH', 'COMP', 'WBTC', 'UNI', 'LINK'];
|
|
11
11
|
exports.v3USDCCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC'];
|
|
12
12
|
exports.v3USDCCollAssetsBase = ['ETH', 'cbETH'];
|
|
13
|
-
exports.v3USDCCollAssetsOpt = ['ETH', 'OP', 'WBTC'];
|
|
14
13
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
15
14
|
exports.v3USDCCollAssets = {
|
|
16
15
|
[common_1.NetworkNumber.Eth]: exports.v3USDCCollAssetsEth,
|
|
17
|
-
[common_1.NetworkNumber.Opt]:
|
|
16
|
+
[common_1.NetworkNumber.Opt]: [],
|
|
18
17
|
[common_1.NetworkNumber.Arb]: exports.v3USDCCollAssetsArb,
|
|
19
18
|
[common_1.NetworkNumber.Base]: exports.v3USDCCollAssetsBase,
|
|
20
19
|
};
|
|
@@ -1126,9 +1126,6 @@ export namespace cUSDCv3 {
|
|
|
1126
1126
|
"1": {
|
|
1127
1127
|
address: string;
|
|
1128
1128
|
};
|
|
1129
|
-
"10": {
|
|
1130
|
-
address: string;
|
|
1131
|
-
};
|
|
1132
1129
|
"8453": {
|
|
1133
1130
|
address: string;
|
|
1134
1131
|
};
|
|
@@ -1498,9 +1495,6 @@ export namespace CompV3View {
|
|
|
1498
1495
|
};
|
|
1499
1496
|
};
|
|
1500
1497
|
};
|
|
1501
|
-
"10": {
|
|
1502
|
-
address: string;
|
|
1503
|
-
};
|
|
1504
1498
|
"8453": {
|
|
1505
1499
|
address: string;
|
|
1506
1500
|
};
|
|
@@ -1694,9 +1688,6 @@ export namespace CompV3BulkerL2 {
|
|
|
1694
1688
|
})[];
|
|
1695
1689
|
export { abi_20 as abi };
|
|
1696
1690
|
let networks_20: {
|
|
1697
|
-
"10": {
|
|
1698
|
-
address: string;
|
|
1699
|
-
};
|
|
1700
1691
|
"8453": {
|
|
1701
1692
|
address: string;
|
|
1702
1693
|
};
|
package/esm/config/contracts.js
CHANGED
|
@@ -245,9 +245,6 @@ module.exports = {
|
|
|
245
245
|
"1": {
|
|
246
246
|
"address": "0xc3d688B66703497DAA19211EEdff47f25384cdc3"
|
|
247
247
|
},
|
|
248
|
-
"10": {
|
|
249
|
-
"address": "0x2e44e174f7D53F0212823acC11C01A11d58c5bCB"
|
|
250
|
-
},
|
|
251
248
|
"8453": {
|
|
252
249
|
"address": "0xb125E6687d4313864e53df431d5425969c15Eb2F"
|
|
253
250
|
},
|
|
@@ -296,9 +293,6 @@ module.exports = {
|
|
|
296
293
|
}
|
|
297
294
|
}
|
|
298
295
|
},
|
|
299
|
-
"10": {
|
|
300
|
-
"address": "0x969d845618596787DBc64687Ee90b16931BBBCBC"
|
|
301
|
-
},
|
|
302
296
|
"8453": {
|
|
303
297
|
"address": "0x22591183c0eb7B2Fe07F6F44fd360d1117D07b4f"
|
|
304
298
|
},
|
|
@@ -326,9 +320,6 @@ module.exports = {
|
|
|
326
320
|
"CompV3BulkerL2": {
|
|
327
321
|
"abi": [{ "inputs": [{ "internalType": "address", "name": "admin_", "type": "address" }, { "internalType": "address payable", "name": "wrappedNativeToken_", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "FailedToSendNativeToken", "type": "error" }, { "inputs": [], "name": "InvalidAddress", "type": "error" }, { "inputs": [], "name": "InvalidArgument", "type": "error" }, { "inputs": [], "name": "TransferInFailed", "type": "error" }, { "inputs": [], "name": "TransferOutFailed", "type": "error" }, { "inputs": [], "name": "Unauthorized", "type": "error" }, { "inputs": [], "name": "UnhandledAction", "type": "error" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "oldAdmin", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newAdmin", "type": "address" }], "name": "AdminTransferred", "type": "event" }, { "inputs": [], "name": "ACTION_CLAIM_REWARD", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ACTION_SUPPLY_ASSET", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ACTION_SUPPLY_NATIVE_TOKEN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ACTION_TRANSFER_ASSET", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ACTION_WITHDRAW_ASSET", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ACTION_WITHDRAW_NATIVE_TOKEN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "admin", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32[]", "name": "actions", "type": "bytes32[]" }, { "internalType": "bytes[]", "name": "data", "type": "bytes[]" }], "name": "invoke", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "recipient", "type": "address" }], "name": "sweepNativeToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "address", "name": "asset", "type": "address" }], "name": "sweepToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newAdmin", "type": "address" }], "name": "transferAdmin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "wrappedNativeToken", "outputs": [{ "internalType": "address payable", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "stateMutability": "payable", "type": "receive" }],
|
|
328
322
|
"networks": {
|
|
329
|
-
"10": {
|
|
330
|
-
"address": "0xcb3643CC8294B23171272845473dEc49739d4Ba3"
|
|
331
|
-
},
|
|
332
323
|
"8453": {
|
|
333
324
|
"address": "0x78D0677032A35c63D142a48A2037048871212a8C"
|
|
334
325
|
},
|
|
@@ -9,7 +9,7 @@ export const aaveV3AssetsDefaultMarketOpt = [
|
|
|
9
9
|
'DAI', 'USDC.e', 'USDT', 'SUSD', 'AAVE', 'LINK', 'WBTC', 'ETH', 'OP', 'wstETH', 'LUSD', 'MAI', 'rETH', 'USDC',
|
|
10
10
|
];
|
|
11
11
|
export const aaveV3AssetsDefaultMarketArb = [
|
|
12
|
-
'ETH', 'DAI', 'EURS', 'USDC', 'USDT', 'AAVE', 'LINK', 'WBTC', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC.e', 'FRAX', 'ARB',
|
|
12
|
+
'ETH', 'DAI', 'EURS', 'USDC', 'USDT', 'AAVE', 'LINK', 'WBTC', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC.e', 'FRAX', 'ARB', 'weETH',
|
|
13
13
|
];
|
|
14
14
|
export const aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC'];
|
|
15
15
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
@@ -33,11 +33,10 @@ const BULKER_OPTIONS = {
|
|
|
33
33
|
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
34
34
|
},
|
|
35
35
|
[NetworkNumber.Opt]: {
|
|
36
|
-
[CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
|
|
37
|
-
// Non-existing markets, keeping it because of typescript
|
|
38
36
|
[CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
|
|
39
37
|
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
40
38
|
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
39
|
+
[CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
|
|
41
40
|
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
42
41
|
},
|
|
43
42
|
};
|
|
@@ -57,7 +56,7 @@ export const COMPOUND_V2 = {
|
|
|
57
56
|
// icon: SvgAdapter(protocolIcons.compound),
|
|
58
57
|
};
|
|
59
58
|
export const COMPOUND_V3_USDC = (networkId) => ({
|
|
60
|
-
chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Base
|
|
59
|
+
chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Base],
|
|
61
60
|
label: 'Compound V3 - USDC',
|
|
62
61
|
shortLabel: 'v3',
|
|
63
62
|
value: CompoundVersions.CompoundV3USDC,
|
|
@@ -2,10 +2,9 @@ export declare const compoundV2CollateralAssets: import("@defisaver/tokens/esm/t
|
|
|
2
2
|
export declare const v3USDCCollAssetsEth: string[];
|
|
3
3
|
export declare const v3USDCCollAssetsArb: string[];
|
|
4
4
|
export declare const v3USDCCollAssetsBase: string[];
|
|
5
|
-
export declare const v3USDCCollAssetsOpt: string[];
|
|
6
5
|
export declare const v3USDCCollAssets: {
|
|
7
6
|
readonly 1: string[];
|
|
8
|
-
readonly 10:
|
|
7
|
+
readonly 10: readonly [];
|
|
9
8
|
readonly 42161: string[];
|
|
10
9
|
readonly 8453: string[];
|
|
11
10
|
};
|
|
@@ -7,11 +7,10 @@ export const compoundV2CollateralAssets = [
|
|
|
7
7
|
export const v3USDCCollAssetsEth = ['ETH', 'COMP', 'WBTC', 'UNI', 'LINK'];
|
|
8
8
|
export const v3USDCCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC'];
|
|
9
9
|
export const v3USDCCollAssetsBase = ['ETH', 'cbETH'];
|
|
10
|
-
export const v3USDCCollAssetsOpt = ['ETH', 'OP', 'WBTC'];
|
|
11
10
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
12
11
|
export const v3USDCCollAssets = {
|
|
13
12
|
[NetworkNumber.Eth]: v3USDCCollAssetsEth,
|
|
14
|
-
[NetworkNumber.Opt]:
|
|
13
|
+
[NetworkNumber.Opt]: [],
|
|
15
14
|
[NetworkNumber.Arb]: v3USDCCollAssetsArb,
|
|
16
15
|
[NetworkNumber.Base]: v3USDCCollAssetsBase,
|
|
17
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defisaver/positions-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.64",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@defisaver/tokens": "^1.5.
|
|
22
|
+
"@defisaver/tokens": "^1.5.18",
|
|
23
23
|
"@ethersproject/bignumber": "^5.7.0",
|
|
24
24
|
"@morpho-org/morpho-aave-v3-sdk": "^1.5.3",
|
|
25
25
|
"decimal.js": "^10.4.3"
|
package/src/config/contracts.js
CHANGED
|
@@ -245,9 +245,6 @@ module.exports = {
|
|
|
245
245
|
"1": {
|
|
246
246
|
"address": "0xc3d688B66703497DAA19211EEdff47f25384cdc3"
|
|
247
247
|
},
|
|
248
|
-
"10": {
|
|
249
|
-
"address": "0x2e44e174f7D53F0212823acC11C01A11d58c5bCB"
|
|
250
|
-
},
|
|
251
248
|
"8453": {
|
|
252
249
|
"address": "0xb125E6687d4313864e53df431d5425969c15Eb2F"
|
|
253
250
|
},
|
|
@@ -296,9 +293,6 @@ module.exports = {
|
|
|
296
293
|
}
|
|
297
294
|
}
|
|
298
295
|
},
|
|
299
|
-
"10": {
|
|
300
|
-
"address": "0x969d845618596787DBc64687Ee90b16931BBBCBC"
|
|
301
|
-
},
|
|
302
296
|
"8453": {
|
|
303
297
|
"address": "0x22591183c0eb7B2Fe07F6F44fd360d1117D07b4f"
|
|
304
298
|
},
|
|
@@ -326,9 +320,6 @@ module.exports = {
|
|
|
326
320
|
"CompV3BulkerL2": {
|
|
327
321
|
"abi": [{"inputs":[{"internalType":"address","name":"admin_","type":"address"},{"internalType":"address payable","name":"wrappedNativeToken_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FailedToSendNativeToken","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidArgument","type":"error"},{"inputs":[],"name":"TransferInFailed","type":"error"},{"inputs":[],"name":"TransferOutFailed","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnhandledAction","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminTransferred","type":"event"},{"inputs":[],"name":"ACTION_CLAIM_REWARD","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_SUPPLY_ASSET","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_SUPPLY_NATIVE_TOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_TRANSFER_ASSET","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_WITHDRAW_ASSET","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_WITHDRAW_NATIVE_TOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"actions","type":"bytes32[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"invoke","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"sweepNativeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"asset","type":"address"}],"name":"sweepToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"transferAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrappedNativeToken","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}],
|
|
328
322
|
"networks": {
|
|
329
|
-
"10": {
|
|
330
|
-
"address": "0xcb3643CC8294B23171272845473dEc49739d4Ba3"
|
|
331
|
-
},
|
|
332
323
|
"8453": {
|
|
333
324
|
"address": "0x78D0677032A35c63D142a48A2037048871212a8C"
|
|
334
325
|
},
|
|
@@ -12,7 +12,7 @@ export const aaveV3AssetsDefaultMarketOpt = [
|
|
|
12
12
|
'DAI', 'USDC.e', 'USDT', 'SUSD', 'AAVE', 'LINK', 'WBTC', 'ETH', 'OP', 'wstETH', 'LUSD', 'MAI', 'rETH', 'USDC',
|
|
13
13
|
];
|
|
14
14
|
export const aaveV3AssetsDefaultMarketArb = [
|
|
15
|
-
'ETH', 'DAI', 'EURS', 'USDC', 'USDT', 'AAVE', 'LINK', 'WBTC', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC.e', 'FRAX', 'ARB',
|
|
15
|
+
'ETH', 'DAI', 'EURS', 'USDC', 'USDT', 'AAVE', 'LINK', 'WBTC', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC.e', 'FRAX', 'ARB', 'weETH',
|
|
16
16
|
];
|
|
17
17
|
export const aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC'];
|
|
18
18
|
|
|
@@ -22,4 +22,4 @@ export const aaveV3AssetsDefaultMarket = {
|
|
|
22
22
|
[NetworkNumber.Opt]: aaveV3AssetsDefaultMarketOpt,
|
|
23
23
|
[NetworkNumber.Arb]: aaveV3AssetsDefaultMarketArb,
|
|
24
24
|
[NetworkNumber.Base]: aaveV3AssetsDefaultMarketBase,
|
|
25
|
-
} as const;
|
|
25
|
+
} as const;
|
|
@@ -44,12 +44,11 @@ const BULKER_OPTIONS: Record<NetworkNumber, Record<CompoundVersions, CompoundBul
|
|
|
44
44
|
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
45
45
|
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
46
46
|
},
|
|
47
|
-
[NetworkNumber.Opt]: {
|
|
48
|
-
[CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
|
|
49
|
-
// Non-existing markets, keeping it because of typescript
|
|
47
|
+
[NetworkNumber.Opt]: { // Non-existing markets, keeping it because of typescript
|
|
50
48
|
[CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
|
|
51
49
|
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
52
50
|
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
51
|
+
[CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
|
|
53
52
|
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
54
53
|
},
|
|
55
54
|
};
|
|
@@ -71,7 +70,7 @@ export const COMPOUND_V2: CompoundMarketData = {
|
|
|
71
70
|
};
|
|
72
71
|
|
|
73
72
|
export const COMPOUND_V3_USDC = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
74
|
-
chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Base
|
|
73
|
+
chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Base],
|
|
75
74
|
label: 'Compound V3 - USDC',
|
|
76
75
|
shortLabel: 'v3',
|
|
77
76
|
value: CompoundVersions.CompoundV3USDC,
|
|
@@ -9,12 +9,11 @@ export const compoundV2CollateralAssets = [
|
|
|
9
9
|
export const v3USDCCollAssetsEth = ['ETH', 'COMP', 'WBTC', 'UNI', 'LINK'];
|
|
10
10
|
export const v3USDCCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC'];
|
|
11
11
|
export const v3USDCCollAssetsBase = ['ETH', 'cbETH'];
|
|
12
|
-
export const v3USDCCollAssetsOpt = ['ETH', 'OP', 'WBTC'];
|
|
13
12
|
|
|
14
13
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
15
14
|
export const v3USDCCollAssets = {
|
|
16
15
|
[NetworkNumber.Eth]: v3USDCCollAssetsEth,
|
|
17
|
-
[NetworkNumber.Opt]:
|
|
16
|
+
[NetworkNumber.Opt]: [],
|
|
18
17
|
[NetworkNumber.Arb]: v3USDCCollAssetsArb,
|
|
19
18
|
[NetworkNumber.Base]: v3USDCCollAssetsBase,
|
|
20
19
|
} as const;
|
package/yarn-error.log
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
Arguments:
|
|
2
|
-
/Users/stefan/.nvm/versions/node/v14.19.0/bin/node /usr/local/Cellar/yarn/1.22.19/libexec/bin/yarn.js
|
|
3
|
-
|
|
4
|
-
PATH:
|
|
5
|
-
/Users/stefan/.nvm/versions/node/v14.19.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/go/bin:/Users/stefan/WebstormProjects/defisaver-positions-sdk/node_modules/.bin:/usr/local/go
|
|
6
|
-
|
|
7
|
-
Yarn version:
|
|
8
|
-
1.22.19
|
|
9
|
-
|
|
10
|
-
Node version:
|
|
11
|
-
14.19.0
|
|
12
|
-
|
|
13
|
-
Platform:
|
|
14
|
-
darwin x64
|
|
15
|
-
|
|
16
|
-
Trace:
|
|
17
|
-
Error: incorrect data check
|
|
18
|
-
at Zlib.zlibOnError [as onerror] (zlib.js:187:17)
|
|
19
|
-
|
|
20
|
-
npm manifest:
|
|
21
|
-
{
|
|
22
|
-
"name": "defisaver-positions-sdk",
|
|
23
|
-
"version": "0.0.1",
|
|
24
|
-
"description": "",
|
|
25
|
-
"main": "./cjs/index.js",
|
|
26
|
-
"module": "./esm/src/index.js",
|
|
27
|
-
"types": "./esm/src/index.d.ts",
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build:esm": "rm -rf esm && tsc -p tsconfig.json",
|
|
30
|
-
"build:cjs": "rm -rf cjs && tsc -p tsconfig.cjs.json",
|
|
31
|
-
"build": "npm run build:cjs && npm run build:esm",
|
|
32
|
-
"dev": "tsc -p tsconfig.cjs.json --watch",
|
|
33
|
-
"lint": "eslint src/ --fix",
|
|
34
|
-
"generate-contracts": "node scripts/generateContracts.js",
|
|
35
|
-
"test": "mocha tests/*",
|
|
36
|
-
"build-test": "npm run build && mocha tests/*"
|
|
37
|
-
},
|
|
38
|
-
"keywords": [],
|
|
39
|
-
"author": "",
|
|
40
|
-
"license": "ISC",
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"@defisaver/tokens": "^1.4.56",
|
|
43
|
-
"decimal.js": "^10.4.3"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@defisaver/eslint-config": "^1.0.1",
|
|
47
|
-
"chai": "^4.3.8",
|
|
48
|
-
"dotenv": "^16.3.1",
|
|
49
|
-
"eslint": "^8.49.0",
|
|
50
|
-
"mocha": "^10.2.0",
|
|
51
|
-
"typechain": "^8.3.1",
|
|
52
|
-
"typechain-target-web3-v1-3mihai3": "^6.0.2",
|
|
53
|
-
"typescript": "^5.2.2"
|
|
54
|
-
},
|
|
55
|
-
"peerDependencies": {
|
|
56
|
-
"web3": "^1.10.2"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
yarn manifest:
|
|
61
|
-
No manifest
|
|
62
|
-
|
|
63
|
-
Lockfile:
|
|
64
|
-
No lockfile
|