@defisaver/ethena-sdk 0.0.4 → 0.0.6
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/cjs/config/contracts.d.ts +181 -0
- package/cjs/config/contracts.js +72 -0
- package/cjs/constants/index.d.ts +7 -0
- package/cjs/constants/index.js +10 -0
- package/cjs/contracts.d.ts +696 -0
- package/cjs/contracts.js +80 -0
- package/cjs/exchange/index.d.ts +10 -0
- package/cjs/exchange/index.js +185 -0
- package/cjs/execution/index.d.ts +2 -0
- package/cjs/execution/index.js +15 -0
- package/cjs/execution/morpho.d.ts +2 -0
- package/cjs/execution/morpho.js +56 -0
- package/cjs/index.d.ts +5 -1
- package/cjs/index.js +9 -1
- package/cjs/positionData/index.d.ts +1 -1
- package/cjs/positionData/index.js +2 -2
- package/cjs/positionData/morpho.d.ts +1 -1
- package/cjs/positionData/morpho.js +15 -7
- package/cjs/safe/index.d.ts +6 -0
- package/cjs/safe/index.js +80 -0
- package/cjs/services/viem.d.ts +31 -31
- package/cjs/types/common.d.ts +10 -0
- package/cjs/types/exchange.d.ts +19 -0
- package/cjs/types/exchange.js +12 -0
- package/cjs/types/execution.d.ts +9 -0
- package/cjs/types/execution.js +8 -0
- package/cjs/types/index.d.ts +3 -0
- package/cjs/types/index.js +3 -0
- package/cjs/types/safe.d.ts +5 -0
- package/cjs/types/safe.js +2 -0
- package/esm/config/contracts.d.ts +181 -0
- package/esm/config/contracts.js +69 -0
- package/esm/constants/index.d.ts +7 -0
- package/esm/constants/index.js +7 -0
- package/esm/contracts.d.ts +696 -0
- package/esm/contracts.js +37 -0
- package/esm/exchange/index.d.ts +10 -0
- package/esm/exchange/index.js +176 -0
- package/esm/execution/index.d.ts +2 -0
- package/esm/execution/index.js +11 -0
- package/esm/execution/morpho.d.ts +2 -0
- package/esm/execution/morpho.js +52 -0
- package/esm/index.d.ts +5 -1
- package/esm/index.js +5 -1
- package/esm/positionData/index.d.ts +1 -1
- package/esm/positionData/index.js +2 -2
- package/esm/positionData/morpho.d.ts +1 -1
- package/esm/positionData/morpho.js +16 -8
- package/esm/safe/index.d.ts +6 -0
- package/esm/safe/index.js +75 -0
- package/esm/services/viem.d.ts +31 -31
- package/esm/types/common.d.ts +10 -0
- package/esm/types/exchange.d.ts +19 -0
- package/esm/types/exchange.js +9 -0
- package/esm/types/execution.d.ts +9 -0
- package/esm/types/execution.js +5 -0
- package/esm/types/index.d.ts +3 -0
- package/esm/types/index.js +3 -0
- package/esm/types/safe.d.ts +5 -0
- package/esm/types/safe.js +1 -0
- package/package.json +3 -1
- package/src/config/contracts.ts +72 -0
- package/src/constants/index.ts +7 -0
- package/src/contracts.ts +57 -0
- package/src/exchange/index.ts +195 -0
- package/src/execution/index.ts +12 -0
- package/src/execution/morpho.ts +47 -0
- package/src/index.ts +8 -0
- package/src/positionData/index.ts +2 -2
- package/src/positionData/morpho.ts +17 -8
- package/src/safe/index.ts +99 -0
- package/src/types/common.ts +11 -0
- package/src/types/exchange.ts +21 -0
- package/src/types/execution.ts +11 -0
- package/src/types/index.ts +4 -1
- package/src/types/safe.ts +5 -0
package/cjs/services/viem.d.ts
CHANGED
|
@@ -826,12 +826,12 @@ export declare const getViemProvider: (rpcUrl: string, network: NetworkNumber, o
|
|
|
826
826
|
withdrawals?: import("viem").Withdrawal[] | undefined | undefined;
|
|
827
827
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
828
828
|
transactions: includeTransactions extends true ? ({
|
|
829
|
-
type: "legacy";
|
|
830
829
|
to: import("viem").Address | null;
|
|
830
|
+
value: bigint;
|
|
831
|
+
nonce: number;
|
|
832
|
+
type: "legacy";
|
|
831
833
|
from: import("viem").Address;
|
|
832
834
|
gas: bigint;
|
|
833
|
-
nonce: number;
|
|
834
|
-
value: bigint;
|
|
835
835
|
maxFeePerBlobGas?: undefined | undefined;
|
|
836
836
|
gasPrice: bigint;
|
|
837
837
|
maxFeePerGas?: undefined | undefined;
|
|
@@ -851,12 +851,12 @@ export declare const getViemProvider: (rpcUrl: string, network: NetworkNumber, o
|
|
|
851
851
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : `0x${string}` : never : never;
|
|
852
852
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
853
853
|
} | {
|
|
854
|
-
type: "eip2930";
|
|
855
854
|
to: import("viem").Address | null;
|
|
855
|
+
value: bigint;
|
|
856
|
+
nonce: number;
|
|
857
|
+
type: "eip2930";
|
|
856
858
|
from: import("viem").Address;
|
|
857
859
|
gas: bigint;
|
|
858
|
-
nonce: number;
|
|
859
|
-
value: bigint;
|
|
860
860
|
maxFeePerBlobGas?: undefined | undefined;
|
|
861
861
|
gasPrice: bigint;
|
|
862
862
|
maxFeePerGas?: undefined | undefined;
|
|
@@ -876,12 +876,12 @@ export declare const getViemProvider: (rpcUrl: string, network: NetworkNumber, o
|
|
|
876
876
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : `0x${string}` : never : never;
|
|
877
877
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
878
878
|
} | {
|
|
879
|
-
type: "eip1559";
|
|
880
879
|
to: import("viem").Address | null;
|
|
880
|
+
value: bigint;
|
|
881
|
+
nonce: number;
|
|
882
|
+
type: "eip1559";
|
|
881
883
|
from: import("viem").Address;
|
|
882
884
|
gas: bigint;
|
|
883
|
-
nonce: number;
|
|
884
|
-
value: bigint;
|
|
885
885
|
maxFeePerBlobGas?: undefined | undefined;
|
|
886
886
|
gasPrice?: undefined | undefined;
|
|
887
887
|
maxFeePerGas: bigint;
|
|
@@ -901,12 +901,12 @@ export declare const getViemProvider: (rpcUrl: string, network: NetworkNumber, o
|
|
|
901
901
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : `0x${string}` : never : never;
|
|
902
902
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
903
903
|
} | {
|
|
904
|
-
type: "eip4844";
|
|
905
904
|
to: import("viem").Address | null;
|
|
905
|
+
value: bigint;
|
|
906
|
+
nonce: number;
|
|
907
|
+
type: "eip4844";
|
|
906
908
|
from: import("viem").Address;
|
|
907
909
|
gas: bigint;
|
|
908
|
-
nonce: number;
|
|
909
|
-
value: bigint;
|
|
910
910
|
maxFeePerBlobGas: bigint;
|
|
911
911
|
gasPrice?: undefined | undefined;
|
|
912
912
|
maxFeePerGas: bigint;
|
|
@@ -926,12 +926,12 @@ export declare const getViemProvider: (rpcUrl: string, network: NetworkNumber, o
|
|
|
926
926
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : `0x${string}` : never : never;
|
|
927
927
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
928
928
|
} | {
|
|
929
|
-
type: "eip7702";
|
|
930
929
|
to: import("viem").Address | null;
|
|
930
|
+
value: bigint;
|
|
931
|
+
nonce: number;
|
|
932
|
+
type: "eip7702";
|
|
931
933
|
from: import("viem").Address;
|
|
932
934
|
gas: bigint;
|
|
933
|
-
nonce: number;
|
|
934
|
-
value: bigint;
|
|
935
935
|
maxFeePerBlobGas?: undefined | undefined;
|
|
936
936
|
gasPrice?: undefined | undefined;
|
|
937
937
|
maxFeePerGas: bigint;
|
|
@@ -976,12 +976,12 @@ export declare const getViemProvider: (rpcUrl: string, network: NetworkNumber, o
|
|
|
976
976
|
} | undefined) => Promise<import("viem").EstimateMaxPriorityFeePerGasReturnType>;
|
|
977
977
|
getStorageAt: (args: import("viem").GetStorageAtParameters) => Promise<import("viem").GetStorageAtReturnType>;
|
|
978
978
|
getTransaction: <blockTag extends import("viem").BlockTag = "latest">(args: import("viem").GetTransactionParameters<blockTag>) => Promise<{
|
|
979
|
-
type: "legacy";
|
|
980
979
|
to: import("viem").Address | null;
|
|
980
|
+
value: bigint;
|
|
981
|
+
nonce: number;
|
|
982
|
+
type: "legacy";
|
|
981
983
|
from: import("viem").Address;
|
|
982
984
|
gas: bigint;
|
|
983
|
-
nonce: number;
|
|
984
|
-
value: bigint;
|
|
985
985
|
maxFeePerBlobGas?: undefined | undefined;
|
|
986
986
|
gasPrice: bigint;
|
|
987
987
|
maxFeePerGas?: undefined | undefined;
|
|
@@ -1001,12 +1001,12 @@ export declare const getViemProvider: (rpcUrl: string, network: NetworkNumber, o
|
|
|
1001
1001
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : `0x${string}` : never : never;
|
|
1002
1002
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
1003
1003
|
} | {
|
|
1004
|
-
type: "eip2930";
|
|
1005
1004
|
to: import("viem").Address | null;
|
|
1005
|
+
value: bigint;
|
|
1006
|
+
nonce: number;
|
|
1007
|
+
type: "eip2930";
|
|
1006
1008
|
from: import("viem").Address;
|
|
1007
1009
|
gas: bigint;
|
|
1008
|
-
nonce: number;
|
|
1009
|
-
value: bigint;
|
|
1010
1010
|
maxFeePerBlobGas?: undefined | undefined;
|
|
1011
1011
|
gasPrice: bigint;
|
|
1012
1012
|
maxFeePerGas?: undefined | undefined;
|
|
@@ -1026,12 +1026,12 @@ export declare const getViemProvider: (rpcUrl: string, network: NetworkNumber, o
|
|
|
1026
1026
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : `0x${string}` : never : never;
|
|
1027
1027
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
1028
1028
|
} | {
|
|
1029
|
-
type: "eip1559";
|
|
1030
1029
|
to: import("viem").Address | null;
|
|
1030
|
+
value: bigint;
|
|
1031
|
+
nonce: number;
|
|
1032
|
+
type: "eip1559";
|
|
1031
1033
|
from: import("viem").Address;
|
|
1032
1034
|
gas: bigint;
|
|
1033
|
-
nonce: number;
|
|
1034
|
-
value: bigint;
|
|
1035
1035
|
maxFeePerBlobGas?: undefined | undefined;
|
|
1036
1036
|
gasPrice?: undefined | undefined;
|
|
1037
1037
|
maxFeePerGas: bigint;
|
|
@@ -1051,12 +1051,12 @@ export declare const getViemProvider: (rpcUrl: string, network: NetworkNumber, o
|
|
|
1051
1051
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : `0x${string}` : never : never;
|
|
1052
1052
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
1053
1053
|
} | {
|
|
1054
|
-
type: "eip4844";
|
|
1055
1054
|
to: import("viem").Address | null;
|
|
1055
|
+
value: bigint;
|
|
1056
|
+
nonce: number;
|
|
1057
|
+
type: "eip4844";
|
|
1056
1058
|
from: import("viem").Address;
|
|
1057
1059
|
gas: bigint;
|
|
1058
|
-
nonce: number;
|
|
1059
|
-
value: bigint;
|
|
1060
1060
|
maxFeePerBlobGas: bigint;
|
|
1061
1061
|
gasPrice?: undefined | undefined;
|
|
1062
1062
|
maxFeePerGas: bigint;
|
|
@@ -1076,12 +1076,12 @@ export declare const getViemProvider: (rpcUrl: string, network: NetworkNumber, o
|
|
|
1076
1076
|
blockHash: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : `0x${string}` : never : never;
|
|
1077
1077
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
1078
1078
|
} | {
|
|
1079
|
-
type: "eip7702";
|
|
1080
1079
|
to: import("viem").Address | null;
|
|
1080
|
+
value: bigint;
|
|
1081
|
+
nonce: number;
|
|
1082
|
+
type: "eip7702";
|
|
1081
1083
|
from: import("viem").Address;
|
|
1082
1084
|
gas: bigint;
|
|
1083
|
-
nonce: number;
|
|
1084
|
-
value: bigint;
|
|
1085
1085
|
maxFeePerBlobGas?: undefined | undefined;
|
|
1086
1086
|
gasPrice?: undefined | undefined;
|
|
1087
1087
|
maxFeePerGas: bigint;
|
|
@@ -4357,7 +4357,7 @@ export declare const getViemProvider: (rpcUrl: string, network: NetworkNumber, o
|
|
|
4357
4357
|
authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
|
|
4358
4358
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_12 extends "eip7702" ? import("viem").TransactionRequestEIP7702 : never : never : never)>> & {
|
|
4359
4359
|
chainId?: number | undefined;
|
|
4360
|
-
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "
|
|
4360
|
+
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "type" | "gas" | "blobVersionedHashes" | "fees" | "chainId") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "type" | "gas" | "blobVersionedHashes" | "fees" | "chainId") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: T[K]; } : never>;
|
|
4361
4361
|
readContract: <const abi extends import("viem").Abi | readonly unknown[], functionName extends import("viem").ContractFunctionName<abi, "pure" | "view">, const args extends import("viem").ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: import("viem").ReadContractParameters<abi, functionName, args>) => Promise<import("viem").ReadContractReturnType<abi, functionName, args>>;
|
|
4362
4362
|
sendRawTransaction: (args: import("viem").SendRawTransactionParameters) => Promise<import("viem").SendRawTransactionReturnType>;
|
|
4363
4363
|
simulate: <const calls extends readonly unknown[]>(args: import("viem").SimulateBlocksParameters<calls>) => Promise<import("viem").SimulateBlocksReturnType<calls>>;
|
package/cjs/types/common.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IncentiveData, MMUsedAssets, MorphoBlueAggregatedPositionData, NetworkNumber } from '@defisaver/positions-sdk';
|
|
2
2
|
import { SupportedMarkets } from './markets';
|
|
3
|
+
import { OffchainExchanges } from './exchange';
|
|
3
4
|
export interface AssetData {
|
|
4
5
|
symbol: string;
|
|
5
6
|
address: string;
|
|
@@ -18,7 +19,16 @@ export interface MarketData {
|
|
|
18
19
|
lltv: string;
|
|
19
20
|
rate: string;
|
|
20
21
|
}
|
|
22
|
+
export interface ExchangeInfo {
|
|
23
|
+
price: string;
|
|
24
|
+
source: OffchainExchanges | 'None';
|
|
25
|
+
sellAsset: string;
|
|
26
|
+
sellAmount: string;
|
|
27
|
+
buyAsset: string;
|
|
28
|
+
buyAmount: string;
|
|
29
|
+
}
|
|
21
30
|
export interface PositionData extends MorphoBlueAggregatedPositionData {
|
|
22
31
|
usedAssets: MMUsedAssets;
|
|
32
|
+
exchangeInfo: ExchangeInfo;
|
|
23
33
|
}
|
|
24
34
|
export { NetworkNumber, MMUsedAssets, IncentiveData, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum OffchainExchanges {
|
|
2
|
+
ZeroX = "0x",
|
|
3
|
+
Paraswap = "Paraswap",
|
|
4
|
+
Kyberswap = "Kyberswap",
|
|
5
|
+
OneInch = "1Inch",
|
|
6
|
+
Bebop = "Bebop"
|
|
7
|
+
}
|
|
8
|
+
export interface PriceData {
|
|
9
|
+
price: string;
|
|
10
|
+
priceWithFee: string;
|
|
11
|
+
source: OffchainExchanges | 'None';
|
|
12
|
+
wrapper: string;
|
|
13
|
+
to: string;
|
|
14
|
+
allowanceTarget: string;
|
|
15
|
+
protocolFee: string;
|
|
16
|
+
data: string;
|
|
17
|
+
value: string;
|
|
18
|
+
gas: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OffchainExchanges = void 0;
|
|
4
|
+
var OffchainExchanges;
|
|
5
|
+
(function (OffchainExchanges) {
|
|
6
|
+
OffchainExchanges["ZeroX"] = "0x";
|
|
7
|
+
OffchainExchanges["Paraswap"] = "Paraswap";
|
|
8
|
+
OffchainExchanges["Kyberswap"] = "Kyberswap";
|
|
9
|
+
OffchainExchanges["OneInch"] = "1Inch";
|
|
10
|
+
// Odos = 'Odos',
|
|
11
|
+
OffchainExchanges["Bebop"] = "Bebop";
|
|
12
|
+
})(OffchainExchanges || (exports.OffchainExchanges = OffchainExchanges = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NetworkNumber } from '@defisaver/positions-sdk';
|
|
2
|
+
export declare enum RequestType {
|
|
3
|
+
Signature = "Signature",
|
|
4
|
+
EthCall = "EthCall"
|
|
5
|
+
}
|
|
6
|
+
export interface Request {
|
|
7
|
+
type: RequestType;
|
|
8
|
+
getParams: (rpcUrl: string, network: NetworkNumber, userAddress: string) => Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequestType = void 0;
|
|
4
|
+
var RequestType;
|
|
5
|
+
(function (RequestType) {
|
|
6
|
+
RequestType["Signature"] = "Signature";
|
|
7
|
+
RequestType["EthCall"] = "EthCall";
|
|
8
|
+
})(RequestType || (exports.RequestType = RequestType = {}));
|
package/cjs/types/index.d.ts
CHANGED
package/cjs/types/index.js
CHANGED
|
@@ -16,3 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./common"), exports);
|
|
18
18
|
__exportStar(require("./markets"), exports);
|
|
19
|
+
__exportStar(require("./exchange"), exports);
|
|
20
|
+
__exportStar(require("./safe"), exports);
|
|
21
|
+
__exportStar(require("./execution"), exports);
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
export declare const Safe130: {
|
|
2
|
+
readonly abi: readonly [{
|
|
3
|
+
readonly inputs: readonly [{
|
|
4
|
+
readonly internalType: "address[]";
|
|
5
|
+
readonly name: "_owners";
|
|
6
|
+
readonly type: "address[]";
|
|
7
|
+
}, {
|
|
8
|
+
readonly internalType: "uint256";
|
|
9
|
+
readonly name: "_threshold";
|
|
10
|
+
readonly type: "uint256";
|
|
11
|
+
}, {
|
|
12
|
+
readonly internalType: "address";
|
|
13
|
+
readonly name: "to";
|
|
14
|
+
readonly type: "address";
|
|
15
|
+
}, {
|
|
16
|
+
readonly internalType: "bytes";
|
|
17
|
+
readonly name: "data";
|
|
18
|
+
readonly type: "bytes";
|
|
19
|
+
}, {
|
|
20
|
+
readonly internalType: "address";
|
|
21
|
+
readonly name: "fallbackHandler";
|
|
22
|
+
readonly type: "address";
|
|
23
|
+
}, {
|
|
24
|
+
readonly internalType: "address";
|
|
25
|
+
readonly name: "paymentToken";
|
|
26
|
+
readonly type: "address";
|
|
27
|
+
}, {
|
|
28
|
+
readonly internalType: "uint256";
|
|
29
|
+
readonly name: "payment";
|
|
30
|
+
readonly type: "uint256";
|
|
31
|
+
}, {
|
|
32
|
+
readonly internalType: "address payable";
|
|
33
|
+
readonly name: "paymentReceiver";
|
|
34
|
+
readonly type: "address";
|
|
35
|
+
}];
|
|
36
|
+
readonly name: "setup";
|
|
37
|
+
readonly outputs: readonly [];
|
|
38
|
+
readonly stateMutability: "pure";
|
|
39
|
+
readonly type: "function";
|
|
40
|
+
}];
|
|
41
|
+
readonly networks: {
|
|
42
|
+
readonly 1: {
|
|
43
|
+
readonly address: "0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552";
|
|
44
|
+
};
|
|
45
|
+
readonly 10: {
|
|
46
|
+
readonly address: "0xfb1bffC9d739B8D520DaF37dF666da4C687191EA";
|
|
47
|
+
};
|
|
48
|
+
readonly 8453: {
|
|
49
|
+
readonly address: "0xfb1bffC9d739B8D520DaF37dF666da4C687191EA";
|
|
50
|
+
};
|
|
51
|
+
readonly 42161: {
|
|
52
|
+
readonly address: "0x3E5c63644E683549055b9Be8653de26E0B4CD36E";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export declare const SafeFallbackHandler130: {
|
|
57
|
+
readonly abi: readonly [{
|
|
58
|
+
readonly inputs: readonly [];
|
|
59
|
+
readonly stateMutability: "nonpayable";
|
|
60
|
+
readonly type: "constructor";
|
|
61
|
+
}, {
|
|
62
|
+
readonly inputs: readonly [{
|
|
63
|
+
readonly internalType: "address";
|
|
64
|
+
readonly name: "to";
|
|
65
|
+
readonly type: "address";
|
|
66
|
+
}, {
|
|
67
|
+
readonly internalType: "uint256";
|
|
68
|
+
readonly name: "value";
|
|
69
|
+
readonly type: "uint256";
|
|
70
|
+
}, {
|
|
71
|
+
readonly internalType: "bytes";
|
|
72
|
+
readonly name: "data";
|
|
73
|
+
readonly type: "bytes";
|
|
74
|
+
}, {
|
|
75
|
+
readonly internalType: "enum Enum.Operation";
|
|
76
|
+
readonly name: "operation";
|
|
77
|
+
readonly type: "uint8";
|
|
78
|
+
}];
|
|
79
|
+
readonly name: "simulate";
|
|
80
|
+
readonly outputs: readonly [{
|
|
81
|
+
readonly internalType: "uint256";
|
|
82
|
+
readonly name: "estimate";
|
|
83
|
+
readonly type: "uint256";
|
|
84
|
+
}, {
|
|
85
|
+
readonly internalType: "bool";
|
|
86
|
+
readonly name: "success";
|
|
87
|
+
readonly type: "bool";
|
|
88
|
+
}, {
|
|
89
|
+
readonly internalType: "bytes";
|
|
90
|
+
readonly name: "returnData";
|
|
91
|
+
readonly type: "bytes";
|
|
92
|
+
}];
|
|
93
|
+
readonly stateMutability: "nonpayable";
|
|
94
|
+
readonly type: "function";
|
|
95
|
+
}];
|
|
96
|
+
readonly networks: {
|
|
97
|
+
readonly 1: {
|
|
98
|
+
readonly address: "0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4";
|
|
99
|
+
};
|
|
100
|
+
readonly 10: {
|
|
101
|
+
readonly address: "0x017062a1dE2FE6b99BE3d9d37841FeD19F573804";
|
|
102
|
+
};
|
|
103
|
+
readonly 8453: {
|
|
104
|
+
readonly address: "0x017062a1dE2FE6b99BE3d9d37841FeD19F573804";
|
|
105
|
+
};
|
|
106
|
+
readonly 42161: {
|
|
107
|
+
readonly address: "0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export declare const SafeProxyFactory130: {
|
|
112
|
+
readonly abi: readonly [{
|
|
113
|
+
readonly inputs: readonly [{
|
|
114
|
+
readonly internalType: "address";
|
|
115
|
+
readonly name: "_singleton";
|
|
116
|
+
readonly type: "address";
|
|
117
|
+
}, {
|
|
118
|
+
readonly internalType: "bytes";
|
|
119
|
+
readonly name: "initializer";
|
|
120
|
+
readonly type: "bytes";
|
|
121
|
+
}, {
|
|
122
|
+
readonly internalType: "uint256";
|
|
123
|
+
readonly name: "saltNonce";
|
|
124
|
+
readonly type: "uint256";
|
|
125
|
+
}];
|
|
126
|
+
readonly name: "createProxyWithNonce";
|
|
127
|
+
readonly outputs: readonly [{
|
|
128
|
+
readonly internalType: "contract GnosisSafeProxy";
|
|
129
|
+
readonly name: "proxy";
|
|
130
|
+
readonly type: "address";
|
|
131
|
+
}];
|
|
132
|
+
readonly stateMutability: "nonpayable";
|
|
133
|
+
readonly type: "function";
|
|
134
|
+
}, {
|
|
135
|
+
readonly inputs: readonly [];
|
|
136
|
+
readonly name: "proxyCreationCode";
|
|
137
|
+
readonly outputs: readonly [{
|
|
138
|
+
readonly internalType: "bytes";
|
|
139
|
+
readonly name: "";
|
|
140
|
+
readonly type: "bytes";
|
|
141
|
+
}];
|
|
142
|
+
readonly stateMutability: "pure";
|
|
143
|
+
readonly type: "function";
|
|
144
|
+
}];
|
|
145
|
+
readonly networks: {
|
|
146
|
+
readonly 1: {
|
|
147
|
+
readonly address: "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2";
|
|
148
|
+
};
|
|
149
|
+
readonly 10: {
|
|
150
|
+
readonly address: "0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC";
|
|
151
|
+
};
|
|
152
|
+
readonly 8453: {
|
|
153
|
+
readonly address: "0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC";
|
|
154
|
+
};
|
|
155
|
+
readonly 42161: {
|
|
156
|
+
readonly address: "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
export declare const MorphoManager: {
|
|
161
|
+
readonly abi: readonly [{
|
|
162
|
+
readonly inputs: readonly [{
|
|
163
|
+
readonly internalType: "address";
|
|
164
|
+
readonly name: "";
|
|
165
|
+
readonly type: "address";
|
|
166
|
+
}];
|
|
167
|
+
readonly name: "nonce";
|
|
168
|
+
readonly outputs: readonly [{
|
|
169
|
+
readonly internalType: "uint256";
|
|
170
|
+
readonly name: "";
|
|
171
|
+
readonly type: "uint256";
|
|
172
|
+
}];
|
|
173
|
+
readonly stateMutability: "view";
|
|
174
|
+
readonly type: "function";
|
|
175
|
+
}];
|
|
176
|
+
readonly networks: {
|
|
177
|
+
readonly 1: {
|
|
178
|
+
readonly address: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb";
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export const Safe130 = {
|
|
2
|
+
abi: [{
|
|
3
|
+
inputs: [{ internalType: 'address[]', name: '_owners', type: 'address[]' }, { internalType: 'uint256', name: '_threshold', type: 'uint256' }, { internalType: 'address', name: 'to', type: 'address' }, { internalType: 'bytes', name: 'data', type: 'bytes' }, { internalType: 'address', name: 'fallbackHandler', type: 'address' }, { internalType: 'address', name: 'paymentToken', type: 'address' }, { internalType: 'uint256', name: 'payment', type: 'uint256' }, { internalType: 'address payable', name: 'paymentReceiver', type: 'address' }], name: 'setup', outputs: [], stateMutability: 'pure', type: 'function',
|
|
4
|
+
}],
|
|
5
|
+
networks: {
|
|
6
|
+
1: {
|
|
7
|
+
address: '0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552',
|
|
8
|
+
},
|
|
9
|
+
10: {
|
|
10
|
+
address: '0xfb1bffC9d739B8D520DaF37dF666da4C687191EA',
|
|
11
|
+
},
|
|
12
|
+
8453: {
|
|
13
|
+
address: '0xfb1bffC9d739B8D520DaF37dF666da4C687191EA',
|
|
14
|
+
},
|
|
15
|
+
42161: {
|
|
16
|
+
address: '0x3E5c63644E683549055b9Be8653de26E0B4CD36E',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export const SafeFallbackHandler130 = {
|
|
21
|
+
abi: [{ inputs: [], stateMutability: 'nonpayable', type: 'constructor' }, {
|
|
22
|
+
inputs: [{ internalType: 'address', name: 'to', type: 'address' }, { internalType: 'uint256', name: 'value', type: 'uint256' }, { internalType: 'bytes', name: 'data', type: 'bytes' }, { internalType: 'enum Enum.Operation', name: 'operation', type: 'uint8' }], name: 'simulate', outputs: [{ internalType: 'uint256', name: 'estimate', type: 'uint256' }, { internalType: 'bool', name: 'success', type: 'bool' }, { internalType: 'bytes', name: 'returnData', type: 'bytes' }], stateMutability: 'nonpayable', type: 'function',
|
|
23
|
+
}],
|
|
24
|
+
networks: {
|
|
25
|
+
1: {
|
|
26
|
+
address: '0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4',
|
|
27
|
+
},
|
|
28
|
+
10: {
|
|
29
|
+
address: '0x017062a1dE2FE6b99BE3d9d37841FeD19F573804',
|
|
30
|
+
},
|
|
31
|
+
8453: {
|
|
32
|
+
address: '0x017062a1dE2FE6b99BE3d9d37841FeD19F573804',
|
|
33
|
+
},
|
|
34
|
+
42161: {
|
|
35
|
+
address: '0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
export const SafeProxyFactory130 = {
|
|
40
|
+
abi: [{
|
|
41
|
+
inputs: [{ internalType: 'address', name: '_singleton', type: 'address' }, { internalType: 'bytes', name: 'initializer', type: 'bytes' }, { internalType: 'uint256', name: 'saltNonce', type: 'uint256' }], name: 'createProxyWithNonce', outputs: [{ internalType: 'contract GnosisSafeProxy', name: 'proxy', type: 'address' }], stateMutability: 'nonpayable', type: 'function',
|
|
42
|
+
}, {
|
|
43
|
+
inputs: [], name: 'proxyCreationCode', outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }], stateMutability: 'pure', type: 'function',
|
|
44
|
+
}],
|
|
45
|
+
networks: {
|
|
46
|
+
1: {
|
|
47
|
+
address: '0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2',
|
|
48
|
+
},
|
|
49
|
+
10: {
|
|
50
|
+
address: '0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC',
|
|
51
|
+
},
|
|
52
|
+
8453: {
|
|
53
|
+
address: '0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC',
|
|
54
|
+
},
|
|
55
|
+
42161: {
|
|
56
|
+
address: '0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
export const MorphoManager = {
|
|
61
|
+
abi: [{
|
|
62
|
+
inputs: [{ internalType: 'address', name: '', type: 'address' }], name: 'nonce', outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], stateMutability: 'view', type: 'function',
|
|
63
|
+
}],
|
|
64
|
+
networks: {
|
|
65
|
+
1: {
|
|
66
|
+
address: '0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const STABLE_PAIR_FEE_DIVIDER = "10000";
|
|
2
|
+
export declare const DFS_API_URL = "https://fe.defisaver.com";
|
|
3
|
+
export declare const SAFE_API_URL = "https://fe.defisaver.com";
|
|
4
|
+
export declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
5
|
+
export declare const SLIPPAGE_PERCENT = 0.05;
|
|
6
|
+
export declare const SAFE_REFUND_RECEIVER = "0x25aa0f9a42eE4Ea2Dc7f3c9fF02F558dcb0445a3";
|
|
7
|
+
export declare const SALT_PREFIX = "44654669205361766572";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const STABLE_PAIR_FEE_DIVIDER = '10000';
|
|
2
|
+
export const DFS_API_URL = 'https://fe.defisaver.com';
|
|
3
|
+
export const SAFE_API_URL = 'https://fe.defisaver.com';
|
|
4
|
+
export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
|
5
|
+
export const SLIPPAGE_PERCENT = 0.05;
|
|
6
|
+
export const SAFE_REFUND_RECEIVER = '0x25aa0f9a42eE4Ea2Dc7f3c9fF02F558dcb0445a3';
|
|
7
|
+
export const SALT_PREFIX = '44654669205361766572'; // 'DeFi Saver' in hex
|