@defisaver/sdk 1.0.64 → 1.0.66-dev-1
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/ExecuteSafeTxAction.d.ts +23 -0
- package/esm/src/actions/basic/ExecuteSafeTxAction.js +60 -0
- package/esm/src/actions/basic/LimitSellAction.d.ts +24 -0
- package/esm/src/actions/basic/LimitSellAction.js +63 -0
- package/esm/src/actions/basic/RemoveTokenApprovalAction.d.ts +15 -0
- package/esm/src/actions/basic/RemoveTokenApprovalAction.js +42 -0
- package/esm/src/actions/basic/index.d.ts +3 -0
- package/esm/src/actions/basic/index.js +3 -0
- package/esm/src/actions/checkers/index.d.ts +0 -1
- package/esm/src/actions/checkers/index.js +0 -1
- package/esm/src/actions/maker/MakerGiveAction.d.ts +1 -2
- package/esm/src/actions/maker/MakerGiveAction.js +2 -3
- package/esm/src/addresses.d.ts +3 -3
- package/esm/src/addresses.js +3 -6
- package/esm/src/index.d.ts +12 -12
- package/esm/src/triggers/OffchainPriceTrigger.d.ts +10 -0
- package/esm/src/triggers/OffchainPriceTrigger.js +12 -0
- package/esm/src/triggers/index.d.ts +1 -1
- package/esm/src/triggers/index.js +1 -1
- package/package.json +1 -1
- package/src/actions/basic/ExecuteSafeTxAction.ts +85 -0
- package/src/actions/basic/LimitSellAction.ts +63 -0
- package/src/actions/basic/RemoveTokenApprovalAction.ts +39 -0
- package/src/actions/basic/WrapEthAction.ts +4 -3
- package/src/actions/basic/index.ts +3 -0
- package/src/actions/maker/MakerGiveAction.ts +2 -3
- package/src/addresses.ts +3 -3
- package/src/triggers/OffchainPriceTrigger.ts +14 -0
- package/src/triggers/index.ts +2 -0
- package/umd/index.js +631 -514
- package/esm/src/actions/checkers/MorphoBlueRatioCheckAction.d.ts +0 -20
- package/esm/src/actions/checkers/MorphoBlueRatioCheckAction.js +0 -32
- package/esm/src/triggers/MorphoBlueRatioTrigger.d.ts +0 -10
- package/esm/src/triggers/MorphoBlueRatioTrigger.js +0 -12
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, bytes, uint256, uint8 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* ExecuteSafeTxAction - Execute Safe transaction
|
|
5
|
+
*
|
|
6
|
+
* @category BasicActions
|
|
7
|
+
*/
|
|
8
|
+
export declare class ExecuteSafeTxAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param safe Address of the Safe wallet
|
|
11
|
+
* @param to Destination address of Safe transaction
|
|
12
|
+
* @param value Ether value of Safe transaction
|
|
13
|
+
* @param data Data payload of Safe transaction
|
|
14
|
+
* @param operation Operation type of Safe transaction. 0 = call, 1 = delegateCall
|
|
15
|
+
* @param safeTxGas Gas that should be used for the Safe transaction
|
|
16
|
+
* @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)
|
|
17
|
+
* @param gasPrice Gas price that should be used for the payment calculation
|
|
18
|
+
* @param gasToken Token address (or 0 if ETH) that is used for the payment
|
|
19
|
+
* @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin
|
|
20
|
+
* @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})
|
|
21
|
+
*/
|
|
22
|
+
constructor(safe: EthAddress, to: EthAddress, value: uint256, data: bytes, operation: uint8, safeTxGas: uint256, baseGas: uint256, gasPrice: uint256, gasToken: EthAddress, refundReceiver: EthAddress, signatures: bytes);
|
|
23
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* ExecuteSafeTxAction - Execute Safe transaction
|
|
5
|
+
*
|
|
6
|
+
* @category BasicActions
|
|
7
|
+
*/
|
|
8
|
+
export class ExecuteSafeTxAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param safe Address of the Safe wallet
|
|
11
|
+
* @param to Destination address of Safe transaction
|
|
12
|
+
* @param value Ether value of Safe transaction
|
|
13
|
+
* @param data Data payload of Safe transaction
|
|
14
|
+
* @param operation Operation type of Safe transaction. 0 = call, 1 = delegateCall
|
|
15
|
+
* @param safeTxGas Gas that should be used for the Safe transaction
|
|
16
|
+
* @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)
|
|
17
|
+
* @param gasPrice Gas price that should be used for the payment calculation
|
|
18
|
+
* @param gasToken Token address (or 0 if ETH) that is used for the payment
|
|
19
|
+
* @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin
|
|
20
|
+
* @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})
|
|
21
|
+
*/
|
|
22
|
+
constructor(safe, to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures) {
|
|
23
|
+
super('ExecuteSafeTx', getAddr('ExecuteSafeTx'), [
|
|
24
|
+
'address',
|
|
25
|
+
'address',
|
|
26
|
+
'uint256',
|
|
27
|
+
'bytes',
|
|
28
|
+
'uint8',
|
|
29
|
+
'uint256',
|
|
30
|
+
'uint256',
|
|
31
|
+
'uint256',
|
|
32
|
+
'address',
|
|
33
|
+
'address',
|
|
34
|
+
'bytes',
|
|
35
|
+
], [
|
|
36
|
+
safe,
|
|
37
|
+
to,
|
|
38
|
+
value,
|
|
39
|
+
data,
|
|
40
|
+
operation,
|
|
41
|
+
safeTxGas,
|
|
42
|
+
baseGas,
|
|
43
|
+
gasPrice,
|
|
44
|
+
gasToken,
|
|
45
|
+
refundReceiver,
|
|
46
|
+
signatures,
|
|
47
|
+
]);
|
|
48
|
+
this.mappableArgs = [
|
|
49
|
+
this.args[0],
|
|
50
|
+
this.args[1],
|
|
51
|
+
this.args[2],
|
|
52
|
+
this.args[4],
|
|
53
|
+
this.args[5],
|
|
54
|
+
this.args[6],
|
|
55
|
+
this.args[7],
|
|
56
|
+
this.args[8],
|
|
57
|
+
this.args[9],
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ActionWithL2 } from '../../ActionWithL2';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Limit sell action used as part of the LimitSell Strategy
|
|
5
|
+
*
|
|
6
|
+
* @category BasicActions
|
|
7
|
+
*/
|
|
8
|
+
export declare class LimitSellAction 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 gasUsed Amount of gas spent as part of the strategy
|
|
15
|
+
* @param protocolFee 0x fee (amount of ETH in Wei)
|
|
16
|
+
*/
|
|
17
|
+
constructor(exchangeOrder: Array<any>, from: EthAddress, to: EthAddress, gasUsed: uint256, protocolFee?: string);
|
|
18
|
+
encodeInputs(): string;
|
|
19
|
+
getAssetsToApprove(): Promise<{
|
|
20
|
+
asset: any;
|
|
21
|
+
owner: any;
|
|
22
|
+
}[]>;
|
|
23
|
+
getEthValue(): Promise<string>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
* Limit sell action used as part of the LimitSell Strategy
|
|
18
|
+
*
|
|
19
|
+
* @category BasicActions
|
|
20
|
+
*/
|
|
21
|
+
export class LimitSellAction extends ActionWithL2 {
|
|
22
|
+
/**
|
|
23
|
+
* @param exchangeOrder Standard DFS Exchange data
|
|
24
|
+
* @param from Order sender
|
|
25
|
+
* @param to Order recipient
|
|
26
|
+
* @param gasUsed Amount of gas spent as part of the strategy
|
|
27
|
+
* @param protocolFee 0x fee (amount of ETH in Wei)
|
|
28
|
+
*/
|
|
29
|
+
constructor(exchangeOrder, from, to, gasUsed, protocolFee = '0') {
|
|
30
|
+
requireAddress(to);
|
|
31
|
+
super('LimitSell', getAddr('LimitSell'), [
|
|
32
|
+
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
33
|
+
'address',
|
|
34
|
+
'address',
|
|
35
|
+
'uint256',
|
|
36
|
+
], [exchangeOrder, from, to, gasUsed]);
|
|
37
|
+
this.protocolFee = protocolFee;
|
|
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
|
+
encodeInputs() {
|
|
47
|
+
const executeActionDirectAbi = (ActionAbi.find(({ name }) => name === 'executeActionDirect'));
|
|
48
|
+
return AbiCoder.encodeFunctionCall(executeActionDirectAbi, this._encodeForCall());
|
|
49
|
+
}
|
|
50
|
+
getAssetsToApprove() {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const asset = getAssetInfoByAddress(this.args[0][0]);
|
|
53
|
+
if (asset.symbol !== 'ETH')
|
|
54
|
+
return [{ asset: this.args[0][0], owner: this.args[1] }];
|
|
55
|
+
return [];
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
getEthValue() {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
return this.protocolFee || '0';
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Remove approval for a spender to pull tokens from user wallet
|
|
5
|
+
*
|
|
6
|
+
* @category BasicActions
|
|
7
|
+
*/
|
|
8
|
+
export declare class RemoveTokenApprovalAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param token Token address
|
|
11
|
+
* @param spender Spender address
|
|
12
|
+
*/
|
|
13
|
+
constructor(token: EthAddress, spender: EthAddress);
|
|
14
|
+
getAssetsToApprove(): Promise<never[]>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { requireAddress } from '../../utils/general';
|
|
11
|
+
import { Action } from '../../Action';
|
|
12
|
+
import { getAddr } from '../../addresses';
|
|
13
|
+
/**
|
|
14
|
+
* Remove approval for a spender to pull tokens from user wallet
|
|
15
|
+
*
|
|
16
|
+
* @category BasicActions
|
|
17
|
+
*/
|
|
18
|
+
export class RemoveTokenApprovalAction extends Action {
|
|
19
|
+
/**
|
|
20
|
+
* @param token Token address
|
|
21
|
+
* @param spender Spender address
|
|
22
|
+
*/
|
|
23
|
+
constructor(token, spender) {
|
|
24
|
+
requireAddress(spender);
|
|
25
|
+
super('RemoveTokenApproval', getAddr('RemoveTokenApproval'), [
|
|
26
|
+
'address',
|
|
27
|
+
'address',
|
|
28
|
+
], [
|
|
29
|
+
token,
|
|
30
|
+
spender,
|
|
31
|
+
]);
|
|
32
|
+
this.mappableArgs = [
|
|
33
|
+
this.args[0],
|
|
34
|
+
this.args[1],
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
getAssetsToApprove() {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
return [];
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -24,3 +24,6 @@ export * from './TokenizedVaultAdapterDepositAction';
|
|
|
24
24
|
export * from './TokenizedVaultAdapterMintAction';
|
|
25
25
|
export * from './TokenizedVaultAdapterRedeemAction';
|
|
26
26
|
export * from './TokenizedVaultAdapterWithdrawAction';
|
|
27
|
+
export * from './LimitSellAction';
|
|
28
|
+
export * from './ExecuteSafeTxAction';
|
|
29
|
+
export * from './RemoveTokenApprovalAction';
|
|
@@ -24,3 +24,6 @@ export * from './TokenizedVaultAdapterDepositAction';
|
|
|
24
24
|
export * from './TokenizedVaultAdapterMintAction';
|
|
25
25
|
export * from './TokenizedVaultAdapterRedeemAction';
|
|
26
26
|
export * from './TokenizedVaultAdapterWithdrawAction';
|
|
27
|
+
export * from './LimitSellAction';
|
|
28
|
+
export * from './ExecuteSafeTxAction';
|
|
29
|
+
export * from './RemoveTokenApprovalAction';
|
|
@@ -9,8 +9,7 @@ export declare class MakerGiveAction extends Action {
|
|
|
9
9
|
/**
|
|
10
10
|
* @param vaultId
|
|
11
11
|
* @param newOwner
|
|
12
|
-
* @param createProxy
|
|
13
12
|
* @param mcdManager
|
|
14
13
|
*/
|
|
15
|
-
constructor(vaultId: uint256, newOwner: EthAddress,
|
|
14
|
+
constructor(vaultId: uint256, newOwner: EthAddress, mcdManager?: EthAddress);
|
|
16
15
|
}
|
|
@@ -10,12 +10,11 @@ export class MakerGiveAction extends Action {
|
|
|
10
10
|
/**
|
|
11
11
|
* @param vaultId
|
|
12
12
|
* @param newOwner
|
|
13
|
-
* @param createProxy
|
|
14
13
|
* @param mcdManager
|
|
15
14
|
*/
|
|
16
|
-
constructor(vaultId, newOwner,
|
|
15
|
+
constructor(vaultId, newOwner, mcdManager = getAddr('McdCdpManager')) {
|
|
17
16
|
requireAddress(newOwner);
|
|
18
|
-
super('McdGive', getAddr('McdGive'), ['uint256', 'address', '
|
|
17
|
+
super('McdGive', getAddr('McdGive'), ['uint256', 'address', 'address'], [vaultId, newOwner, mcdManager]);
|
|
19
18
|
this.mappableArgs = [
|
|
20
19
|
this.args[0],
|
|
21
20
|
this.args[1],
|
package/esm/src/addresses.d.ts
CHANGED
|
@@ -206,7 +206,6 @@ export declare const actionAddresses: {
|
|
|
206
206
|
ToggleSub: string;
|
|
207
207
|
TokenBalance: string;
|
|
208
208
|
TokenizedVaultAdapter: string;
|
|
209
|
-
ChangeProxyOwner: string;
|
|
210
209
|
AaveV3ATokenPayback: string;
|
|
211
210
|
AaveV3Borrow: string;
|
|
212
211
|
AaveV3CollateralSwitch: string;
|
|
@@ -231,6 +230,7 @@ export declare const actionAddresses: {
|
|
|
231
230
|
UniCreatePoolV3: string;
|
|
232
231
|
SumInputs?: undefined;
|
|
233
232
|
SubInputs?: undefined;
|
|
233
|
+
ChangeProxyOwner?: undefined;
|
|
234
234
|
AutomationV2Unsub?: undefined;
|
|
235
235
|
UpdateSub?: undefined;
|
|
236
236
|
TransferNFT?: undefined;
|
|
@@ -400,7 +400,6 @@ export declare const actionAddresses: {
|
|
|
400
400
|
ToggleSub: string;
|
|
401
401
|
TokenBalance: string;
|
|
402
402
|
TokenizedVaultAdapter: string;
|
|
403
|
-
ChangeProxyOwner: string;
|
|
404
403
|
AaveV3ATokenPayback: string;
|
|
405
404
|
AaveV3Borrow: string;
|
|
406
405
|
AaveV3CollateralSwitch: string;
|
|
@@ -429,6 +428,7 @@ export declare const actionAddresses: {
|
|
|
429
428
|
UniCreatePoolV3: string;
|
|
430
429
|
SumInputs?: undefined;
|
|
431
430
|
SubInputs?: undefined;
|
|
431
|
+
ChangeProxyOwner?: undefined;
|
|
432
432
|
AutomationV2Unsub?: undefined;
|
|
433
433
|
UpdateSub?: undefined;
|
|
434
434
|
TransferNFT?: undefined;
|
|
@@ -592,7 +592,6 @@ export declare const actionAddresses: {
|
|
|
592
592
|
SendToken: string;
|
|
593
593
|
PullToken: string;
|
|
594
594
|
TokenBalance: string;
|
|
595
|
-
ChangeProxyOwner: string;
|
|
596
595
|
FLAaveV3: string;
|
|
597
596
|
FLBalancer: string;
|
|
598
597
|
FLUniV3: string;
|
|
@@ -615,6 +614,7 @@ export declare const actionAddresses: {
|
|
|
615
614
|
CompV3Withdraw: string;
|
|
616
615
|
SumInputs?: undefined;
|
|
617
616
|
SubInputs?: undefined;
|
|
617
|
+
ChangeProxyOwner?: undefined;
|
|
618
618
|
AutomationV2Unsub?: undefined;
|
|
619
619
|
SendTokenAndUnwrap?: undefined;
|
|
620
620
|
ToggleSub?: undefined;
|
package/esm/src/addresses.js
CHANGED
|
@@ -21,7 +21,7 @@ export const actionAddresses = {
|
|
|
21
21
|
SDaiUnwrap: '0xe8Cb536BB96075241c4bd8f1831A8577562F2B32',
|
|
22
22
|
TokenizedVaultAdapter: '0x3944364Ce3a273D269707484F3a676fCa17E08b8',
|
|
23
23
|
// exchange
|
|
24
|
-
DFSSell: '
|
|
24
|
+
DFSSell: '0x561013c605A17f5dC5b738C8a3fF9c5F33DbC3d8',
|
|
25
25
|
// maker
|
|
26
26
|
McdGenerate: '0xCb50a91C0f12f439b8bf11E9474B9c1ED62Bf7a3',
|
|
27
27
|
McdGive: '0xf9556A87BF424834FDe7De0547b58E36Cb42EF01',
|
|
@@ -109,7 +109,7 @@ export const actionAddresses = {
|
|
|
109
109
|
FLMaker: '0x672DE08e36A1698fD5e9E34045F81558dB4c1AFE',
|
|
110
110
|
FLBalancer: '0x540a83E36E5E6Aa916A6c591934d800e17115048',
|
|
111
111
|
FLSpark: '0xe9Fe5a0f5e4B370Ae60d837da58744666D5C06F7',
|
|
112
|
-
FLAction: '
|
|
112
|
+
FLAction: '0x2b10B000292745099Deb15304A247c0816bd8b73',
|
|
113
113
|
FLUniV3: '0x9CAdAC8Be718572F82B672b950c53F0b58483A35',
|
|
114
114
|
FLGho: '0xbb67b81dD080a406227A38965d0393f396ddECBc',
|
|
115
115
|
FLMorphoBlue: '0x6206C96EAc5EAC546861438A9f953B6BEa50EBAB',
|
|
@@ -234,7 +234,6 @@ export const actionAddresses = {
|
|
|
234
234
|
ToggleSub: '0x988C5C24AE6348404196267e19962f36961CAc29',
|
|
235
235
|
TokenBalance: '0xC6FF5b01f7c7b35b6e093fF70D2332B361C5Be5A',
|
|
236
236
|
TokenizedVaultAdapter: '0xdf31669FEd440f5BfF658ca0bBF0D22B8abdeb73',
|
|
237
|
-
ChangeProxyOwner: '0x62769258ea8b3a85cc6fb4332fc2760a122dbc9e',
|
|
238
237
|
// aave v3
|
|
239
238
|
AaveV3ATokenPayback: '0x71B27114D1777298bD46c3770C42F9f807C49847',
|
|
240
239
|
AaveV3Borrow: '0x8CaDc8A911D19B9e4D36c9bAdE47d970f362BcEa',
|
|
@@ -272,7 +271,6 @@ export const actionAddresses = {
|
|
|
272
271
|
ToggleSub: '0x71015226EADFd4aC887fB56556F64338e352439b',
|
|
273
272
|
TokenBalance: '0x483B903E702F60698Dd8124558C6199922737f1F',
|
|
274
273
|
TokenizedVaultAdapter: '0xD05C512bDFf6D3eAc5328807B3bC075F35271167',
|
|
275
|
-
ChangeProxyOwner: '0x29F66A5fcB601c806E7156f29FDEC771BdC9c08d',
|
|
276
274
|
// aave v3
|
|
277
275
|
AaveV3ATokenPayback: '0x261906e5E0D0D38D9cBb5c10dB9c4031aabdf8C1',
|
|
278
276
|
AaveV3Borrow: '0x5786809DA660dB613994460F096F19fcd19eD4c9',
|
|
@@ -312,7 +310,6 @@ export const actionAddresses = {
|
|
|
312
310
|
SendToken: '0x1420f4977E7B71AFddccBFc6F6e1505CefdF99F0',
|
|
313
311
|
PullToken: '0x5B0B7E38C2a8e46CfAe13c360BC5927570BeEe94',
|
|
314
312
|
TokenBalance: '0xc44bcE580B1b3339fE9272D3bC3d6566083ea59C',
|
|
315
|
-
ChangeProxyOwner: '0x1947a44d3717a47556175d64fdc208619aa08874',
|
|
316
313
|
// Flashloan
|
|
317
314
|
FLAaveV3: '0x79Eb9cEe432Cd3e7b09A9eFdB21A733A6d7b4c3A',
|
|
318
315
|
FLBalancer: '0x862E533198C9656B75bB6A5dDF0953F7ED5E8507',
|
|
@@ -340,7 +337,7 @@ export const actionAddresses = {
|
|
|
340
337
|
};
|
|
341
338
|
export const otherAddresses = {
|
|
342
339
|
[NETWORKS.ethereum.chainId]: {
|
|
343
|
-
RecipeExecutor: '
|
|
340
|
+
RecipeExecutor: '0x10B748Dc504C2515Bb6A9e23CB2F686090b6c584',
|
|
344
341
|
DFSRegistry: '0x287778F121F134C66212FB16c9b53eC991D32f5b',
|
|
345
342
|
DFSProxyRegistry: '0x29474FdaC7142f9aB7773B8e38264FA15E3805ed',
|
|
346
343
|
ProxyRegistry: '0x4678f0a6958e4D2Bc4F1BAF7Bc52E8F3564f3fE4',
|
package/esm/src/index.d.ts
CHANGED
|
@@ -217,7 +217,6 @@ declare const actionAddressesAllChains: {
|
|
|
217
217
|
ToggleSub: string;
|
|
218
218
|
TokenBalance: string;
|
|
219
219
|
TokenizedVaultAdapter: string;
|
|
220
|
-
ChangeProxyOwner: string;
|
|
221
220
|
AaveV3ATokenPayback: string;
|
|
222
221
|
AaveV3Borrow: string;
|
|
223
222
|
AaveV3CollateralSwitch: string;
|
|
@@ -242,6 +241,7 @@ declare const actionAddressesAllChains: {
|
|
|
242
241
|
UniCreatePoolV3: string;
|
|
243
242
|
SumInputs?: undefined;
|
|
244
243
|
SubInputs?: undefined;
|
|
244
|
+
ChangeProxyOwner?: undefined;
|
|
245
245
|
AutomationV2Unsub?: undefined;
|
|
246
246
|
UpdateSub?: undefined;
|
|
247
247
|
TransferNFT?: undefined;
|
|
@@ -411,7 +411,6 @@ declare const actionAddressesAllChains: {
|
|
|
411
411
|
ToggleSub: string;
|
|
412
412
|
TokenBalance: string;
|
|
413
413
|
TokenizedVaultAdapter: string;
|
|
414
|
-
ChangeProxyOwner: string;
|
|
415
414
|
AaveV3ATokenPayback: string;
|
|
416
415
|
AaveV3Borrow: string;
|
|
417
416
|
AaveV3CollateralSwitch: string;
|
|
@@ -440,6 +439,7 @@ declare const actionAddressesAllChains: {
|
|
|
440
439
|
UniCreatePoolV3: string;
|
|
441
440
|
SumInputs?: undefined;
|
|
442
441
|
SubInputs?: undefined;
|
|
442
|
+
ChangeProxyOwner?: undefined;
|
|
443
443
|
AutomationV2Unsub?: undefined;
|
|
444
444
|
UpdateSub?: undefined;
|
|
445
445
|
TransferNFT?: undefined;
|
|
@@ -603,7 +603,6 @@ declare const actionAddressesAllChains: {
|
|
|
603
603
|
SendToken: string;
|
|
604
604
|
PullToken: string;
|
|
605
605
|
TokenBalance: string;
|
|
606
|
-
ChangeProxyOwner: string;
|
|
607
606
|
FLAaveV3: string;
|
|
608
607
|
FLBalancer: string;
|
|
609
608
|
FLUniV3: string;
|
|
@@ -626,6 +625,7 @@ declare const actionAddressesAllChains: {
|
|
|
626
625
|
CompV3Withdraw: string;
|
|
627
626
|
SumInputs?: undefined;
|
|
628
627
|
SubInputs?: undefined;
|
|
628
|
+
ChangeProxyOwner?: undefined;
|
|
629
629
|
AutomationV2Unsub?: undefined;
|
|
630
630
|
SendTokenAndUnwrap?: undefined;
|
|
631
631
|
ToggleSub?: undefined;
|
|
@@ -999,7 +999,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
999
999
|
ToggleSub: string;
|
|
1000
1000
|
TokenBalance: string;
|
|
1001
1001
|
TokenizedVaultAdapter: string;
|
|
1002
|
-
ChangeProxyOwner: string;
|
|
1003
1002
|
AaveV3ATokenPayback: string;
|
|
1004
1003
|
AaveV3Borrow: string;
|
|
1005
1004
|
AaveV3CollateralSwitch: string;
|
|
@@ -1024,6 +1023,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1024
1023
|
UniCreatePoolV3: string;
|
|
1025
1024
|
SumInputs?: undefined;
|
|
1026
1025
|
SubInputs?: undefined;
|
|
1026
|
+
ChangeProxyOwner?: undefined;
|
|
1027
1027
|
AutomationV2Unsub?: undefined;
|
|
1028
1028
|
UpdateSub?: undefined;
|
|
1029
1029
|
TransferNFT?: undefined;
|
|
@@ -1193,7 +1193,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1193
1193
|
ToggleSub: string;
|
|
1194
1194
|
TokenBalance: string;
|
|
1195
1195
|
TokenizedVaultAdapter: string;
|
|
1196
|
-
ChangeProxyOwner: string;
|
|
1197
1196
|
AaveV3ATokenPayback: string;
|
|
1198
1197
|
AaveV3Borrow: string;
|
|
1199
1198
|
AaveV3CollateralSwitch: string;
|
|
@@ -1222,6 +1221,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1222
1221
|
UniCreatePoolV3: string;
|
|
1223
1222
|
SumInputs?: undefined;
|
|
1224
1223
|
SubInputs?: undefined;
|
|
1224
|
+
ChangeProxyOwner?: undefined;
|
|
1225
1225
|
AutomationV2Unsub?: undefined;
|
|
1226
1226
|
UpdateSub?: undefined;
|
|
1227
1227
|
TransferNFT?: undefined;
|
|
@@ -1385,7 +1385,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1385
1385
|
SendToken: string;
|
|
1386
1386
|
PullToken: string;
|
|
1387
1387
|
TokenBalance: string;
|
|
1388
|
-
ChangeProxyOwner: string;
|
|
1389
1388
|
FLAaveV3: string;
|
|
1390
1389
|
FLBalancer: string;
|
|
1391
1390
|
FLUniV3: string;
|
|
@@ -1408,6 +1407,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1408
1407
|
CompV3Withdraw: string;
|
|
1409
1408
|
SumInputs?: undefined;
|
|
1410
1409
|
SubInputs?: undefined;
|
|
1410
|
+
ChangeProxyOwner?: undefined;
|
|
1411
1411
|
AutomationV2Unsub?: undefined;
|
|
1412
1412
|
SendTokenAndUnwrap?: undefined;
|
|
1413
1413
|
ToggleSub?: undefined;
|
|
@@ -1924,7 +1924,6 @@ declare const _default: {
|
|
|
1924
1924
|
ToggleSub: string;
|
|
1925
1925
|
TokenBalance: string;
|
|
1926
1926
|
TokenizedVaultAdapter: string;
|
|
1927
|
-
ChangeProxyOwner: string;
|
|
1928
1927
|
AaveV3ATokenPayback: string;
|
|
1929
1928
|
AaveV3Borrow: string;
|
|
1930
1929
|
AaveV3CollateralSwitch: string;
|
|
@@ -1949,6 +1948,7 @@ declare const _default: {
|
|
|
1949
1948
|
UniCreatePoolV3: string;
|
|
1950
1949
|
SumInputs?: undefined;
|
|
1951
1950
|
SubInputs?: undefined;
|
|
1951
|
+
ChangeProxyOwner?: undefined;
|
|
1952
1952
|
AutomationV2Unsub?: undefined;
|
|
1953
1953
|
UpdateSub?: undefined;
|
|
1954
1954
|
TransferNFT?: undefined;
|
|
@@ -2118,7 +2118,6 @@ declare const _default: {
|
|
|
2118
2118
|
ToggleSub: string;
|
|
2119
2119
|
TokenBalance: string;
|
|
2120
2120
|
TokenizedVaultAdapter: string;
|
|
2121
|
-
ChangeProxyOwner: string;
|
|
2122
2121
|
AaveV3ATokenPayback: string;
|
|
2123
2122
|
AaveV3Borrow: string;
|
|
2124
2123
|
AaveV3CollateralSwitch: string;
|
|
@@ -2147,6 +2146,7 @@ declare const _default: {
|
|
|
2147
2146
|
UniCreatePoolV3: string;
|
|
2148
2147
|
SumInputs?: undefined;
|
|
2149
2148
|
SubInputs?: undefined;
|
|
2149
|
+
ChangeProxyOwner?: undefined;
|
|
2150
2150
|
AutomationV2Unsub?: undefined;
|
|
2151
2151
|
UpdateSub?: undefined;
|
|
2152
2152
|
TransferNFT?: undefined;
|
|
@@ -2310,7 +2310,6 @@ declare const _default: {
|
|
|
2310
2310
|
SendToken: string;
|
|
2311
2311
|
PullToken: string;
|
|
2312
2312
|
TokenBalance: string;
|
|
2313
|
-
ChangeProxyOwner: string;
|
|
2314
2313
|
FLAaveV3: string;
|
|
2315
2314
|
FLBalancer: string;
|
|
2316
2315
|
FLUniV3: string;
|
|
@@ -2333,6 +2332,7 @@ declare const _default: {
|
|
|
2333
2332
|
CompV3Withdraw: string;
|
|
2334
2333
|
SumInputs?: undefined;
|
|
2335
2334
|
SubInputs?: undefined;
|
|
2335
|
+
ChangeProxyOwner?: undefined;
|
|
2336
2336
|
AutomationV2Unsub?: undefined;
|
|
2337
2337
|
SendTokenAndUnwrap?: undefined;
|
|
2338
2338
|
ToggleSub?: undefined;
|
|
@@ -2706,7 +2706,6 @@ declare const _default: {
|
|
|
2706
2706
|
ToggleSub: string;
|
|
2707
2707
|
TokenBalance: string;
|
|
2708
2708
|
TokenizedVaultAdapter: string;
|
|
2709
|
-
ChangeProxyOwner: string;
|
|
2710
2709
|
AaveV3ATokenPayback: string;
|
|
2711
2710
|
AaveV3Borrow: string;
|
|
2712
2711
|
AaveV3CollateralSwitch: string;
|
|
@@ -2731,6 +2730,7 @@ declare const _default: {
|
|
|
2731
2730
|
UniCreatePoolV3: string;
|
|
2732
2731
|
SumInputs?: undefined;
|
|
2733
2732
|
SubInputs?: undefined;
|
|
2733
|
+
ChangeProxyOwner?: undefined;
|
|
2734
2734
|
AutomationV2Unsub?: undefined;
|
|
2735
2735
|
UpdateSub?: undefined;
|
|
2736
2736
|
TransferNFT?: undefined;
|
|
@@ -2900,7 +2900,6 @@ declare const _default: {
|
|
|
2900
2900
|
ToggleSub: string;
|
|
2901
2901
|
TokenBalance: string;
|
|
2902
2902
|
TokenizedVaultAdapter: string;
|
|
2903
|
-
ChangeProxyOwner: string;
|
|
2904
2903
|
AaveV3ATokenPayback: string;
|
|
2905
2904
|
AaveV3Borrow: string;
|
|
2906
2905
|
AaveV3CollateralSwitch: string;
|
|
@@ -2929,6 +2928,7 @@ declare const _default: {
|
|
|
2929
2928
|
UniCreatePoolV3: string;
|
|
2930
2929
|
SumInputs?: undefined;
|
|
2931
2930
|
SubInputs?: undefined;
|
|
2931
|
+
ChangeProxyOwner?: undefined;
|
|
2932
2932
|
AutomationV2Unsub?: undefined;
|
|
2933
2933
|
UpdateSub?: undefined;
|
|
2934
2934
|
TransferNFT?: undefined;
|
|
@@ -3092,7 +3092,6 @@ declare const _default: {
|
|
|
3092
3092
|
SendToken: string;
|
|
3093
3093
|
PullToken: string;
|
|
3094
3094
|
TokenBalance: string;
|
|
3095
|
-
ChangeProxyOwner: string;
|
|
3096
3095
|
FLAaveV3: string;
|
|
3097
3096
|
FLBalancer: string;
|
|
3098
3097
|
FLUniV3: string;
|
|
@@ -3115,6 +3114,7 @@ declare const _default: {
|
|
|
3115
3114
|
CompV3Withdraw: string;
|
|
3116
3115
|
SumInputs?: undefined;
|
|
3117
3116
|
SubInputs?: undefined;
|
|
3117
|
+
ChangeProxyOwner?: undefined;
|
|
3118
3118
|
AutomationV2Unsub?: undefined;
|
|
3119
3119
|
SendTokenAndUnwrap?: undefined;
|
|
3120
3120
|
ToggleSub?: undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { getAddr } from '../addresses';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @category Triggers
|
|
7
|
+
*/
|
|
8
|
+
export class OffchainPriceTrigger extends Action {
|
|
9
|
+
constructor(limitPrice, limitType) {
|
|
10
|
+
super('OffchainPriceTrigger', getAddr('OffchainPriceTrigger'), ['uint256', 'uint8'], [limitPrice, limitType]);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -17,4 +17,4 @@ export * from './SparkRatioTrigger';
|
|
|
17
17
|
export * from './SparkQuotePriceTrigger';
|
|
18
18
|
export * from './LiquityDebtInFrontWithLimitTrigger';
|
|
19
19
|
export * from './CurveUsdCollRatioTrigger';
|
|
20
|
-
export * from './
|
|
20
|
+
export * from './OffchainPriceTrigger';
|
|
@@ -17,4 +17,4 @@ export * from './SparkRatioTrigger';
|
|
|
17
17
|
export * from './SparkQuotePriceTrigger';
|
|
18
18
|
export * from './LiquityDebtInFrontWithLimitTrigger';
|
|
19
19
|
export * from './CurveUsdCollRatioTrigger';
|
|
20
|
-
export * from './
|
|
20
|
+
export * from './OffchainPriceTrigger';
|