@defisaver/sdk 1.2.9-dev-morpho → 1.2.9-dev-ether-fi
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/etherfi/EtherFiStakeAction.d.ts +20 -0
- package/esm/src/actions/etherfi/EtherFiStakeAction.js +41 -0
- package/esm/src/actions/etherfi/EtherFiUnwrapAction.d.ts +19 -0
- package/esm/src/actions/etherfi/EtherFiUnwrapAction.js +39 -0
- package/esm/src/actions/etherfi/EtherFiWrapAction.d.ts +19 -0
- package/esm/src/actions/etherfi/EtherFiWrapAction.js +39 -0
- package/esm/src/actions/etherfi/index.d.ts +3 -0
- package/esm/src/actions/etherfi/index.js +3 -0
- package/esm/src/actions/index.d.ts +2 -1
- package/esm/src/actions/index.js +2 -1
- package/esm/src/actions/morpho-blue/index.d.ts +0 -1
- package/esm/src/actions/morpho-blue/index.js +0 -1
- package/esm/src/addresses.d.ts +12 -4
- package/esm/src/addresses.js +5 -2
- package/esm/src/index.d.ts +48 -16
- package/package.json +1 -1
- package/src/actions/etherfi/EtherFiStakeAction.ts +38 -0
- package/src/actions/etherfi/EtherFiUnwrapAction.ts +31 -0
- package/src/actions/etherfi/EtherFiWrapAction.ts +36 -0
- package/src/actions/etherfi/index.ts +3 -0
- package/src/actions/index.ts +2 -0
- package/src/actions/morpho-blue/index.ts +1 -2
- package/src/addresses.ts +6 -2
- package/test/actions/etherFi/EtherFiStakeAction.js +66 -0
- package/test/actions/etherFi/EtherFiUnwrapAction.js +35 -0
- package/test/actions/etherFi/EtherFiWrapAction.js +35 -0
- package/umd/index.js +287 -153
- package/esm/src/actions/morpho-blue/MorphoTokenWrapAction.d.ts +0 -14
- package/esm/src/actions/morpho-blue/MorphoTokenWrapAction.js +0 -20
- package/src/actions/morpho-blue/MorphoTokenWrapAction.ts +0 -23
- package/test/actions/morpho-blue/MorphoTokenWrapAction.js +0 -37
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Action } from '../../Action';
|
|
2
|
-
import { EthAddress, uint256 } from '../../types';
|
|
3
|
-
/**
|
|
4
|
-
* MorphoTokenWrapAction - Wraps Legacy MORPHO token on wallet to new Wrapped MORPHO token
|
|
5
|
-
*
|
|
6
|
-
* @category Morpho
|
|
7
|
-
*/
|
|
8
|
-
export declare class MorphoTokenWrapAction extends Action {
|
|
9
|
-
/**
|
|
10
|
-
* @param to - The address to which to send the new Wrapped MORPHO tokens
|
|
11
|
-
* @param amount - The amount of Legacy MORPHO tokens to wrap, if type(uint256).max wraps whole wallet balance
|
|
12
|
-
*/
|
|
13
|
-
constructor(to: EthAddress, amount: uint256);
|
|
14
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Action } from '../../Action';
|
|
2
|
-
import { getAddr } from '../../addresses';
|
|
3
|
-
/**
|
|
4
|
-
* MorphoTokenWrapAction - Wraps Legacy MORPHO token on wallet to new Wrapped MORPHO token
|
|
5
|
-
*
|
|
6
|
-
* @category Morpho
|
|
7
|
-
*/
|
|
8
|
-
export class MorphoTokenWrapAction extends Action {
|
|
9
|
-
/**
|
|
10
|
-
* @param to - The address to which to send the new Wrapped MORPHO tokens
|
|
11
|
-
* @param amount - The amount of Legacy MORPHO tokens to wrap, if type(uint256).max wraps whole wallet balance
|
|
12
|
-
*/
|
|
13
|
-
constructor(to, amount) {
|
|
14
|
-
super('MorphoTokenWrap', getAddr('MorphoTokenWrap'), ['address', 'uint256'], [to, amount]);
|
|
15
|
-
this.mappableArgs = [
|
|
16
|
-
this.args[0],
|
|
17
|
-
this.args[1],
|
|
18
|
-
];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Action } from '../../Action';
|
|
2
|
-
import { getAddr } from '../../addresses';
|
|
3
|
-
import { EthAddress, uint256 } from '../../types';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* MorphoTokenWrapAction - Wraps Legacy MORPHO token on wallet to new Wrapped MORPHO token
|
|
7
|
-
*
|
|
8
|
-
* @category Morpho
|
|
9
|
-
*/
|
|
10
|
-
export class MorphoTokenWrapAction extends Action {
|
|
11
|
-
/**
|
|
12
|
-
* @param to - The address to which to send the new Wrapped MORPHO tokens
|
|
13
|
-
* @param amount - The amount of Legacy MORPHO tokens to wrap, if type(uint256).max wraps whole wallet balance
|
|
14
|
-
*/
|
|
15
|
-
constructor(to:EthAddress, amount:uint256) {
|
|
16
|
-
super('MorphoTokenWrap', getAddr('MorphoTokenWrap'), ['address', 'uint256'], [to, amount]);
|
|
17
|
-
|
|
18
|
-
this.mappableArgs = [
|
|
19
|
-
this.args[0],
|
|
20
|
-
this.args[1],
|
|
21
|
-
];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
const dfs = require('../../../src');
|
|
2
|
-
const {encodeForDsProxyCall, encodeForRecipe} = require('../../_actionUtils');
|
|
3
|
-
const {assert} = require('chai');
|
|
4
|
-
|
|
5
|
-
describe('Action: MorphoTokenWrapAction', () => {
|
|
6
|
-
let action;
|
|
7
|
-
context('Wraps 100 MORPHO tokens', () => {
|
|
8
|
-
it('constructor', () => {
|
|
9
|
-
const to = '0x80788de454ad3681d357dc7FcB13c72333f684a7';
|
|
10
|
-
const amount = 100;
|
|
11
|
-
action = new dfs.actions.morphoblue.MorphoTokenWrapAction(to, amount);
|
|
12
|
-
assert.equal(action.args[0], to);
|
|
13
|
-
assert.equal(action.args[1], amount);
|
|
14
|
-
})
|
|
15
|
-
it('encodeForDsProxyCall', () => encodeForDsProxyCall(action));
|
|
16
|
-
it('encodeForRecipe', () => encodeForRecipe(action));
|
|
17
|
-
it('getEthValue', async () => {
|
|
18
|
-
const ethValue = await action.getEthValue();
|
|
19
|
-
assert.equal(ethValue, '0');
|
|
20
|
-
})
|
|
21
|
-
})
|
|
22
|
-
context('Wraps MaxUint256 MORPHO tokens', () => {
|
|
23
|
-
it('constructor', () => {
|
|
24
|
-
const to = '0x80788de454ad3681d357dc7FcB13c72333f684a7';
|
|
25
|
-
const amount = '115792089237316195423570985008687907853269984665640564039457584007913129639935';
|
|
26
|
-
action = new dfs.actions.morphoblue.MorphoTokenWrapAction(to, amount);
|
|
27
|
-
assert.equal(action.args[0], to);
|
|
28
|
-
assert.equal(action.args[1], amount);
|
|
29
|
-
})
|
|
30
|
-
it('encodeForDsProxyCall', () => encodeForDsProxyCall(action));
|
|
31
|
-
it('encodeForRecipe', () => encodeForRecipe(action));
|
|
32
|
-
it('getEthValue', async () => {
|
|
33
|
-
const ethValue = await action.getEthValue();
|
|
34
|
-
assert.equal(ethValue, '0');
|
|
35
|
-
})
|
|
36
|
-
})
|
|
37
|
-
})
|