@defisaver/sdk 1.0.34 → 1.0.35
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/flashloan/GhoFlashLoanAction.d.ts +15 -0
- package/esm/src/actions/flashloan/GhoFlashLoanAction.js +17 -0
- package/esm/src/actions/flashloan/GhoFlashLoanPaybackAction.d.ts +13 -0
- package/esm/src/actions/flashloan/GhoFlashLoanPaybackAction.js +15 -0
- package/esm/src/actions/flashloan/index.d.ts +2 -0
- package/esm/src/actions/flashloan/index.js +2 -0
- package/esm/src/addresses.d.ts +5 -0
- package/esm/src/addresses.js +2 -0
- package/esm/src/index.d.ts +20 -0
- package/package.json +1 -1
- package/src/actions/flashloan/GhoFlashLoanAction.ts +24 -0
- package/src/actions/flashloan/GhoFlashLoanPaybackAction.ts +17 -0
- package/src/actions/flashloan/index.ts +2 -0
- package/src/addresses.ts +2 -0
- package/umd/index.js +367 -303
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256, bytes } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Gets a GHO flashloan from GHO Flash Minter
|
|
5
|
+
*
|
|
6
|
+
* @category Flashloans
|
|
7
|
+
*/
|
|
8
|
+
export declare class GhoFlashLoanAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param amount
|
|
11
|
+
* @param flParamGetterAddr
|
|
12
|
+
* @param flParamGetterData
|
|
13
|
+
*/
|
|
14
|
+
constructor(amount: uint256, flParamGetterAddr?: EthAddress, flParamGetterData?: bytes);
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* Gets a GHO flashloan from GHO Flash Minter
|
|
5
|
+
*
|
|
6
|
+
* @category Flashloans
|
|
7
|
+
*/
|
|
8
|
+
export class GhoFlashLoanAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param amount
|
|
11
|
+
* @param flParamGetterAddr
|
|
12
|
+
* @param flParamGetterData
|
|
13
|
+
*/
|
|
14
|
+
constructor(amount, flParamGetterAddr = getAddr('Empty'), flParamGetterData = []) {
|
|
15
|
+
super('FLGho', getAddr('FLGho'), ['address[]', 'uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes'], [[], [amount], [], getAddr('Empty'), flParamGetterAddr, flParamGetterData, []]);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SendTokenAction } from '../basic';
|
|
2
|
+
import { uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Pays back a flashloan from GHO
|
|
5
|
+
*
|
|
6
|
+
* @category Flashloans
|
|
7
|
+
*/
|
|
8
|
+
export declare class GhoFlashLoanPaybackAction extends SendTokenAction {
|
|
9
|
+
/**
|
|
10
|
+
* @param loanAmount
|
|
11
|
+
*/
|
|
12
|
+
constructor(loanAmount: uint256);
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SendTokenAction } from '../basic';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* Pays back a flashloan from GHO
|
|
5
|
+
*
|
|
6
|
+
* @category Flashloans
|
|
7
|
+
*/
|
|
8
|
+
export class GhoFlashLoanPaybackAction extends SendTokenAction {
|
|
9
|
+
/**
|
|
10
|
+
* @param loanAmount
|
|
11
|
+
*/
|
|
12
|
+
constructor(loanAmount) {
|
|
13
|
+
super(getAddr('GHO'), getAddr('FLGho'), loanAmount);
|
|
14
|
+
}
|
|
15
|
+
}
|
package/esm/src/addresses.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export declare const actionAddresses: {
|
|
|
74
74
|
FLBalancer: string;
|
|
75
75
|
FLAction: string;
|
|
76
76
|
FLUniV3: string;
|
|
77
|
+
FLGho: string;
|
|
77
78
|
UniSupply: string;
|
|
78
79
|
UniWithdraw: string;
|
|
79
80
|
UniCollectV3: string;
|
|
@@ -228,6 +229,7 @@ export declare const actionAddresses: {
|
|
|
228
229
|
FLDyDx?: undefined;
|
|
229
230
|
FLMaker?: undefined;
|
|
230
231
|
FLUniV3?: undefined;
|
|
232
|
+
FLGho?: undefined;
|
|
231
233
|
UniSupply?: undefined;
|
|
232
234
|
UniWithdraw?: undefined;
|
|
233
235
|
DyDxWithdraw?: undefined;
|
|
@@ -373,6 +375,7 @@ export declare const actionAddresses: {
|
|
|
373
375
|
FLDyDx?: undefined;
|
|
374
376
|
FLMaker?: undefined;
|
|
375
377
|
FLUniV3?: undefined;
|
|
378
|
+
FLGho?: undefined;
|
|
376
379
|
UniSupply?: undefined;
|
|
377
380
|
UniWithdraw?: undefined;
|
|
378
381
|
DyDxWithdraw?: undefined;
|
|
@@ -455,6 +458,7 @@ export declare const otherAddresses: {
|
|
|
455
458
|
CrvToken: string;
|
|
456
459
|
CvxToken: string;
|
|
457
460
|
DAI: string;
|
|
461
|
+
GHO: string;
|
|
458
462
|
LUSD: string;
|
|
459
463
|
BLUSD: string;
|
|
460
464
|
Empty: string;
|
|
@@ -479,6 +483,7 @@ export declare const otherAddresses: {
|
|
|
479
483
|
CrvToken?: undefined;
|
|
480
484
|
CvxToken?: undefined;
|
|
481
485
|
DAI?: undefined;
|
|
486
|
+
GHO?: undefined;
|
|
482
487
|
LUSD?: undefined;
|
|
483
488
|
BLUSD?: undefined;
|
|
484
489
|
};
|
package/esm/src/addresses.js
CHANGED
|
@@ -85,6 +85,7 @@ export const actionAddresses = {
|
|
|
85
85
|
FLBalancer: '0x540a83E36E5E6Aa916A6c591934d800e17115048',
|
|
86
86
|
FLAction: '0x72915D41982DfCAf30b871290618E59C45Edba7F',
|
|
87
87
|
FLUniV3: '0x9CAdAC8Be718572F82B672b950c53F0b58483A35',
|
|
88
|
+
FLGho: '0xbb67b81dD080a406227A38965d0393f396ddECBc',
|
|
88
89
|
// uniswap
|
|
89
90
|
UniSupply: '0x9935e12F0218E61c27D7f23eAC9A9D6881a078eC',
|
|
90
91
|
UniWithdraw: '0xf8bb8F68b0A45DC315F3f7602a60cfb274B00951',
|
|
@@ -255,6 +256,7 @@ export const otherAddresses = {
|
|
|
255
256
|
CrvToken: '0xD533a949740bb3306d119CC777fa900bA034cd52',
|
|
256
257
|
CvxToken: '0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B',
|
|
257
258
|
DAI: '0x6b175474e89094c44da98b954eedeac495271d0f',
|
|
259
|
+
GHO: '0x40d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f',
|
|
258
260
|
LUSD: '0x5f98805A4E8be255a32880FDeC7F6728C6568bA0',
|
|
259
261
|
BLUSD: '0x76F7774139bf0097d2882C41AF5A37717e3641A7',
|
|
260
262
|
Empty: '0x0000000000000000000000000000000000000000',
|
package/esm/src/index.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ declare const actionAddressesAllChains: {
|
|
|
85
85
|
FLBalancer: string;
|
|
86
86
|
FLAction: string;
|
|
87
87
|
FLUniV3: string;
|
|
88
|
+
FLGho: string;
|
|
88
89
|
UniSupply: string;
|
|
89
90
|
UniWithdraw: string;
|
|
90
91
|
UniCollectV3: string;
|
|
@@ -239,6 +240,7 @@ declare const actionAddressesAllChains: {
|
|
|
239
240
|
FLDyDx?: undefined;
|
|
240
241
|
FLMaker?: undefined;
|
|
241
242
|
FLUniV3?: undefined;
|
|
243
|
+
FLGho?: undefined;
|
|
242
244
|
UniSupply?: undefined;
|
|
243
245
|
UniWithdraw?: undefined;
|
|
244
246
|
DyDxWithdraw?: undefined;
|
|
@@ -384,6 +386,7 @@ declare const actionAddressesAllChains: {
|
|
|
384
386
|
FLDyDx?: undefined;
|
|
385
387
|
FLMaker?: undefined;
|
|
386
388
|
FLUniV3?: undefined;
|
|
389
|
+
FLGho?: undefined;
|
|
387
390
|
UniSupply?: undefined;
|
|
388
391
|
UniWithdraw?: undefined;
|
|
389
392
|
DyDxWithdraw?: undefined;
|
|
@@ -525,6 +528,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
525
528
|
FLBalancer: string;
|
|
526
529
|
FLAction: string;
|
|
527
530
|
FLUniV3: string;
|
|
531
|
+
FLGho: string;
|
|
528
532
|
UniSupply: string;
|
|
529
533
|
UniWithdraw: string;
|
|
530
534
|
UniCollectV3: string;
|
|
@@ -679,6 +683,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
679
683
|
FLDyDx?: undefined;
|
|
680
684
|
FLMaker?: undefined;
|
|
681
685
|
FLUniV3?: undefined;
|
|
686
|
+
FLGho?: undefined;
|
|
682
687
|
UniSupply?: undefined;
|
|
683
688
|
UniWithdraw?: undefined;
|
|
684
689
|
DyDxWithdraw?: undefined;
|
|
@@ -824,6 +829,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
824
829
|
FLDyDx?: undefined;
|
|
825
830
|
FLMaker?: undefined;
|
|
826
831
|
FLUniV3?: undefined;
|
|
832
|
+
FLGho?: undefined;
|
|
827
833
|
UniSupply?: undefined;
|
|
828
834
|
UniWithdraw?: undefined;
|
|
829
835
|
DyDxWithdraw?: undefined;
|
|
@@ -905,6 +911,7 @@ declare const otherAddressesAllChains: {
|
|
|
905
911
|
CrvToken: string;
|
|
906
912
|
CvxToken: string;
|
|
907
913
|
DAI: string;
|
|
914
|
+
GHO: string;
|
|
908
915
|
LUSD: string;
|
|
909
916
|
BLUSD: string;
|
|
910
917
|
Empty: string;
|
|
@@ -929,6 +936,7 @@ declare const otherAddressesAllChains: {
|
|
|
929
936
|
CrvToken?: undefined;
|
|
930
937
|
CvxToken?: undefined;
|
|
931
938
|
DAI?: undefined;
|
|
939
|
+
GHO?: undefined;
|
|
932
940
|
LUSD?: undefined;
|
|
933
941
|
BLUSD?: undefined;
|
|
934
942
|
};
|
|
@@ -947,6 +955,7 @@ declare const otherAddresses: (chainId?: null) => {
|
|
|
947
955
|
CrvToken: string;
|
|
948
956
|
CvxToken: string;
|
|
949
957
|
DAI: string;
|
|
958
|
+
GHO: string;
|
|
950
959
|
LUSD: string;
|
|
951
960
|
BLUSD: string;
|
|
952
961
|
Empty: string;
|
|
@@ -971,6 +980,7 @@ declare const otherAddresses: (chainId?: null) => {
|
|
|
971
980
|
CrvToken?: undefined;
|
|
972
981
|
CvxToken?: undefined;
|
|
973
982
|
DAI?: undefined;
|
|
983
|
+
GHO?: undefined;
|
|
974
984
|
LUSD?: undefined;
|
|
975
985
|
BLUSD?: undefined;
|
|
976
986
|
};
|
|
@@ -1062,6 +1072,7 @@ declare const _default: {
|
|
|
1062
1072
|
FLBalancer: string;
|
|
1063
1073
|
FLAction: string;
|
|
1064
1074
|
FLUniV3: string;
|
|
1075
|
+
FLGho: string;
|
|
1065
1076
|
UniSupply: string;
|
|
1066
1077
|
UniWithdraw: string;
|
|
1067
1078
|
UniCollectV3: string;
|
|
@@ -1216,6 +1227,7 @@ declare const _default: {
|
|
|
1216
1227
|
FLDyDx?: undefined;
|
|
1217
1228
|
FLMaker?: undefined;
|
|
1218
1229
|
FLUniV3?: undefined;
|
|
1230
|
+
FLGho?: undefined;
|
|
1219
1231
|
UniSupply?: undefined;
|
|
1220
1232
|
UniWithdraw?: undefined;
|
|
1221
1233
|
DyDxWithdraw?: undefined;
|
|
@@ -1361,6 +1373,7 @@ declare const _default: {
|
|
|
1361
1373
|
FLDyDx?: undefined;
|
|
1362
1374
|
FLMaker?: undefined;
|
|
1363
1375
|
FLUniV3?: undefined;
|
|
1376
|
+
FLGho?: undefined;
|
|
1364
1377
|
UniSupply?: undefined;
|
|
1365
1378
|
UniWithdraw?: undefined;
|
|
1366
1379
|
DyDxWithdraw?: undefined;
|
|
@@ -1502,6 +1515,7 @@ declare const _default: {
|
|
|
1502
1515
|
FLBalancer: string;
|
|
1503
1516
|
FLAction: string;
|
|
1504
1517
|
FLUniV3: string;
|
|
1518
|
+
FLGho: string;
|
|
1505
1519
|
UniSupply: string;
|
|
1506
1520
|
UniWithdraw: string;
|
|
1507
1521
|
UniCollectV3: string;
|
|
@@ -1656,6 +1670,7 @@ declare const _default: {
|
|
|
1656
1670
|
FLDyDx?: undefined;
|
|
1657
1671
|
FLMaker?: undefined;
|
|
1658
1672
|
FLUniV3?: undefined;
|
|
1673
|
+
FLGho?: undefined;
|
|
1659
1674
|
UniSupply?: undefined;
|
|
1660
1675
|
UniWithdraw?: undefined;
|
|
1661
1676
|
DyDxWithdraw?: undefined;
|
|
@@ -1801,6 +1816,7 @@ declare const _default: {
|
|
|
1801
1816
|
FLDyDx?: undefined;
|
|
1802
1817
|
FLMaker?: undefined;
|
|
1803
1818
|
FLUniV3?: undefined;
|
|
1819
|
+
FLGho?: undefined;
|
|
1804
1820
|
UniSupply?: undefined;
|
|
1805
1821
|
UniWithdraw?: undefined;
|
|
1806
1822
|
DyDxWithdraw?: undefined;
|
|
@@ -1882,6 +1898,7 @@ declare const _default: {
|
|
|
1882
1898
|
CrvToken: string;
|
|
1883
1899
|
CvxToken: string;
|
|
1884
1900
|
DAI: string;
|
|
1901
|
+
GHO: string;
|
|
1885
1902
|
LUSD: string;
|
|
1886
1903
|
BLUSD: string;
|
|
1887
1904
|
Empty: string;
|
|
@@ -1906,6 +1923,7 @@ declare const _default: {
|
|
|
1906
1923
|
CrvToken?: undefined;
|
|
1907
1924
|
CvxToken?: undefined;
|
|
1908
1925
|
DAI?: undefined;
|
|
1926
|
+
GHO?: undefined;
|
|
1909
1927
|
LUSD?: undefined;
|
|
1910
1928
|
BLUSD?: undefined;
|
|
1911
1929
|
};
|
|
@@ -1924,6 +1942,7 @@ declare const _default: {
|
|
|
1924
1942
|
CrvToken: string;
|
|
1925
1943
|
CvxToken: string;
|
|
1926
1944
|
DAI: string;
|
|
1945
|
+
GHO: string;
|
|
1927
1946
|
LUSD: string;
|
|
1928
1947
|
BLUSD: string;
|
|
1929
1948
|
Empty: string;
|
|
@@ -1948,6 +1967,7 @@ declare const _default: {
|
|
|
1948
1967
|
CrvToken?: undefined;
|
|
1949
1968
|
CvxToken?: undefined;
|
|
1950
1969
|
DAI?: undefined;
|
|
1970
|
+
GHO?: undefined;
|
|
1951
1971
|
LUSD?: undefined;
|
|
1952
1972
|
BLUSD?: undefined;
|
|
1953
1973
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
import { EthAddress, uint256, bytes } from '../../types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Gets a GHO flashloan from GHO Flash Minter
|
|
7
|
+
*
|
|
8
|
+
* @category Flashloans
|
|
9
|
+
*/
|
|
10
|
+
export class GhoFlashLoanAction extends Action {
|
|
11
|
+
/**
|
|
12
|
+
* @param amount
|
|
13
|
+
* @param flParamGetterAddr
|
|
14
|
+
* @param flParamGetterData
|
|
15
|
+
*/
|
|
16
|
+
constructor(amount:uint256, flParamGetterAddr:EthAddress = getAddr('Empty'), flParamGetterData:bytes = []) {
|
|
17
|
+
super(
|
|
18
|
+
'FLGho',
|
|
19
|
+
getAddr('FLGho'),
|
|
20
|
+
['address[]', 'uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes'],
|
|
21
|
+
[[], [amount], [], getAddr('Empty'), flParamGetterAddr, flParamGetterData, []],
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SendTokenAction } from '../basic';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
import { uint256 } from '../../types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Pays back a flashloan from GHO
|
|
7
|
+
*
|
|
8
|
+
* @category Flashloans
|
|
9
|
+
*/
|
|
10
|
+
export class GhoFlashLoanPaybackAction extends SendTokenAction {
|
|
11
|
+
/**
|
|
12
|
+
* @param loanAmount
|
|
13
|
+
*/
|
|
14
|
+
constructor(loanAmount:uint256) {
|
|
15
|
+
super(getAddr('GHO'), getAddr('FLGho'), loanAmount);
|
|
16
|
+
}
|
|
17
|
+
}
|
package/src/addresses.ts
CHANGED
|
@@ -96,6 +96,7 @@ export const actionAddresses = {
|
|
|
96
96
|
FLBalancer: '0x540a83E36E5E6Aa916A6c591934d800e17115048',
|
|
97
97
|
FLAction: '0x72915D41982DfCAf30b871290618E59C45Edba7F',
|
|
98
98
|
FLUniV3: '0x9CAdAC8Be718572F82B672b950c53F0b58483A35',
|
|
99
|
+
FLGho: '0xbb67b81dD080a406227A38965d0393f396ddECBc',
|
|
99
100
|
|
|
100
101
|
// uniswap
|
|
101
102
|
UniSupply: '0x9935e12F0218E61c27D7f23eAC9A9D6881a078eC',
|
|
@@ -301,6 +302,7 @@ export const otherAddresses = {
|
|
|
301
302
|
CrvToken: '0xD533a949740bb3306d119CC777fa900bA034cd52',
|
|
302
303
|
CvxToken: '0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B',
|
|
303
304
|
DAI: '0x6b175474e89094c44da98b954eedeac495271d0f',
|
|
305
|
+
GHO: '0x40d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f',
|
|
304
306
|
LUSD: '0x5f98805A4E8be255a32880FDeC7F6728C6568bA0',
|
|
305
307
|
BLUSD: '0x76F7774139bf0097d2882C41AF5A37717e3641A7',
|
|
306
308
|
Empty: '0x0000000000000000000000000000000000000000',
|