@defisaver/sdk 1.2.23 → 1.2.24-dev
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/esm/src/actions/basic/SellNoFeeAction.d.ts +23 -0
- package/esm/src/actions/basic/SellNoFeeAction.js +61 -0
- package/esm/src/actions/basic/index.d.ts +1 -0
- package/esm/src/actions/basic/index.js +1 -0
- package/esm/src/addresses.d.ts +4 -0
- package/esm/src/addresses.js +10 -6
- package/esm/src/index.d.ts +16 -0
- package/package.json +1 -1
- package/src/actions/basic/SellNoFeeAction.ts +61 -0
- package/src/actions/basic/index.ts +2 -1
- package/src/addresses.ts +10 -7
- package/umd/index.js +716 -634
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ActionWithL2 } from '../../ActionWithL2';
|
|
2
|
+
import { EthAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Sells token on DeFi Saver exchange aggregator without fee
|
|
5
|
+
*
|
|
6
|
+
* @category BasicActions
|
|
7
|
+
*/
|
|
8
|
+
export declare class SellNoFeeAction extends ActionWithL2 {
|
|
9
|
+
protocolFee: string;
|
|
10
|
+
/**
|
|
11
|
+
* @param exchangeOrder Standard DFS Exchange data
|
|
12
|
+
* @param from Order sender
|
|
13
|
+
* @param to Order recipient
|
|
14
|
+
* @param protocolFee 0x fee (amount of ETH in Wei)
|
|
15
|
+
*/
|
|
16
|
+
constructor(exchangeOrder: Array<any>, from: EthAddress, to: EthAddress, protocolFee?: string);
|
|
17
|
+
encodeInputs(): string;
|
|
18
|
+
getAssetsToApprove(): Promise<{
|
|
19
|
+
asset: any;
|
|
20
|
+
owner: any;
|
|
21
|
+
}[]>;
|
|
22
|
+
getEthValue(): Promise<string>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import AbiCoder from 'web3-eth-abi';
|
|
11
|
+
import { getAssetInfoByAddress } from '@defisaver/tokens';
|
|
12
|
+
import ActionAbi from '../../abis/Action.json';
|
|
13
|
+
import { ActionWithL2 } from '../../ActionWithL2';
|
|
14
|
+
import { requireAddress } from '../../utils/general';
|
|
15
|
+
import { getAddr } from '../../addresses';
|
|
16
|
+
/**
|
|
17
|
+
* Sells token on DeFi Saver exchange aggregator without fee
|
|
18
|
+
*
|
|
19
|
+
* @category BasicActions
|
|
20
|
+
*/
|
|
21
|
+
export class SellNoFeeAction extends ActionWithL2 {
|
|
22
|
+
/**
|
|
23
|
+
* @param exchangeOrder Standard DFS Exchange data
|
|
24
|
+
* @param from Order sender
|
|
25
|
+
* @param to Order recipient
|
|
26
|
+
* @param protocolFee 0x fee (amount of ETH in Wei)
|
|
27
|
+
*/
|
|
28
|
+
constructor(exchangeOrder, from, to, protocolFee = '0') {
|
|
29
|
+
requireAddress(to);
|
|
30
|
+
super('DFSSellNoFee', getAddr('DFSSellNoFee'), [
|
|
31
|
+
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
32
|
+
'address',
|
|
33
|
+
'address',
|
|
34
|
+
], [exchangeOrder, from, to]);
|
|
35
|
+
this.protocolFee = protocolFee;
|
|
36
|
+
this.mappableArgs = [
|
|
37
|
+
this.args[0][0],
|
|
38
|
+
this.args[0][1],
|
|
39
|
+
this.args[0][2],
|
|
40
|
+
this.args[1],
|
|
41
|
+
this.args[2],
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
encodeInputs() {
|
|
45
|
+
const executeActionDirectAbi = (ActionAbi.find(({ name }) => name === 'executeActionDirect'));
|
|
46
|
+
return AbiCoder.encodeFunctionCall(executeActionDirectAbi, this._encodeForCall());
|
|
47
|
+
}
|
|
48
|
+
getAssetsToApprove() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const asset = getAssetInfoByAddress(this.args[0][0]);
|
|
51
|
+
if (asset.symbol !== 'ETH')
|
|
52
|
+
return [{ asset: this.args[0][0], owner: this.args[1] }];
|
|
53
|
+
return [];
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
getEthValue() {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return this.protocolFee || '0';
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
package/esm/src/addresses.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare const actionAddresses: {
|
|
|
24
24
|
StarknetClaim: string;
|
|
25
25
|
HandleAuth: string;
|
|
26
26
|
DFSSell: string;
|
|
27
|
+
DFSSellNoFee: string;
|
|
27
28
|
SkyStake: string;
|
|
28
29
|
SkyUnstake: string;
|
|
29
30
|
SkyClaimRewards: string;
|
|
@@ -262,6 +263,7 @@ export declare const actionAddresses: {
|
|
|
262
263
|
MorphoBlueView?: undefined;
|
|
263
264
|
} | {
|
|
264
265
|
DFSSell: string;
|
|
266
|
+
DFSSellNoFee: string;
|
|
265
267
|
WrapEth: string;
|
|
266
268
|
UnwrapEth: string;
|
|
267
269
|
SendToken: string;
|
|
@@ -522,6 +524,7 @@ export declare const actionAddresses: {
|
|
|
522
524
|
MorphoBlueView?: undefined;
|
|
523
525
|
} | {
|
|
524
526
|
DFSSell: string;
|
|
527
|
+
DFSSellNoFee: string;
|
|
525
528
|
WrapEth: string;
|
|
526
529
|
UnwrapEth: string;
|
|
527
530
|
SendToken: string;
|
|
@@ -782,6 +785,7 @@ export declare const actionAddresses: {
|
|
|
782
785
|
MorphoBlueView?: undefined;
|
|
783
786
|
} | {
|
|
784
787
|
DFSSell: string;
|
|
788
|
+
DFSSellNoFee: string;
|
|
785
789
|
WrapEth: string;
|
|
786
790
|
UnwrapEth: string;
|
|
787
791
|
SendToken: string;
|
package/esm/src/addresses.js
CHANGED
|
@@ -26,6 +26,7 @@ export const actionAddresses = {
|
|
|
26
26
|
HandleAuth: '0xfc2e2b37c73d5d43cf5fcbd80a4049b620d60eba',
|
|
27
27
|
// exchange
|
|
28
28
|
DFSSell: '0x901d383c37b30cefad9b6e2bbb0539a40e02c5f4',
|
|
29
|
+
DFSSellNoFee: '0x3845C89c861eBb0a0c856CEBB064Ee93678bdE8E',
|
|
29
30
|
// sky
|
|
30
31
|
SkyStake: '0x5803C399EE9f887C8b81075E4C185c448361c235',
|
|
31
32
|
SkyUnstake: '0x4b6d3A01465fa88D7D596333D15832434a568452',
|
|
@@ -284,9 +285,9 @@ export const actionAddresses = {
|
|
|
284
285
|
KingClaim: '0x483816678e2348bf87f88b0f4eb6a923017de0d6',
|
|
285
286
|
// fluid
|
|
286
287
|
FluidVaultT1Open: '0x372404335C05C2493Ff156Ef60cC0B286f6f2971',
|
|
287
|
-
FluidVaultT1Adjust: '
|
|
288
|
+
FluidVaultT1Adjust: '0x8f1443c9F24843D14fa6b302A55C59468ED7D28B',
|
|
288
289
|
FluidVaultT1Borrow: '0x36AF0cE762a016e8b4a80c70Af406DFcBc1FCbD4',
|
|
289
|
-
FluidVaultT1Payback: '
|
|
290
|
+
FluidVaultT1Payback: '0xa7A4B84D38CD33F9901922687db24B8aE14f2455',
|
|
290
291
|
FluidVaultT1Withdraw: '0x5673b9ab4A035C5C7474C344664Be91DaFafa17E',
|
|
291
292
|
FluidVaultT1Supply: '0x0c6100209D8A0bb14CC7d18e45dA1bd1E7a3a187',
|
|
292
293
|
FluidView: '0xf8e3bbf7c95057be1fD5E741a9ADb73E956dC724',
|
|
@@ -294,6 +295,7 @@ export const actionAddresses = {
|
|
|
294
295
|
},
|
|
295
296
|
[NETWORKS.optimism.chainId]: {
|
|
296
297
|
DFSSell: '0x9f234af5c10c136863a20865ba00b26951ab8269',
|
|
298
|
+
DFSSellNoFee: '0x0000000000000000000000000000000000000000',
|
|
297
299
|
// basic
|
|
298
300
|
WrapEth: '0x6D735db054AC4a1F10f96b99f8550E9eefbC2AC5',
|
|
299
301
|
UnwrapEth: '0x1Fa75B00A05C2EbBd0EDF253a63c209966337A0d',
|
|
@@ -348,6 +350,7 @@ export const actionAddresses = {
|
|
|
348
350
|
},
|
|
349
351
|
[NETWORKS.arbitrum.chainId]: {
|
|
350
352
|
DFSSell: '0x1393eef11454ab068dd5e0d0be5eb922603eef1a',
|
|
353
|
+
DFSSellNoFee: '0x0000000000000000000000000000000000000000',
|
|
351
354
|
// basic
|
|
352
355
|
WrapEth: '0x35136b25bFA7CCC8f5b94E3181a16B61c06980F0',
|
|
353
356
|
UnwrapEth: '0x2B69d494536098700910D167902D1d397dcA2B61',
|
|
@@ -415,9 +418,9 @@ export const actionAddresses = {
|
|
|
415
418
|
LlamaLendSelfLiquidateWithColl: '0xebf090e5e83f4cd63d84db013ac8271761a953cf',
|
|
416
419
|
// fluid
|
|
417
420
|
FluidVaultT1Open: '0x1947Ce90ACCf0E243CcF85140fCceC2EfAeeA193',
|
|
418
|
-
FluidVaultT1Adjust: '
|
|
421
|
+
FluidVaultT1Adjust: '0xF8374Aa0F6d9D28790f90745f0360b5C945DEA20',
|
|
419
422
|
FluidVaultT1Borrow: '0x499da89aD564F5D6C828259ce55F53Fa288e7Be7',
|
|
420
|
-
FluidVaultT1Payback: '
|
|
423
|
+
FluidVaultT1Payback: '0x226c871E0a27B12065c9128b8e7440b054b59155',
|
|
421
424
|
FluidVaultT1Withdraw: '0xc13d93227d97197e5F1751d0a3e80c1080A5fa2B',
|
|
422
425
|
FluidVaultT1Supply: '0xBCF0Dc5bb2C4434AD07369207904F5900d391b0B',
|
|
423
426
|
FluidView: '0x2d51BB6Ac5c1eC8DD6432e1FF980fC864B626e01',
|
|
@@ -425,6 +428,7 @@ export const actionAddresses = {
|
|
|
425
428
|
[NETWORKS.base.chainId]: {
|
|
426
429
|
// Basic
|
|
427
430
|
DFSSell: '0xcd151d2bd3e129a4678f2116a9944b5aea0c860d',
|
|
431
|
+
DFSSellNoFee: '0x0000000000000000000000000000000000000000',
|
|
428
432
|
WrapEth: '0x491cc4AFbE0081C3464DeF1114ba27BE114b2401',
|
|
429
433
|
UnwrapEth: '0xcF91546046F16B3c38b890CC508E280BEffa66b9',
|
|
430
434
|
SendToken: '0x1420f4977E7B71AFddccBFc6F6e1505CefdF99F0',
|
|
@@ -483,9 +487,9 @@ export const actionAddresses = {
|
|
|
483
487
|
MorphoBlueClaim: '0xE279E9100d6d524602f98E8736BA5F8f065Dd3e0',
|
|
484
488
|
// fluid
|
|
485
489
|
FluidVaultT1Open: '0xCd4d5896AEAf97e738d3E7215ac01c2CF97474bc',
|
|
486
|
-
FluidVaultT1Adjust: '
|
|
490
|
+
FluidVaultT1Adjust: '0x4405A81c25Be495325f76Aa4d82176f9ae3275bc',
|
|
487
491
|
FluidVaultT1Borrow: '0x8dCBF436cC0971FE29886E58CE0CAeb36d43E91E',
|
|
488
|
-
FluidVaultT1Payback: '
|
|
492
|
+
FluidVaultT1Payback: '0xA65daAa4FB4Fe9feaDF25bf2C062c3Faa2b02e5D',
|
|
489
493
|
FluidVaultT1Withdraw: '0x26bE6a2EdE97aE826ed9DA8Fb79428037fe55cEB',
|
|
490
494
|
FluidVaultT1Supply: '0x028ACA45244d4897ff80ef65ed0b735Bb0D4B0A5',
|
|
491
495
|
FluidView: '0x5835CaDbA8843CD6d6d55782908351E9c74221aD',
|
package/esm/src/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ declare const actionAddressesAllChains: {
|
|
|
35
35
|
StarknetClaim: string;
|
|
36
36
|
HandleAuth: string;
|
|
37
37
|
DFSSell: string;
|
|
38
|
+
DFSSellNoFee: string;
|
|
38
39
|
SkyStake: string;
|
|
39
40
|
SkyUnstake: string;
|
|
40
41
|
SkyClaimRewards: string;
|
|
@@ -273,6 +274,7 @@ declare const actionAddressesAllChains: {
|
|
|
273
274
|
MorphoBlueView?: undefined;
|
|
274
275
|
} | {
|
|
275
276
|
DFSSell: string;
|
|
277
|
+
DFSSellNoFee: string;
|
|
276
278
|
WrapEth: string;
|
|
277
279
|
UnwrapEth: string;
|
|
278
280
|
SendToken: string;
|
|
@@ -533,6 +535,7 @@ declare const actionAddressesAllChains: {
|
|
|
533
535
|
MorphoBlueView?: undefined;
|
|
534
536
|
} | {
|
|
535
537
|
DFSSell: string;
|
|
538
|
+
DFSSellNoFee: string;
|
|
536
539
|
WrapEth: string;
|
|
537
540
|
UnwrapEth: string;
|
|
538
541
|
SendToken: string;
|
|
@@ -793,6 +796,7 @@ declare const actionAddressesAllChains: {
|
|
|
793
796
|
MorphoBlueView?: undefined;
|
|
794
797
|
} | {
|
|
795
798
|
DFSSell: string;
|
|
799
|
+
DFSSellNoFee: string;
|
|
796
800
|
WrapEth: string;
|
|
797
801
|
UnwrapEth: string;
|
|
798
802
|
SendToken: string;
|
|
@@ -1077,6 +1081,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1077
1081
|
StarknetClaim: string;
|
|
1078
1082
|
HandleAuth: string;
|
|
1079
1083
|
DFSSell: string;
|
|
1084
|
+
DFSSellNoFee: string;
|
|
1080
1085
|
SkyStake: string;
|
|
1081
1086
|
SkyUnstake: string;
|
|
1082
1087
|
SkyClaimRewards: string;
|
|
@@ -1315,6 +1320,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1315
1320
|
MorphoBlueView?: undefined;
|
|
1316
1321
|
} | {
|
|
1317
1322
|
DFSSell: string;
|
|
1323
|
+
DFSSellNoFee: string;
|
|
1318
1324
|
WrapEth: string;
|
|
1319
1325
|
UnwrapEth: string;
|
|
1320
1326
|
SendToken: string;
|
|
@@ -1575,6 +1581,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1575
1581
|
MorphoBlueView?: undefined;
|
|
1576
1582
|
} | {
|
|
1577
1583
|
DFSSell: string;
|
|
1584
|
+
DFSSellNoFee: string;
|
|
1578
1585
|
WrapEth: string;
|
|
1579
1586
|
UnwrapEth: string;
|
|
1580
1587
|
SendToken: string;
|
|
@@ -1835,6 +1842,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1835
1842
|
MorphoBlueView?: undefined;
|
|
1836
1843
|
} | {
|
|
1837
1844
|
DFSSell: string;
|
|
1845
|
+
DFSSellNoFee: string;
|
|
1838
1846
|
WrapEth: string;
|
|
1839
1847
|
UnwrapEth: string;
|
|
1840
1848
|
SendToken: string;
|
|
@@ -2262,6 +2270,7 @@ declare const _default: {
|
|
|
2262
2270
|
StarknetClaim: string;
|
|
2263
2271
|
HandleAuth: string;
|
|
2264
2272
|
DFSSell: string;
|
|
2273
|
+
DFSSellNoFee: string;
|
|
2265
2274
|
SkyStake: string;
|
|
2266
2275
|
SkyUnstake: string;
|
|
2267
2276
|
SkyClaimRewards: string;
|
|
@@ -2500,6 +2509,7 @@ declare const _default: {
|
|
|
2500
2509
|
MorphoBlueView?: undefined;
|
|
2501
2510
|
} | {
|
|
2502
2511
|
DFSSell: string;
|
|
2512
|
+
DFSSellNoFee: string;
|
|
2503
2513
|
WrapEth: string;
|
|
2504
2514
|
UnwrapEth: string;
|
|
2505
2515
|
SendToken: string;
|
|
@@ -2760,6 +2770,7 @@ declare const _default: {
|
|
|
2760
2770
|
MorphoBlueView?: undefined;
|
|
2761
2771
|
} | {
|
|
2762
2772
|
DFSSell: string;
|
|
2773
|
+
DFSSellNoFee: string;
|
|
2763
2774
|
WrapEth: string;
|
|
2764
2775
|
UnwrapEth: string;
|
|
2765
2776
|
SendToken: string;
|
|
@@ -3020,6 +3031,7 @@ declare const _default: {
|
|
|
3020
3031
|
MorphoBlueView?: undefined;
|
|
3021
3032
|
} | {
|
|
3022
3033
|
DFSSell: string;
|
|
3034
|
+
DFSSellNoFee: string;
|
|
3023
3035
|
WrapEth: string;
|
|
3024
3036
|
UnwrapEth: string;
|
|
3025
3037
|
SendToken: string;
|
|
@@ -3304,6 +3316,7 @@ declare const _default: {
|
|
|
3304
3316
|
StarknetClaim: string;
|
|
3305
3317
|
HandleAuth: string;
|
|
3306
3318
|
DFSSell: string;
|
|
3319
|
+
DFSSellNoFee: string;
|
|
3307
3320
|
SkyStake: string;
|
|
3308
3321
|
SkyUnstake: string;
|
|
3309
3322
|
SkyClaimRewards: string;
|
|
@@ -3542,6 +3555,7 @@ declare const _default: {
|
|
|
3542
3555
|
MorphoBlueView?: undefined;
|
|
3543
3556
|
} | {
|
|
3544
3557
|
DFSSell: string;
|
|
3558
|
+
DFSSellNoFee: string;
|
|
3545
3559
|
WrapEth: string;
|
|
3546
3560
|
UnwrapEth: string;
|
|
3547
3561
|
SendToken: string;
|
|
@@ -3802,6 +3816,7 @@ declare const _default: {
|
|
|
3802
3816
|
MorphoBlueView?: undefined;
|
|
3803
3817
|
} | {
|
|
3804
3818
|
DFSSell: string;
|
|
3819
|
+
DFSSellNoFee: string;
|
|
3805
3820
|
WrapEth: string;
|
|
3806
3821
|
UnwrapEth: string;
|
|
3807
3822
|
SendToken: string;
|
|
@@ -4062,6 +4077,7 @@ declare const _default: {
|
|
|
4062
4077
|
MorphoBlueView?: undefined;
|
|
4063
4078
|
} | {
|
|
4064
4079
|
DFSSell: string;
|
|
4080
|
+
DFSSellNoFee: string;
|
|
4065
4081
|
WrapEth: string;
|
|
4066
4082
|
UnwrapEth: string;
|
|
4067
4083
|
SendToken: string;
|
package/package.json
CHANGED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import AbiCoder from 'web3-eth-abi';
|
|
2
|
+
import { getAssetInfoByAddress } from '@defisaver/tokens';
|
|
3
|
+
import ActionAbi from '../../abis/Action.json';
|
|
4
|
+
import { ActionWithL2 } from '../../ActionWithL2';
|
|
5
|
+
import { requireAddress } from '../../utils/general';
|
|
6
|
+
import { getAddr } from '../../addresses';
|
|
7
|
+
import { EthAddress } from '../../types';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Sells token on DeFi Saver exchange aggregator without fee
|
|
11
|
+
*
|
|
12
|
+
* @category BasicActions
|
|
13
|
+
*/
|
|
14
|
+
export class SellNoFeeAction extends ActionWithL2 {
|
|
15
|
+
protocolFee:string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @param exchangeOrder Standard DFS Exchange data
|
|
19
|
+
* @param from Order sender
|
|
20
|
+
* @param to Order recipient
|
|
21
|
+
* @param protocolFee 0x fee (amount of ETH in Wei)
|
|
22
|
+
*/
|
|
23
|
+
constructor(exchangeOrder:Array<any>, from:EthAddress, to:EthAddress, protocolFee = '0') {
|
|
24
|
+
requireAddress(to);
|
|
25
|
+
super(
|
|
26
|
+
'DFSSellNoFee',
|
|
27
|
+
getAddr('DFSSellNoFee'),
|
|
28
|
+
[
|
|
29
|
+
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
30
|
+
'address',
|
|
31
|
+
'address',
|
|
32
|
+
],
|
|
33
|
+
[exchangeOrder, from, to],
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
this.protocolFee = protocolFee;
|
|
37
|
+
|
|
38
|
+
this.mappableArgs = [
|
|
39
|
+
this.args[0][0],
|
|
40
|
+
this.args[0][1],
|
|
41
|
+
this.args[0][2],
|
|
42
|
+
this.args[1],
|
|
43
|
+
this.args[2],
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
encodeInputs() {
|
|
48
|
+
const executeActionDirectAbi: any = (ActionAbi.find(({ name }) => name === 'executeActionDirect'))!;
|
|
49
|
+
return AbiCoder.encodeFunctionCall(executeActionDirectAbi, this._encodeForCall());
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async getAssetsToApprove() {
|
|
53
|
+
const asset = getAssetInfoByAddress(this.args[0][0]);
|
|
54
|
+
if (asset.symbol !== 'ETH') return [{ asset: this.args[0][0], owner: this.args[1] }];
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async getEthValue() {
|
|
59
|
+
return this.protocolFee || '0';
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -31,4 +31,5 @@ export * from './PermitTokenAction';
|
|
|
31
31
|
export * from './StarknetClaimAction';
|
|
32
32
|
export * from './HandleAuthAction';
|
|
33
33
|
export * from './SendTokensAndUnwrapAction';
|
|
34
|
-
export * from './KingClaimAction';
|
|
34
|
+
export * from './KingClaimAction';
|
|
35
|
+
export * from './SellNoFeeAction';
|
package/src/addresses.ts
CHANGED
|
@@ -29,7 +29,7 @@ export const actionAddresses = {
|
|
|
29
29
|
|
|
30
30
|
// exchange
|
|
31
31
|
DFSSell: '0x901d383c37b30cefad9b6e2bbb0539a40e02c5f4',
|
|
32
|
-
|
|
32
|
+
DFSSellNoFee: '0x3845C89c861eBb0a0c856CEBB064Ee93678bdE8E',
|
|
33
33
|
// sky
|
|
34
34
|
SkyStake: '0x5803C399EE9f887C8b81075E4C185c448361c235',
|
|
35
35
|
SkyUnstake: '0x4b6d3A01465fa88D7D596333D15832434a568452',
|
|
@@ -329,9 +329,9 @@ export const actionAddresses = {
|
|
|
329
329
|
|
|
330
330
|
// fluid
|
|
331
331
|
FluidVaultT1Open: '0x372404335C05C2493Ff156Ef60cC0B286f6f2971',
|
|
332
|
-
FluidVaultT1Adjust: '
|
|
332
|
+
FluidVaultT1Adjust: '0x8f1443c9F24843D14fa6b302A55C59468ED7D28B',
|
|
333
333
|
FluidVaultT1Borrow: '0x36AF0cE762a016e8b4a80c70Af406DFcBc1FCbD4',
|
|
334
|
-
FluidVaultT1Payback: '
|
|
334
|
+
FluidVaultT1Payback: '0xa7A4B84D38CD33F9901922687db24B8aE14f2455',
|
|
335
335
|
FluidVaultT1Withdraw: '0x5673b9ab4A035C5C7474C344664Be91DaFafa17E',
|
|
336
336
|
FluidVaultT1Supply: '0x0c6100209D8A0bb14CC7d18e45dA1bd1E7a3a187',
|
|
337
337
|
FluidView: '0xf8e3bbf7c95057be1fD5E741a9ADb73E956dC724',
|
|
@@ -339,6 +339,7 @@ export const actionAddresses = {
|
|
|
339
339
|
},
|
|
340
340
|
[NETWORKS.optimism.chainId]: {
|
|
341
341
|
DFSSell: '0x9f234af5c10c136863a20865ba00b26951ab8269',
|
|
342
|
+
DFSSellNoFee: '0x0000000000000000000000000000000000000000',
|
|
342
343
|
|
|
343
344
|
// basic
|
|
344
345
|
WrapEth: '0x6D735db054AC4a1F10f96b99f8550E9eefbC2AC5',
|
|
@@ -400,6 +401,7 @@ export const actionAddresses = {
|
|
|
400
401
|
},
|
|
401
402
|
[NETWORKS.arbitrum.chainId]: {
|
|
402
403
|
DFSSell: '0x1393eef11454ab068dd5e0d0be5eb922603eef1a',
|
|
404
|
+
DFSSellNoFee: '0x0000000000000000000000000000000000000000',
|
|
403
405
|
|
|
404
406
|
// basic
|
|
405
407
|
WrapEth: '0x35136b25bFA7CCC8f5b94E3181a16B61c06980F0',
|
|
@@ -475,9 +477,9 @@ export const actionAddresses = {
|
|
|
475
477
|
|
|
476
478
|
// fluid
|
|
477
479
|
FluidVaultT1Open: '0x1947Ce90ACCf0E243CcF85140fCceC2EfAeeA193',
|
|
478
|
-
FluidVaultT1Adjust: '
|
|
480
|
+
FluidVaultT1Adjust: '0xF8374Aa0F6d9D28790f90745f0360b5C945DEA20',
|
|
479
481
|
FluidVaultT1Borrow: '0x499da89aD564F5D6C828259ce55F53Fa288e7Be7',
|
|
480
|
-
FluidVaultT1Payback: '
|
|
482
|
+
FluidVaultT1Payback: '0x226c871E0a27B12065c9128b8e7440b054b59155',
|
|
481
483
|
FluidVaultT1Withdraw: '0xc13d93227d97197e5F1751d0a3e80c1080A5fa2B',
|
|
482
484
|
FluidVaultT1Supply: '0xBCF0Dc5bb2C4434AD07369207904F5900d391b0B',
|
|
483
485
|
FluidView: '0x2d51BB6Ac5c1eC8DD6432e1FF980fC864B626e01',
|
|
@@ -485,6 +487,7 @@ export const actionAddresses = {
|
|
|
485
487
|
[NETWORKS.base.chainId]: {
|
|
486
488
|
// Basic
|
|
487
489
|
DFSSell: '0xcd151d2bd3e129a4678f2116a9944b5aea0c860d',
|
|
490
|
+
DFSSellNoFee: '0x0000000000000000000000000000000000000000',
|
|
488
491
|
WrapEth: '0x491cc4AFbE0081C3464DeF1114ba27BE114b2401',
|
|
489
492
|
UnwrapEth: '0xcF91546046F16B3c38b890CC508E280BEffa66b9',
|
|
490
493
|
SendToken: '0x1420f4977E7B71AFddccBFc6F6e1505CefdF99F0',
|
|
@@ -549,9 +552,9 @@ export const actionAddresses = {
|
|
|
549
552
|
|
|
550
553
|
// fluid
|
|
551
554
|
FluidVaultT1Open: '0xCd4d5896AEAf97e738d3E7215ac01c2CF97474bc',
|
|
552
|
-
FluidVaultT1Adjust: '
|
|
555
|
+
FluidVaultT1Adjust: '0x4405A81c25Be495325f76Aa4d82176f9ae3275bc',
|
|
553
556
|
FluidVaultT1Borrow: '0x8dCBF436cC0971FE29886E58CE0CAeb36d43E91E',
|
|
554
|
-
FluidVaultT1Payback: '
|
|
557
|
+
FluidVaultT1Payback: '0xA65daAa4FB4Fe9feaDF25bf2C062c3Faa2b02e5D',
|
|
555
558
|
FluidVaultT1Withdraw: '0x26bE6a2EdE97aE826ed9DA8Fb79428037fe55cEB',
|
|
556
559
|
FluidVaultT1Supply: '0x028ACA45244d4897ff80ef65ed0b735Bb0D4B0A5',
|
|
557
560
|
FluidView: '0x5835CaDbA8843CD6d6d55782908351E9c74221aD',
|