@morpho-org/bundler-sdk-viem 2.0.0-next.34 → 2.0.0-next.36

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.
@@ -1,5 +1,6 @@
1
+ import type { InputMarketParams } from "@morpho-org/blue-sdk";
1
2
  import { type Address, type Hex } from "viem";
2
- import type { Action, Authorization, InputMarketParams, InputReallocation, Permit2PermitSingle } from "./types/index.js";
3
+ import type { Action, Authorization, InputReallocation, Permit2PermitSingle } from "./types/index.js";
3
4
  export type BundlerCall = Hex;
4
5
  /**
5
6
  * Namespace to easily encode calls to the Bundler contract, using ethers.
@@ -1,7 +1,6 @@
1
- import type { Account, Chain, Client, Hex, SendTransactionRequest, Transport } from "viem";
2
- import type { Address, MarketParams } from "@morpho-org/blue-sdk";
1
+ import type { Account, Chain, Client, Hex, TransactionRequest, Transport } from "viem";
2
+ import type { Address, InputMarketParams } from "@morpho-org/blue-sdk";
3
3
  import type { SimulationResult } from "@morpho-org/simulation-sdk";
4
- export type InputMarketParams = Pick<MarketParams, "loanToken" | "collateralToken" | "oracle" | "irm" | "lltv">;
5
4
  export interface Authorization {
6
5
  authorizer: Address;
7
6
  authorized: Address;
@@ -196,7 +195,10 @@ export type Requirements = {
196
195
  [T in TransactionRequirementType]: {
197
196
  type: T;
198
197
  args: TransactionRequirementArgs[T];
199
- tx: SendTransactionRequest;
198
+ tx: TransactionRequest & {
199
+ to: Address;
200
+ data: Hex;
201
+ };
200
202
  };
201
203
  };
202
204
  export type TransactionRequirement = Requirements[TransactionRequirementType];
@@ -215,5 +217,8 @@ export interface ActionBundle {
215
217
  signatures: SignatureRequirement[];
216
218
  txs: TransactionRequirement[];
217
219
  };
218
- tx: () => SendTransactionRequest;
220
+ tx: () => TransactionRequest & {
221
+ to: Address;
222
+ data: Hex;
223
+ };
219
224
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@morpho-org/bundler-sdk-viem",
3
3
  "description": "Viem-based extension of `@morpho-org/simulation-sdk` that exports utilities to transform simple interactions on Morpho (such as `Blue_Borrow`) and Morpho Vaults (such as `MetaMorpho_Deposit`) into the required bundles (with ERC20 approvals, transfers, etc) to submit to the bundler onchain.",
4
- "version": "2.0.0-next.34",
4
+ "version": "2.0.0-next.36",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "contributors": [
7
7
  "Rubilmax <rmilon@gmail.com>"
@@ -20,10 +20,10 @@
20
20
  ],
21
21
  "peerDependencies": {
22
22
  "viem": "^2.0.0",
23
- "@morpho-org/blue-sdk": "^2.0.0-next.32",
23
+ "@morpho-org/blue-sdk": "^2.0.0-next.33",
24
24
  "@morpho-org/morpho-ts": "^2.0.0-next.16",
25
- "@morpho-org/simulation-sdk": "^2.0.0-next.30",
26
- "@morpho-org/blue-sdk-viem": "^2.0.0-next.31"
25
+ "@morpho-org/simulation-sdk": "^2.0.0-next.31",
26
+ "@morpho-org/blue-sdk-viem": "^2.0.0-next.33"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@tanstack/query-core": "^5.60.5",
@@ -35,13 +35,13 @@
35
35
  "typescript": "^5.7.2",
36
36
  "viem": "^2.21.54",
37
37
  "vitest": "^2.1.8",
38
- "@morpho-org/blue-sdk-viem": "^2.0.0-next.31",
39
- "@morpho-org/blue-sdk": "^2.0.0-next.32",
40
- "@morpho-org/morpho-test": "^2.0.0-next.22",
41
- "@morpho-org/simulation-sdk": "^2.0.0-next.30",
38
+ "@morpho-org/blue-sdk-viem": "^2.0.0-next.33",
39
+ "@morpho-org/blue-sdk": "^2.0.0-next.33",
40
+ "@morpho-org/morpho-test": "^2.0.0-next.23",
42
41
  "@morpho-org/morpho-ts": "^2.0.0-next.16",
43
- "@morpho-org/test": "^2.0.0-next.28",
44
- "@morpho-org/simulation-sdk-wagmi": "^2.0.0-next.25",
42
+ "@morpho-org/simulation-sdk": "^2.0.0-next.31",
43
+ "@morpho-org/test": "^2.0.0-next.29",
44
+ "@morpho-org/simulation-sdk-wagmi": "^2.0.0-next.26",
45
45
  "@morpho-org/test-wagmi": "^2.0.0-next.25"
46
46
  },
47
47
  "scripts": {