@morpho-org/bundler-sdk-viem 2.0.0-next.23 → 2.0.0-next.25

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.
Files changed (2) hide show
  1. package/lib/operations.js +3 -3
  2. package/package.json +12 -12
package/lib/operations.js CHANGED
@@ -268,7 +268,7 @@ export const populateSubBundle = (inputOperation, data, options = {}) => {
268
268
  },
269
269
  };
270
270
  // Operations with callbacks are populated recursively as a side-effect of the simulation, within the callback itself.
271
- let requiredTokenAmounts = data.simulateRequiredTokenAmounts(operations.concat([simulatedOperation]));
271
+ let { requiredTokenAmounts } = data.simulateWithUnlimitedBalances(operations.concat([simulatedOperation]), [bundler]);
272
272
  const allOperations = operations.concat([
273
273
  mainOperation,
274
274
  ]);
@@ -283,9 +283,9 @@ export const populateSubBundle = (inputOperation, data, options = {}) => {
283
283
  return allOperations;
284
284
  }
285
285
  const requirementOperations = getRequirementOperations?.(requiredTokenAmounts) ?? [];
286
- requiredTokenAmounts = data.simulateRequiredTokenAmounts(requirementOperations
286
+ ({ requiredTokenAmounts } = data.simulateWithUnlimitedBalances(requirementOperations
287
287
  .concat(allOperations)
288
- .map((operation) => getSimulatedBundlerOperation(operation)));
288
+ .map((operation) => getSimulatedBundlerOperation(operation)), [bundler]));
289
289
  // Append required input transfers.
290
290
  requiredTokenAmounts.forEach(({ token, required }) => {
291
291
  requirementOperations.push(...populateInputTransfer({
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.23",
4
+ "version": "2.0.0-next.25",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "contributors": [
7
7
  "Rubilmax <rmilon@gmail.com>"
@@ -20,9 +20,9 @@
20
20
  ],
21
21
  "peerDependencies": {
22
22
  "viem": "^2.0.0",
23
- "@morpho-org/blue-sdk": "^2.0.0-next.23",
24
- "@morpho-org/blue-sdk-viem": "^2.0.0-next.21",
25
- "@morpho-org/simulation-sdk": "^2.0.0-next.18",
23
+ "@morpho-org/blue-sdk": "^2.0.0-next.24",
24
+ "@morpho-org/simulation-sdk": "^2.0.0-next.20",
25
+ "@morpho-org/blue-sdk-viem": "^2.0.0-next.22",
26
26
  "@morpho-org/morpho-ts": "^2.0.0-next.12"
27
27
  },
28
28
  "devDependencies": {
@@ -33,16 +33,16 @@
33
33
  "@types/lodash": "^4.17.12",
34
34
  "lodash": "^4.17.21",
35
35
  "typescript": "^5.6.3",
36
- "viem": "^2.21.40",
36
+ "viem": "^2.21.44",
37
37
  "vitest": "^2.1.4",
38
- "@morpho-org/blue-sdk-viem": "^2.0.0-next.21",
39
- "@morpho-org/blue-sdk": "^2.0.0-next.23",
40
- "@morpho-org/morpho-test": "^2.0.0-next.13",
38
+ "@morpho-org/blue-sdk": "^2.0.0-next.24",
39
+ "@morpho-org/blue-sdk-viem": "^2.0.0-next.22",
41
40
  "@morpho-org/morpho-ts": "^2.0.0-next.12",
42
- "@morpho-org/simulation-sdk": "^2.0.0-next.18",
43
- "@morpho-org/simulation-sdk-wagmi": "^2.0.0-next.20",
44
- "@morpho-org/test-wagmi": "^2.0.0-next.19",
45
- "@morpho-org/test": "^2.0.0-next.19"
41
+ "@morpho-org/morpho-test": "^2.0.0-next.14",
42
+ "@morpho-org/simulation-sdk": "^2.0.0-next.20",
43
+ "@morpho-org/test": "^2.0.0-next.20",
44
+ "@morpho-org/test-wagmi": "^2.0.0-next.20",
45
+ "@morpho-org/simulation-sdk-wagmi": "^2.0.0-next.21"
46
46
  },
47
47
  "scripts": {
48
48
  "prepublish": "$npm_execpath build",