@varla/sdk 2.9.0 → 2.11.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.
@@ -1405,6 +1405,22 @@ export declare const abis: {
1405
1405
  }];
1406
1406
  readonly name: "InvalidLiquidationGracePeriod";
1407
1407
  readonly type: "error";
1408
+ }, {
1409
+ readonly inputs: readonly [{
1410
+ readonly internalType: "uint8";
1411
+ readonly name: "tier";
1412
+ readonly type: "uint8";
1413
+ }, {
1414
+ readonly internalType: "uint256";
1415
+ readonly name: "gracePeriod";
1416
+ readonly type: "uint256";
1417
+ }, {
1418
+ readonly internalType: "uint256";
1419
+ readonly name: "decayPeriod";
1420
+ readonly type: "uint256";
1421
+ }];
1422
+ readonly name: "InvalidLowLiquidityConfig";
1423
+ readonly type: "error";
1408
1424
  }, {
1409
1425
  readonly inputs: readonly [{
1410
1426
  readonly internalType: "uint256";
@@ -1556,6 +1572,56 @@ export declare const abis: {
1556
1572
  }];
1557
1573
  readonly name: "LiquidationGracePeriodUpdated";
1558
1574
  readonly type: "event";
1575
+ }, {
1576
+ readonly anonymous: false;
1577
+ readonly inputs: readonly [{
1578
+ readonly indexed: true;
1579
+ readonly internalType: "uint8";
1580
+ readonly name: "tier";
1581
+ readonly type: "uint8";
1582
+ }, {
1583
+ readonly indexed: false;
1584
+ readonly internalType: "uint256";
1585
+ readonly name: "oldGracePeriod";
1586
+ readonly type: "uint256";
1587
+ }, {
1588
+ readonly indexed: false;
1589
+ readonly internalType: "uint256";
1590
+ readonly name: "oldDecayPeriod";
1591
+ readonly type: "uint256";
1592
+ }, {
1593
+ readonly indexed: false;
1594
+ readonly internalType: "uint256";
1595
+ readonly name: "newGracePeriod";
1596
+ readonly type: "uint256";
1597
+ }, {
1598
+ readonly indexed: false;
1599
+ readonly internalType: "uint256";
1600
+ readonly name: "newDecayPeriod";
1601
+ readonly type: "uint256";
1602
+ }];
1603
+ readonly name: "LowLiquidityConfigUpdated";
1604
+ readonly type: "event";
1605
+ }, {
1606
+ readonly anonymous: false;
1607
+ readonly inputs: readonly [{
1608
+ readonly indexed: true;
1609
+ readonly internalType: "uint256";
1610
+ readonly name: "positionId";
1611
+ readonly type: "uint256";
1612
+ }, {
1613
+ readonly indexed: false;
1614
+ readonly internalType: "uint256";
1615
+ readonly name: "oldLowLiquiditySince";
1616
+ readonly type: "uint256";
1617
+ }, {
1618
+ readonly indexed: false;
1619
+ readonly internalType: "uint256";
1620
+ readonly name: "newLowLiquiditySince";
1621
+ readonly type: "uint256";
1622
+ }];
1623
+ readonly name: "LowLiquiditySinceUpdated";
1624
+ readonly type: "event";
1559
1625
  }, {
1560
1626
  readonly anonymous: false;
1561
1627
  readonly inputs: readonly [{
@@ -1856,6 +1922,26 @@ export declare const abis: {
1856
1922
  }];
1857
1923
  readonly stateMutability: "view";
1858
1924
  readonly type: "function";
1925
+ }, {
1926
+ readonly inputs: readonly [];
1927
+ readonly name: "MAX_LOW_LIQUIDITY_DECAY_PERIOD";
1928
+ readonly outputs: readonly [{
1929
+ readonly internalType: "uint256";
1930
+ readonly name: "";
1931
+ readonly type: "uint256";
1932
+ }];
1933
+ readonly stateMutability: "view";
1934
+ readonly type: "function";
1935
+ }, {
1936
+ readonly inputs: readonly [];
1937
+ readonly name: "MAX_LOW_LIQUIDITY_GRACE_PERIOD";
1938
+ readonly outputs: readonly [{
1939
+ readonly internalType: "uint256";
1940
+ readonly name: "";
1941
+ readonly type: "uint256";
1942
+ }];
1943
+ readonly stateMutability: "view";
1944
+ readonly type: "function";
1859
1945
  }, {
1860
1946
  readonly inputs: readonly [];
1861
1947
  readonly name: "MAX_MAX_STALENESS";
@@ -2200,6 +2286,34 @@ export declare const abis: {
2200
2286
  }];
2201
2287
  readonly stateMutability: "view";
2202
2288
  readonly type: "function";
2289
+ }, {
2290
+ readonly inputs: readonly [{
2291
+ readonly internalType: "uint256";
2292
+ readonly name: "positionId";
2293
+ readonly type: "uint256";
2294
+ }];
2295
+ readonly name: "getLowLiquidityFactor";
2296
+ readonly outputs: readonly [{
2297
+ readonly internalType: "uint256";
2298
+ readonly name: "";
2299
+ readonly type: "uint256";
2300
+ }];
2301
+ readonly stateMutability: "view";
2302
+ readonly type: "function";
2303
+ }, {
2304
+ readonly inputs: readonly [{
2305
+ readonly internalType: "uint256";
2306
+ readonly name: "positionId";
2307
+ readonly type: "uint256";
2308
+ }];
2309
+ readonly name: "getLowLiquiditySince";
2310
+ readonly outputs: readonly [{
2311
+ readonly internalType: "uint256";
2312
+ readonly name: "";
2313
+ readonly type: "uint256";
2314
+ }];
2315
+ readonly stateMutability: "view";
2316
+ readonly type: "function";
2203
2317
  }, {
2204
2318
  readonly inputs: readonly [{
2205
2319
  readonly internalType: "uint256";
@@ -2267,7 +2381,7 @@ export declare const abis: {
2267
2381
  readonly type: "uint8";
2268
2382
  }, {
2269
2383
  readonly internalType: "uint256";
2270
- readonly name: "earlyClosureFactorWad";
2384
+ readonly name: "ltvAdjustmentFactorWad";
2271
2385
  readonly type: "uint256";
2272
2386
  }, {
2273
2387
  readonly internalType: "uint256";
@@ -2544,6 +2658,24 @@ export declare const abis: {
2544
2658
  }];
2545
2659
  readonly stateMutability: "view";
2546
2660
  readonly type: "function";
2661
+ }, {
2662
+ readonly inputs: readonly [{
2663
+ readonly internalType: "uint256";
2664
+ readonly name: "";
2665
+ readonly type: "uint256";
2666
+ }];
2667
+ readonly name: "lowLiquidityConfig";
2668
+ readonly outputs: readonly [{
2669
+ readonly internalType: "uint256";
2670
+ readonly name: "gracePeriod";
2671
+ readonly type: "uint256";
2672
+ }, {
2673
+ readonly internalType: "uint256";
2674
+ readonly name: "decayPeriod";
2675
+ readonly type: "uint256";
2676
+ }];
2677
+ readonly stateMutability: "view";
2678
+ readonly type: "function";
2547
2679
  }, {
2548
2680
  readonly inputs: readonly [];
2549
2681
  readonly name: "maxStaleness";
@@ -2626,6 +2758,24 @@ export declare const abis: {
2626
2758
  readonly outputs: readonly [];
2627
2759
  readonly stateMutability: "nonpayable";
2628
2760
  readonly type: "function";
2761
+ }, {
2762
+ readonly inputs: readonly [{
2763
+ readonly internalType: "uint8";
2764
+ readonly name: "tier";
2765
+ readonly type: "uint8";
2766
+ }, {
2767
+ readonly internalType: "uint256";
2768
+ readonly name: "gracePeriod";
2769
+ readonly type: "uint256";
2770
+ }, {
2771
+ readonly internalType: "uint256";
2772
+ readonly name: "decayPeriod";
2773
+ readonly type: "uint256";
2774
+ }];
2775
+ readonly name: "setLowLiquidityConfig";
2776
+ readonly outputs: readonly [];
2777
+ readonly stateMutability: "nonpayable";
2778
+ readonly type: "function";
2629
2779
  }, {
2630
2780
  readonly inputs: readonly [{
2631
2781
  readonly internalType: "uint256";
@@ -9779,6 +9929,22 @@ export declare const abis: {
9779
9929
  }];
9780
9930
  readonly name: "InvalidLiquidationGracePeriod";
9781
9931
  readonly type: "error";
9932
+ }, {
9933
+ readonly inputs: readonly [{
9934
+ readonly internalType: "uint8";
9935
+ readonly name: "tier";
9936
+ readonly type: "uint8";
9937
+ }, {
9938
+ readonly internalType: "uint256";
9939
+ readonly name: "gracePeriod";
9940
+ readonly type: "uint256";
9941
+ }, {
9942
+ readonly internalType: "uint256";
9943
+ readonly name: "decayPeriod";
9944
+ readonly type: "uint256";
9945
+ }];
9946
+ readonly name: "InvalidLowLiquidityConfig";
9947
+ readonly type: "error";
9782
9948
  }, {
9783
9949
  readonly inputs: readonly [{
9784
9950
  readonly internalType: "uint256";
@@ -9930,6 +10096,56 @@ export declare const abis: {
9930
10096
  }];
9931
10097
  readonly name: "LiquidationGracePeriodUpdated";
9932
10098
  readonly type: "event";
10099
+ }, {
10100
+ readonly anonymous: false;
10101
+ readonly inputs: readonly [{
10102
+ readonly indexed: true;
10103
+ readonly internalType: "uint8";
10104
+ readonly name: "tier";
10105
+ readonly type: "uint8";
10106
+ }, {
10107
+ readonly indexed: false;
10108
+ readonly internalType: "uint256";
10109
+ readonly name: "oldGracePeriod";
10110
+ readonly type: "uint256";
10111
+ }, {
10112
+ readonly indexed: false;
10113
+ readonly internalType: "uint256";
10114
+ readonly name: "oldDecayPeriod";
10115
+ readonly type: "uint256";
10116
+ }, {
10117
+ readonly indexed: false;
10118
+ readonly internalType: "uint256";
10119
+ readonly name: "newGracePeriod";
10120
+ readonly type: "uint256";
10121
+ }, {
10122
+ readonly indexed: false;
10123
+ readonly internalType: "uint256";
10124
+ readonly name: "newDecayPeriod";
10125
+ readonly type: "uint256";
10126
+ }];
10127
+ readonly name: "LowLiquidityConfigUpdated";
10128
+ readonly type: "event";
10129
+ }, {
10130
+ readonly anonymous: false;
10131
+ readonly inputs: readonly [{
10132
+ readonly indexed: true;
10133
+ readonly internalType: "uint256";
10134
+ readonly name: "positionId";
10135
+ readonly type: "uint256";
10136
+ }, {
10137
+ readonly indexed: false;
10138
+ readonly internalType: "uint256";
10139
+ readonly name: "oldLowLiquiditySince";
10140
+ readonly type: "uint256";
10141
+ }, {
10142
+ readonly indexed: false;
10143
+ readonly internalType: "uint256";
10144
+ readonly name: "newLowLiquiditySince";
10145
+ readonly type: "uint256";
10146
+ }];
10147
+ readonly name: "LowLiquiditySinceUpdated";
10148
+ readonly type: "event";
9933
10149
  }, {
9934
10150
  readonly anonymous: false;
9935
10151
  readonly inputs: readonly [{
@@ -1 +1 @@
1
- {"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../src/generated.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBP,CAAC;AAEX,eAAO,MAAM,SAAS;;;CAGZ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from "./contracts.js";
4
4
  export * from "./events/index.js";
5
5
  export * from "./format.js";
6
6
  export * from "./meta.js";
7
+ export * from "./safe.js";
7
8
  export * from "./types.js";
8
9
  export * from "./views/index.js";
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAC;AAEnC,cAAc,YAAY,CAAC;AAE3B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,aAAa,CAAC;AAE5B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAE3B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,oBAAoB,CAAC;AAEnC,cAAc,YAAY,CAAC;AAE3B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,aAAa,CAAC;AAE5B,cAAc,WAAW,CAAC;AAE1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAE3B,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -11,6 +11,8 @@ export * from "./events/index.js";
11
11
  export * from "./format.js";
12
12
  // Chain/platform metadata (UI-friendly).
13
13
  export * from "./meta.js";
14
+ // Safe MultiSend encoding (proxy wallet support).
15
+ export * from "./safe.js";
14
16
  export * from "./types.js";
15
17
  // Higher-level read helpers (views/facades).
16
18
  export * from "./views/index.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,qDAAqD;AACrD,cAAc,oBAAoB,CAAC;AACnC,qDAAqD;AACrD,cAAc,YAAY,CAAC;AAC3B,8CAA8C;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,yBAAyB;AACzB,cAAc,mBAAmB,CAAC;AAElC,4CAA4C;AAC5C,cAAc,aAAa,CAAC;AAC5B,yCAAyC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,6CAA6C;AAC7C,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,qDAAqD;AACrD,cAAc,oBAAoB,CAAC;AACnC,qDAAqD;AACrD,cAAc,YAAY,CAAC;AAC3B,8CAA8C;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,yBAAyB;AACzB,cAAc,mBAAmB,CAAC;AAElC,4CAA4C;AAC5C,cAAc,aAAa,CAAC;AAC5B,yCAAyC;AACzC,cAAc,WAAW,CAAC;AAC1B,kDAAkD;AAClD,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,6CAA6C;AAC7C,cAAc,kBAAkB,CAAC"}
package/dist/safe.d.ts ADDED
@@ -0,0 +1,108 @@
1
+ import { type Address, type Hex } from "viem";
2
+ /**
3
+ * Canonical Safe MultiSend contract address.
4
+ * Deployed at the same address on all EVM chains (Safe v1.3.0+ deterministic deployment).
5
+ *
6
+ * @see https://github.com/safe-global/safe-deployments
7
+ */
8
+ export declare const SAFE_MULTISEND_ADDRESS: Address;
9
+ /**
10
+ * Canonical Safe MultiSend "call only" contract address.
11
+ * Same as MultiSend but restricted to CALL operations (no DELEGATECALL).
12
+ */
13
+ export declare const SAFE_MULTISEND_CALL_ONLY_ADDRESS: Address;
14
+ /**
15
+ * Operation type for Safe transactions.
16
+ * - `0` = CALL (standard external call)
17
+ * - `1` = DELEGATECALL (execute in Safe context)
18
+ */
19
+ export type SafeOperation = 0 | 1;
20
+ /**
21
+ * A single transaction in a Safe MultiSend batch.
22
+ */
23
+ export type SafeMultiSendTx = {
24
+ /** Target contract address. */
25
+ to: Address;
26
+ /** ETH value to send (default: 0). */
27
+ value?: bigint;
28
+ /** Encoded calldata. */
29
+ data: Hex;
30
+ /** Operation type (default: 0 = CALL). */
31
+ operation?: SafeOperation;
32
+ };
33
+ /**
34
+ * Input for building a Safe MultiSend batch.
35
+ * Accepts raw `SafeMultiSendTx` objects or `prepare*()` simulation results.
36
+ *
37
+ * The `request` property from `simulateContract` contains `{ to, data, value }` —
38
+ * exactly what we need.
39
+ */
40
+ export type SafeMultiSendInput = SafeMultiSendTx | {
41
+ request: {
42
+ to: Address;
43
+ data: Hex;
44
+ value?: bigint;
45
+ };
46
+ };
47
+ /**
48
+ * Result of encoding a Safe MultiSend batch.
49
+ */
50
+ export type SafeMultiSendResult = {
51
+ /** Address of the MultiSend contract to call. */
52
+ to: Address;
53
+ /** Encoded `multiSend(bytes)` calldata. */
54
+ data: Hex;
55
+ /** Total ETH value across all transactions. */
56
+ value: bigint;
57
+ /** Number of transactions in the batch. */
58
+ count: number;
59
+ };
60
+ /**
61
+ * Encode multiple transactions into a Safe MultiSend batch.
62
+ *
63
+ * Accepts either raw `SafeMultiSendTx` objects or the result of SDK `prepare*()`
64
+ * helpers (which return `{ request: { to, data, value } }`).
65
+ *
66
+ * Returns the encoded `multiSend(bytes)` calldata ready to be submitted to
67
+ * a Gnosis Safe via `execTransaction` or Safe SDK.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * import { encodeSafeMultiSend } from "@varla/sdk/safe";
72
+ * import * as actions from "@varla/sdk/actions";
73
+ *
74
+ * const approve = await actions.prepareErc1155SetApprovalForAll({ ... });
75
+ * const deposit = await actions.prepareCoreDeposit({ account: safeAddress, ... });
76
+ * const borrow = await actions.prepareCoreBorrow({ account: safeAddress, ... });
77
+ *
78
+ * const batch = encodeSafeMultiSend([approve, deposit, borrow]);
79
+ * // batch.to → MultiSend contract address
80
+ * // batch.data → encoded multiSend(bytes) calldata
81
+ * // batch.value → total ETH value
82
+ *
83
+ * // Submit via Safe SDK:
84
+ * // safeSdk.createTransaction({ safeTransactionData: {
85
+ * // to: batch.to,
86
+ * // data: batch.data,
87
+ * // value: batch.value.toString(),
88
+ * // operation: 1, // DELEGATECALL to MultiSend
89
+ * // }});
90
+ * ```
91
+ *
92
+ * @param inputs - Array of transactions (raw or from `prepare*()` results).
93
+ * @param options - Optional: override MultiSend contract address.
94
+ * @returns Encoded batch ready for Safe submission.
95
+ * @throws If inputs array is empty.
96
+ */
97
+ export declare function encodeSafeMultiSend(inputs: readonly SafeMultiSendInput[], options?: {
98
+ /** Override the MultiSend contract address. */
99
+ multiSendAddress?: Address;
100
+ }): SafeMultiSendResult;
101
+ /**
102
+ * Convenience: encode a Safe MultiSend batch using the "call only" MultiSend
103
+ * contract (no DELEGATECALL allowed in sub-transactions).
104
+ *
105
+ * This is safer for use cases where the batch should only perform external calls.
106
+ */
107
+ export declare function encodeSafeMultiSendCallOnly(inputs: readonly SafeMultiSendInput[]): SafeMultiSendResult;
108
+ //# sourceMappingURL=safe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safe.d.ts","sourceRoot":"","sources":["../src/safe.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAA4C,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAMxF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,OAAsD,CAAC;AAE5F;;;GAGG;AACH,eAAO,MAAM,gCAAgC,EAAE,OACD,CAAC;AAmB/C;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,+BAA+B;IAC/B,EAAE,EAAE,OAAO,CAAC;IACZ,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,IAAI,EAAE,GAAG,CAAC;IACV,0CAA0C;IAC1C,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAC1B,eAAe,GACf;IAAE,OAAO,EAAE;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,iDAAiD;IACjD,EAAE,EAAE,OAAO,CAAC;IACZ,2CAA2C;IAC3C,IAAI,EAAE,GAAG,CAAC;IACV,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAiDF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,kBAAkB,EAAE,EACrC,OAAO,CAAC,EAAE;IACR,+CAA+C;IAC/C,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,GACA,mBAAmB,CAmCrB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,SAAS,kBAAkB,EAAE,GACpC,mBAAmB,CAIrB"}
package/dist/safe.js ADDED
@@ -0,0 +1,148 @@
1
+ // Note: explicit .js extension is required for Node ESM resolution.
2
+ import { concat, encodeFunctionData, encodePacked } from "viem";
3
+ // ═══════════════════════════════════════════════════════════════════════════
4
+ // Constants
5
+ // ═══════════════════════════════════════════════════════════════════════════
6
+ /**
7
+ * Canonical Safe MultiSend contract address.
8
+ * Deployed at the same address on all EVM chains (Safe v1.3.0+ deterministic deployment).
9
+ *
10
+ * @see https://github.com/safe-global/safe-deployments
11
+ */
12
+ export const SAFE_MULTISEND_ADDRESS = "0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526";
13
+ /**
14
+ * Canonical Safe MultiSend "call only" contract address.
15
+ * Same as MultiSend but restricted to CALL operations (no DELEGATECALL).
16
+ */
17
+ export const SAFE_MULTISEND_CALL_ONLY_ADDRESS = "0x9641d764fc13c8B624c04430C7356C1C7C8102e2";
18
+ /**
19
+ * ABI for the Safe MultiSend contract.
20
+ */
21
+ const MULTISEND_ABI = [
22
+ {
23
+ name: "multiSend",
24
+ type: "function",
25
+ stateMutability: "payable",
26
+ inputs: [{ name: "transactions", type: "bytes" }],
27
+ outputs: [],
28
+ },
29
+ ];
30
+ // ═══════════════════════════════════════════════════════════════════════════
31
+ // Helpers
32
+ // ═══════════════════════════════════════════════════════════════════════════
33
+ function normalizeInput(input) {
34
+ if ("request" in input) {
35
+ return {
36
+ to: input.request.to,
37
+ data: input.request.data,
38
+ value: input.request.value ?? 0n,
39
+ operation: 0,
40
+ };
41
+ }
42
+ return input;
43
+ }
44
+ /**
45
+ * Encode a single transaction into the Safe MultiSend packed format.
46
+ *
47
+ * Format (tightly packed, no padding):
48
+ * ```
49
+ * uint8 operation (1 byte)
50
+ * address to (20 bytes)
51
+ * uint256 value (32 bytes)
52
+ * uint256 dataLength (32 bytes)
53
+ * bytes data (variable)
54
+ * ```
55
+ *
56
+ * @see https://github.com/safe-global/safe-smart-account/blob/main/contracts/libraries/MultiSend.sol
57
+ */
58
+ function encodeSingleTx(tx) {
59
+ const op = tx.operation ?? 0;
60
+ const value = tx.value ?? 0n;
61
+ const dataBytes = tx.data;
62
+ // Strip "0x" prefix for length calculation
63
+ const dataLen = (dataBytes.length - 2) / 2;
64
+ return encodePacked(["uint8", "address", "uint256", "uint256", "bytes"], [op, tx.to, value, BigInt(dataLen), dataBytes]);
65
+ }
66
+ // ═══════════════════════════════════════════════════════════════════════════
67
+ // Public API
68
+ // ═══════════════════════════════════════════════════════════════════════════
69
+ /**
70
+ * Encode multiple transactions into a Safe MultiSend batch.
71
+ *
72
+ * Accepts either raw `SafeMultiSendTx` objects or the result of SDK `prepare*()`
73
+ * helpers (which return `{ request: { to, data, value } }`).
74
+ *
75
+ * Returns the encoded `multiSend(bytes)` calldata ready to be submitted to
76
+ * a Gnosis Safe via `execTransaction` or Safe SDK.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * import { encodeSafeMultiSend } from "@varla/sdk/safe";
81
+ * import * as actions from "@varla/sdk/actions";
82
+ *
83
+ * const approve = await actions.prepareErc1155SetApprovalForAll({ ... });
84
+ * const deposit = await actions.prepareCoreDeposit({ account: safeAddress, ... });
85
+ * const borrow = await actions.prepareCoreBorrow({ account: safeAddress, ... });
86
+ *
87
+ * const batch = encodeSafeMultiSend([approve, deposit, borrow]);
88
+ * // batch.to → MultiSend contract address
89
+ * // batch.data → encoded multiSend(bytes) calldata
90
+ * // batch.value → total ETH value
91
+ *
92
+ * // Submit via Safe SDK:
93
+ * // safeSdk.createTransaction({ safeTransactionData: {
94
+ * // to: batch.to,
95
+ * // data: batch.data,
96
+ * // value: batch.value.toString(),
97
+ * // operation: 1, // DELEGATECALL to MultiSend
98
+ * // }});
99
+ * ```
100
+ *
101
+ * @param inputs - Array of transactions (raw or from `prepare*()` results).
102
+ * @param options - Optional: override MultiSend contract address.
103
+ * @returns Encoded batch ready for Safe submission.
104
+ * @throws If inputs array is empty.
105
+ */
106
+ export function encodeSafeMultiSend(inputs, options) {
107
+ if (inputs.length === 0)
108
+ throw new Error("encodeSafeMultiSend: inputs must not be empty");
109
+ const txs = inputs.map(normalizeInput);
110
+ // If only one transaction, return it directly (no need for MultiSend wrapper).
111
+ if (txs.length === 1) {
112
+ const tx = txs[0];
113
+ return {
114
+ to: tx.to,
115
+ data: tx.data,
116
+ value: tx.value ?? 0n,
117
+ count: 1,
118
+ };
119
+ }
120
+ // Pack all transactions
121
+ const packed = txs.map(encodeSingleTx);
122
+ const packedData = concat(packed);
123
+ // Encode the multiSend(bytes) call
124
+ const multiSendCalldata = encodeFunctionData({
125
+ abi: MULTISEND_ABI,
126
+ functionName: "multiSend",
127
+ args: [packedData],
128
+ });
129
+ const totalValue = txs.reduce((sum, tx) => sum + (tx.value ?? 0n), 0n);
130
+ return {
131
+ to: options?.multiSendAddress ?? SAFE_MULTISEND_ADDRESS,
132
+ data: multiSendCalldata,
133
+ value: totalValue,
134
+ count: txs.length,
135
+ };
136
+ }
137
+ /**
138
+ * Convenience: encode a Safe MultiSend batch using the "call only" MultiSend
139
+ * contract (no DELEGATECALL allowed in sub-transactions).
140
+ *
141
+ * This is safer for use cases where the batch should only perform external calls.
142
+ */
143
+ export function encodeSafeMultiSendCallOnly(inputs) {
144
+ return encodeSafeMultiSend(inputs, {
145
+ multiSendAddress: SAFE_MULTISEND_CALL_ONLY_ADDRESS,
146
+ });
147
+ }
148
+ //# sourceMappingURL=safe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safe.js","sourceRoot":"","sources":["../src/safe.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAgB,MAAM,EAAE,kBAAkB,EAAE,YAAY,EAAY,MAAM,MAAM,CAAC;AAExF,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAY,4CAA4C,CAAC;AAE5F;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAC3C,4CAA4C,CAAC;AAE/C;;GAEG;AACH,MAAM,aAAa,GAAG;IACpB;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,SAAS;QAC1B,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QACjD,OAAO,EAAE,EAAE;KACZ;CACO,CAAC;AAoDX,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,SAAS,cAAc,CAAC,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