@defisaver/sdk 1.3.26 → 1.3.27-midnight-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/Action.js +23 -5
- package/esm/src/actions/aaveV3/AaveV3DelegateCredit.d.ts +1 -1
- package/esm/src/actions/aaveV3/AaveV3DelegateCredit.js +1 -1
- package/esm/src/actions/flashloan/AaveV3FlashLoanAction.d.ts +1 -1
- package/esm/src/actions/flashloan/AaveV3FlashLoanAction.js +1 -1
- package/esm/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.d.ts +4 -2
- package/esm/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.js +12 -6
- package/esm/src/actions/flashloan/AaveV3FlashLoanNoFeeAction.d.ts +1 -1
- package/esm/src/actions/flashloan/AaveV3FlashLoanNoFeeAction.js +1 -1
- package/esm/src/actions/index.d.ts +2 -1
- package/esm/src/actions/index.js +2 -1
- package/esm/src/actions/midnight/MidnightBorrowFromOrdersAction.d.ts +18 -0
- package/esm/src/actions/midnight/MidnightBorrowFromOrdersAction.js +28 -0
- package/esm/src/actions/midnight/MidnightPaybackDirectAction.d.ts +16 -0
- package/esm/src/actions/midnight/MidnightPaybackDirectAction.js +24 -0
- package/esm/src/actions/midnight/MidnightPaybackFromOrdersAction.d.ts +18 -0
- package/esm/src/actions/midnight/MidnightPaybackFromOrdersAction.js +28 -0
- package/esm/src/actions/midnight/MidnightSupplyCollateralAction.d.ts +17 -0
- package/esm/src/actions/midnight/MidnightSupplyCollateralAction.js +26 -0
- package/esm/src/actions/midnight/MidnightWithdrawCollateralAction.d.ts +17 -0
- package/esm/src/actions/midnight/MidnightWithdrawCollateralAction.js +26 -0
- package/esm/src/actions/midnight/index.d.ts +5 -0
- package/esm/src/actions/midnight/index.js +5 -0
- package/esm/src/actions/uniswap/index.d.ts +0 -1
- package/esm/src/actions/uniswap/index.js +0 -1
- package/esm/src/addresses.d.ts +44 -14
- package/esm/src/addresses.js +10 -13
- package/esm/src/index.d.ts +176 -56
- package/package.json +1 -1
- package/src/Action.ts +21 -5
- package/src/actions/aaveV3/AaveV3DelegateCredit.ts +1 -1
- package/src/actions/flashloan/AaveV3FlashLoanAction.ts +1 -1
- package/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.ts +13 -7
- package/src/actions/flashloan/AaveV3FlashLoanNoFeeAction.ts +1 -1
- package/src/actions/index.ts +2 -0
- package/src/actions/midnight/MidnightBorrowFromOrdersAction.ts +44 -0
- package/src/actions/midnight/MidnightPaybackDirectAction.ts +36 -0
- package/src/actions/midnight/MidnightPaybackFromOrdersAction.ts +44 -0
- package/src/actions/midnight/MidnightSupplyCollateralAction.ts +39 -0
- package/src/actions/midnight/MidnightWithdrawCollateralAction.ts +39 -0
- package/src/actions/midnight/index.ts +5 -0
- package/src/actions/uniswap/index.ts +1 -2
- package/src/addresses.ts +11 -13
- package/umd/index.js +898 -727
- package/esm/src/actions/uniswap/UniswapClaimAction.d.ts +0 -16
- package/esm/src/actions/uniswap/UniswapClaimAction.js +0 -23
- package/src/actions/uniswap/UniswapClaimAction.ts +0 -31
- package/test/actions/uniswap/UniswapClaimAction.js +0 -31
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Action } from '../../Action';
|
|
2
|
-
import { EthAddress, uint256, bytes32 } from '../../types';
|
|
3
|
-
/**
|
|
4
|
-
* UniswapClaimAction - Claims UNI tokens from the Uniswap merkle distributor
|
|
5
|
-
*
|
|
6
|
-
* @category Uniswap
|
|
7
|
-
*/
|
|
8
|
-
export declare class UniswapClaimAction extends Action {
|
|
9
|
-
/**
|
|
10
|
-
* @param index - Index of the claim in the merkle tree
|
|
11
|
-
* @param to - Address where to send the claimed UNI
|
|
12
|
-
* @param amount - Amount of UNI allocated to the smart wallet in the merkle tree
|
|
13
|
-
* @param merkleProof - Merkle proof of the claim
|
|
14
|
-
*/
|
|
15
|
-
constructor(index: uint256, to: EthAddress, amount: uint256, merkleProof: Array<bytes32>);
|
|
16
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Action } from '../../Action';
|
|
2
|
-
import { getAddr } from '../../addresses';
|
|
3
|
-
/**
|
|
4
|
-
* UniswapClaimAction - Claims UNI tokens from the Uniswap merkle distributor
|
|
5
|
-
*
|
|
6
|
-
* @category Uniswap
|
|
7
|
-
*/
|
|
8
|
-
export class UniswapClaimAction extends Action {
|
|
9
|
-
/**
|
|
10
|
-
* @param index - Index of the claim in the merkle tree
|
|
11
|
-
* @param to - Address where to send the claimed UNI
|
|
12
|
-
* @param amount - Amount of UNI allocated to the smart wallet in the merkle tree
|
|
13
|
-
* @param merkleProof - Merkle proof of the claim
|
|
14
|
-
*/
|
|
15
|
-
constructor(index, to, amount, merkleProof) {
|
|
16
|
-
super('UniswapClaim', getAddr('UniswapClaim'), ['uint256', 'address', 'uint256', 'bytes32[]'], [index, to, amount, merkleProof]);
|
|
17
|
-
this.mappableArgs = [
|
|
18
|
-
this.args[0],
|
|
19
|
-
this.args[1],
|
|
20
|
-
this.args[2],
|
|
21
|
-
];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Action } from '../../Action';
|
|
2
|
-
import { getAddr } from '../../addresses';
|
|
3
|
-
import { EthAddress, uint256, bytes32 } from '../../types';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* UniswapClaimAction - Claims UNI tokens from the Uniswap merkle distributor
|
|
7
|
-
*
|
|
8
|
-
* @category Uniswap
|
|
9
|
-
*/
|
|
10
|
-
export class UniswapClaimAction extends Action {
|
|
11
|
-
/**
|
|
12
|
-
* @param index - Index of the claim in the merkle tree
|
|
13
|
-
* @param to - Address where to send the claimed UNI
|
|
14
|
-
* @param amount - Amount of UNI allocated to the smart wallet in the merkle tree
|
|
15
|
-
* @param merkleProof - Merkle proof of the claim
|
|
16
|
-
*/
|
|
17
|
-
constructor(index: uint256, to: EthAddress, amount: uint256, merkleProof: Array<bytes32>) {
|
|
18
|
-
super(
|
|
19
|
-
'UniswapClaim',
|
|
20
|
-
getAddr('UniswapClaim'),
|
|
21
|
-
['uint256', 'address', 'uint256', 'bytes32[]'],
|
|
22
|
-
[index, to, amount, merkleProof],
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
this.mappableArgs = [
|
|
26
|
-
this.args[0],
|
|
27
|
-
this.args[1],
|
|
28
|
-
this.args[2],
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const dfs = require('../../../src');
|
|
2
|
-
const {encodeForDsProxyCall, encodeForRecipe} = require('../../_actionUtils');
|
|
3
|
-
const {assert} = require('chai');
|
|
4
|
-
|
|
5
|
-
describe('Action: UniswapClaimAction', () => {
|
|
6
|
-
let action;
|
|
7
|
-
context('Claim encoding', () => {
|
|
8
|
-
it('constructor', () => {
|
|
9
|
-
const index = '137';
|
|
10
|
-
const to = '0xC093dFcC2cBc4e9488589B7c2245a7F1DA043389';
|
|
11
|
-
const amount = '4809093062235489680';
|
|
12
|
-
const merkleProof = [
|
|
13
|
-
'0xd496d2a15cf30a2af545b0fd4ced50fb4224bb54e7c9add4885c7b7408c907a1',
|
|
14
|
-
'0x6a8fc6432934b1f2c9f9aed040f4389c0450dd94aff92b16864060e95fba4290',
|
|
15
|
-
'0xb7491e5e898e774e11c50044140df4c1c74bf9cd7855bac78f0709699ed0e6b7',
|
|
16
|
-
];
|
|
17
|
-
action = new dfs.actions.uniswap.UniswapClaimAction(
|
|
18
|
-
index,
|
|
19
|
-
to,
|
|
20
|
-
amount,
|
|
21
|
-
merkleProof,
|
|
22
|
-
);
|
|
23
|
-
})
|
|
24
|
-
it('encodeForDsProxyCall', () => encodeForDsProxyCall(action));
|
|
25
|
-
it('encodeForRecipe', () => encodeForRecipe(action));
|
|
26
|
-
it('getEthValue', async () => {
|
|
27
|
-
const ethValue = await action.getEthValue();
|
|
28
|
-
assert.equal(ethValue, '0');
|
|
29
|
-
})
|
|
30
|
-
})
|
|
31
|
-
})
|