damm-sdk 1.2.31 → 1.3.0

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.
@@ -11,6 +11,7 @@ export * from "./morphoBlue";
11
11
  export * from "./erc20";
12
12
  export * from "./slipstream";
13
13
  export * from "./morphoVault";
14
+ export * from "./syrup";
14
15
  export * from "./merkl";
15
16
  export * from "./oft";
16
17
  export * from "./cctp";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./syrup.vault";
2
+ export { default as SyrupVaultAbi } from "./syrup.vault.abi";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/syrup/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,95 @@
1
+ declare const _default: readonly [{
2
+ readonly inputs: readonly [{
3
+ readonly internalType: "uint256";
4
+ readonly name: "assets_";
5
+ readonly type: "uint256";
6
+ }, {
7
+ readonly internalType: "address";
8
+ readonly name: "receiver_";
9
+ readonly type: "address";
10
+ }];
11
+ readonly name: "deposit";
12
+ readonly outputs: readonly [{
13
+ readonly internalType: "uint256";
14
+ readonly name: "shares_";
15
+ readonly type: "uint256";
16
+ }];
17
+ readonly stateMutability: "nonpayable";
18
+ readonly type: "function";
19
+ }, {
20
+ readonly inputs: readonly [{
21
+ readonly internalType: "uint256";
22
+ readonly name: "assets_";
23
+ readonly type: "uint256";
24
+ }, {
25
+ readonly internalType: "address";
26
+ readonly name: "owner_";
27
+ readonly type: "address";
28
+ }];
29
+ readonly name: "requestWithdraw";
30
+ readonly outputs: readonly [{
31
+ readonly internalType: "uint256";
32
+ readonly name: "escrowedShares_";
33
+ readonly type: "uint256";
34
+ }];
35
+ readonly stateMutability: "nonpayable";
36
+ readonly type: "function";
37
+ }, {
38
+ readonly inputs: readonly [{
39
+ readonly internalType: "uint256";
40
+ readonly name: "shares_";
41
+ readonly type: "uint256";
42
+ }, {
43
+ readonly internalType: "address";
44
+ readonly name: "owner_";
45
+ readonly type: "address";
46
+ }];
47
+ readonly name: "requestRedeem";
48
+ readonly outputs: readonly [{
49
+ readonly internalType: "uint256";
50
+ readonly name: "escrowedShares_";
51
+ readonly type: "uint256";
52
+ }];
53
+ readonly stateMutability: "nonpayable";
54
+ readonly type: "function";
55
+ }, {
56
+ readonly inputs: readonly [];
57
+ readonly name: "asset";
58
+ readonly outputs: readonly [{
59
+ readonly internalType: "address";
60
+ readonly name: "";
61
+ readonly type: "address";
62
+ }];
63
+ readonly stateMutability: "view";
64
+ readonly type: "function";
65
+ }, {
66
+ readonly inputs: readonly [{
67
+ readonly internalType: "address";
68
+ readonly name: "";
69
+ readonly type: "address";
70
+ }];
71
+ readonly name: "balanceOf";
72
+ readonly outputs: readonly [{
73
+ readonly internalType: "uint256";
74
+ readonly name: "";
75
+ readonly type: "uint256";
76
+ }];
77
+ readonly stateMutability: "view";
78
+ readonly type: "function";
79
+ }, {
80
+ readonly inputs: readonly [{
81
+ readonly internalType: "uint256";
82
+ readonly name: "shares_";
83
+ readonly type: "uint256";
84
+ }];
85
+ readonly name: "convertToAssets";
86
+ readonly outputs: readonly [{
87
+ readonly internalType: "uint256";
88
+ readonly name: "assets_";
89
+ readonly type: "uint256";
90
+ }];
91
+ readonly stateMutability: "view";
92
+ readonly type: "function";
93
+ }];
94
+ export default _default;
95
+ //# sourceMappingURL=syrup.vault.abi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syrup.vault.abi.d.ts","sourceRoot":"","sources":["../../../src/integrations/syrup/syrup.vault.abi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAgEW"}
@@ -0,0 +1,30 @@
1
+ import type { Address } from "viem";
2
+ import type { HexString, Unwrapable, Call } from "../../types";
3
+ export type DepositSyrupVaultArgs = Readonly<{
4
+ assets: bigint;
5
+ receiver: Address;
6
+ }>;
7
+ export declare const DepositSyrupVaultCalldata: ({ assets, receiver }: DepositSyrupVaultArgs) => HexString;
8
+ export declare const depositSyrupVaultTrx: ({ args, syrupVaultAddress, }: {
9
+ args: DepositSyrupVaultArgs;
10
+ syrupVaultAddress: Address;
11
+ }) => Unwrapable<Call>;
12
+ export type RequestWithdrawSyrupVaultArgs = Readonly<{
13
+ assets: bigint;
14
+ owner: Address;
15
+ }>;
16
+ export declare const RequestWithdrawSyrupVaultCalldata: ({ assets, owner }: RequestWithdrawSyrupVaultArgs) => HexString;
17
+ export declare const requestWithdrawSyrupVaultTrx: ({ args, syrupVaultAddress, }: {
18
+ args: RequestWithdrawSyrupVaultArgs;
19
+ syrupVaultAddress: Address;
20
+ }) => Unwrapable<Call>;
21
+ export type RequestRedeemSyrupVaultArgs = Readonly<{
22
+ shares: bigint;
23
+ owner: Address;
24
+ }>;
25
+ export declare const RequestRedeemSyrupVaultCalldata: ({ shares, owner }: RequestRedeemSyrupVaultArgs) => HexString;
26
+ export declare const requestRedeemSyrupVaultTrx: ({ args, syrupVaultAddress, }: {
27
+ args: RequestRedeemSyrupVaultArgs;
28
+ syrupVaultAddress: Address;
29
+ }) => Unwrapable<Call>;
30
+ //# sourceMappingURL=syrup.vault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syrup.vault.d.ts","sourceRoot":"","sources":["../../../src/integrations/syrup/syrup.vault.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAS/D,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH,eAAO,MAAM,yBAAyB,yBAA0B,qBAAqB,KAAG,SAEvF,CAAC;AAEF,eAAO,MAAM,oBAAoB;UAIvB,qBAAqB;uBACR,OAAO;MAC1B,WAAW,IAAI,CAOlB,CAAC;AAMF,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,iCAAiC,sBAAuB,6BAA6B,KAAG,SAEpG,CAAC;AAEF,eAAO,MAAM,4BAA4B;UAI/B,6BAA6B;uBAChB,OAAO;MAC1B,WAAW,IAAI,CAOlB,CAAC;AAMF,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,+BAA+B,sBAAuB,2BAA2B,KAAG,SAEhG,CAAC;AAEF,eAAO,MAAM,0BAA0B;UAI7B,2BAA2B;uBACd,OAAO;MAC1B,WAAW,IAAI,CAOlB,CAAC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",
7
- "version": "1.2.31",
7
+ "version": "1.3.0",
8
8
  "files": [
9
9
  "dist",
10
10
  "src",
@@ -11,6 +11,7 @@ export * from "./morphoBlue";
11
11
  export * from "./erc20";
12
12
  export * from "./slipstream";
13
13
  export * from "./morphoVault";
14
+ export * from "./syrup";
14
15
  export * from "./merkl";
15
16
  export * from "./oft";
16
17
  export * from "./cctp";
@@ -0,0 +1,2 @@
1
+ export * from "./syrup.vault";
2
+ export { default as SyrupVaultAbi } from "./syrup.vault.abi";
@@ -0,0 +1,65 @@
1
+ export default [
2
+ {
3
+ inputs: [
4
+ { internalType: "uint256", name: "assets_", type: "uint256" },
5
+ { internalType: "address", name: "receiver_", type: "address" },
6
+ ],
7
+ name: "deposit",
8
+ outputs: [{ internalType: "uint256", name: "shares_", type: "uint256" }],
9
+ stateMutability: "nonpayable",
10
+ type: "function",
11
+ },
12
+ {
13
+ inputs: [
14
+ { internalType: "uint256", name: "assets_", type: "uint256" },
15
+ { internalType: "address", name: "owner_", type: "address" },
16
+ ],
17
+ name: "requestWithdraw",
18
+ outputs: [
19
+ {
20
+ internalType: "uint256",
21
+ name: "escrowedShares_",
22
+ type: "uint256",
23
+ },
24
+ ],
25
+ stateMutability: "nonpayable",
26
+ type: "function",
27
+ },
28
+ {
29
+ inputs: [
30
+ { internalType: "uint256", name: "shares_", type: "uint256" },
31
+ { internalType: "address", name: "owner_", type: "address" },
32
+ ],
33
+ name: "requestRedeem",
34
+ outputs: [
35
+ {
36
+ internalType: "uint256",
37
+ name: "escrowedShares_",
38
+ type: "uint256",
39
+ },
40
+ ],
41
+ stateMutability: "nonpayable",
42
+ type: "function",
43
+ },
44
+ {
45
+ inputs: [],
46
+ name: "asset",
47
+ outputs: [{ internalType: "address", name: "", type: "address" }],
48
+ stateMutability: "view",
49
+ type: "function",
50
+ },
51
+ {
52
+ inputs: [{ internalType: "address", name: "", type: "address" }],
53
+ name: "balanceOf",
54
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
55
+ stateMutability: "view",
56
+ type: "function",
57
+ },
58
+ {
59
+ inputs: [{ internalType: "uint256", name: "shares_", type: "uint256" }],
60
+ name: "convertToAssets",
61
+ outputs: [{ internalType: "uint256", name: "assets_", type: "uint256" }],
62
+ stateMutability: "view",
63
+ type: "function",
64
+ },
65
+ ] as const;
@@ -0,0 +1,91 @@
1
+ import { ethers } from "ethers";
2
+ import SyrupVaultAbi from "./syrup.vault.abi";
3
+ import type { Address } from "viem";
4
+ import type { HexString, Unwrapable, Call } from "../../types";
5
+ import { createCall } from "../../types";
6
+
7
+ const syrupVaultInterface = new ethers.utils.Interface(SyrupVaultAbi);
8
+
9
+ // ============================================================================
10
+ // Deposit
11
+ // ============================================================================
12
+
13
+ export type DepositSyrupVaultArgs = Readonly<{
14
+ assets: bigint;
15
+ receiver: Address;
16
+ }>;
17
+
18
+ export const DepositSyrupVaultCalldata = ({ assets, receiver }: DepositSyrupVaultArgs): HexString => {
19
+ return syrupVaultInterface.encodeFunctionData("deposit", [assets, receiver]) as HexString;
20
+ };
21
+
22
+ export const depositSyrupVaultTrx = ({
23
+ args,
24
+ syrupVaultAddress,
25
+ }: {
26
+ args: DepositSyrupVaultArgs;
27
+ syrupVaultAddress: Address;
28
+ }): Unwrapable<Call> => {
29
+ return createCall({
30
+ operation: 0,
31
+ to: syrupVaultAddress,
32
+ value: 0n,
33
+ data: DepositSyrupVaultCalldata(args),
34
+ });
35
+ };
36
+
37
+ // ============================================================================
38
+ // Request Withdraw (assets-based async withdrawal)
39
+ // ============================================================================
40
+
41
+ export type RequestWithdrawSyrupVaultArgs = Readonly<{
42
+ assets: bigint;
43
+ owner: Address;
44
+ }>;
45
+
46
+ export const RequestWithdrawSyrupVaultCalldata = ({ assets, owner }: RequestWithdrawSyrupVaultArgs): HexString => {
47
+ return syrupVaultInterface.encodeFunctionData("requestWithdraw", [assets, owner]) as HexString;
48
+ };
49
+
50
+ export const requestWithdrawSyrupVaultTrx = ({
51
+ args,
52
+ syrupVaultAddress,
53
+ }: {
54
+ args: RequestWithdrawSyrupVaultArgs;
55
+ syrupVaultAddress: Address;
56
+ }): Unwrapable<Call> => {
57
+ return createCall({
58
+ operation: 0,
59
+ to: syrupVaultAddress,
60
+ value: 0n,
61
+ data: RequestWithdrawSyrupVaultCalldata(args),
62
+ });
63
+ };
64
+
65
+ // ============================================================================
66
+ // Request Redeem (shares-based async withdrawal)
67
+ // ============================================================================
68
+
69
+ export type RequestRedeemSyrupVaultArgs = Readonly<{
70
+ shares: bigint;
71
+ owner: Address;
72
+ }>;
73
+
74
+ export const RequestRedeemSyrupVaultCalldata = ({ shares, owner }: RequestRedeemSyrupVaultArgs): HexString => {
75
+ return syrupVaultInterface.encodeFunctionData("requestRedeem", [shares, owner]) as HexString;
76
+ };
77
+
78
+ export const requestRedeemSyrupVaultTrx = ({
79
+ args,
80
+ syrupVaultAddress,
81
+ }: {
82
+ args: RequestRedeemSyrupVaultArgs;
83
+ syrupVaultAddress: Address;
84
+ }): Unwrapable<Call> => {
85
+ return createCall({
86
+ operation: 0,
87
+ to: syrupVaultAddress,
88
+ value: 0n,
89
+ data: RequestRedeemSyrupVaultCalldata(args),
90
+ });
91
+ };
@@ -504,7 +504,8 @@
504
504
  "ausd": "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a"
505
505
  },
506
506
  "morpho": {
507
- "morphoBlue": "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb"
507
+ "morphoBlue": "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
508
+ "vaultV1_0": "0xBEEFFF7e4EedD83A4a4aB53A68D03eC77C9a57a8"
508
509
  },
509
510
  "lido": {
510
511
  "steth": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",