@morpho-org/bundler-sdk-viem 3.0.0-next.9 → 3.0.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.
@@ -19,31 +19,46 @@ export interface Permit2PermitSingleDetails {
19
19
  }
20
20
  export interface Permit2PermitSingle {
21
21
  details: Permit2PermitSingleDetails;
22
- spender: Address;
23
22
  sigDeadline: bigint;
24
23
  }
25
24
  export interface ActionArgs {
26
- nativeTransfer: [owner: Address, recipient: Address, amount: bigint];
25
+ nativeTransfer: [
26
+ owner: Address,
27
+ recipient: Address,
28
+ amount: bigint,
29
+ skipRevert?: boolean
30
+ ];
27
31
  erc20Transfer: [
28
32
  asset: Address,
29
33
  recipient: Address,
30
34
  amount: bigint,
31
- adapter?: Address
35
+ adapter: Address,
36
+ skipRevert?: boolean
37
+ ];
38
+ erc20TransferFrom: [
39
+ asset: Address,
40
+ amount: bigint,
41
+ recipient: Address,
42
+ skipRevert?: boolean
32
43
  ];
33
- erc20TransferFrom: [asset: Address, amount: bigint, recipient?: Address];
34
44
  erc20WrapperDepositFor: [
35
45
  wrapper: Address,
36
46
  underlying: Address,
37
- amount: bigint
47
+ amount: bigint,
48
+ skipRevert?: boolean
49
+ ];
50
+ erc20WrapperWithdrawTo: [
51
+ wrapper: Address,
52
+ receiver: Address,
53
+ amount: bigint,
54
+ skipRevert?: boolean
38
55
  ];
39
- erc20WrapperWithdrawTo: [wrapper: Address, receiver: Address, amount: bigint];
40
56
  permit: [
41
57
  owner: Address,
42
58
  asset: Address,
43
59
  amount: bigint,
44
60
  deadline: bigint,
45
61
  signature: Hex | null,
46
- spender?: Address,
47
62
  skipRevert?: boolean
48
63
  ];
49
64
  permitDai: [
@@ -52,7 +67,6 @@ export interface ActionArgs {
52
67
  expiry: bigint,
53
68
  allowed: boolean,
54
69
  signature: Hex | null,
55
- spender?: Address,
56
70
  skipRevert?: boolean
57
71
  ];
58
72
  approve2: [
@@ -63,44 +77,42 @@ export interface ActionArgs {
63
77
  ];
64
78
  transferFrom2: [
65
79
  asset: Address,
66
- owner: Address,
67
80
  amount: bigint,
68
- recipient?: Address
81
+ recipient: Address,
82
+ skipRevert?: boolean
69
83
  ];
70
84
  erc4626Mint: [
71
85
  erc4626: Address,
72
86
  shares: bigint,
73
87
  maxSharePrice: bigint,
74
- receiver: Address
88
+ receiver: Address,
89
+ skipRevert?: boolean
75
90
  ];
76
91
  erc4626Deposit: [
77
92
  erc4626: Address,
78
93
  assets: bigint,
79
94
  maxSharePrice: bigint,
80
- receiver: Address
95
+ receiver: Address,
96
+ skipRevert?: boolean
81
97
  ];
82
98
  erc4626Withdraw: [
83
99
  erc4626: Address,
84
100
  assets: bigint,
85
101
  minSharePrice: bigint,
86
102
  receiver: Address,
87
- owner: Address
103
+ owner: Address,
104
+ skipRevert?: boolean
88
105
  ];
89
106
  erc4626Redeem: [
90
107
  erc4626: Address,
91
108
  shares: bigint,
92
109
  minSharePrice: bigint,
93
110
  receiver: Address,
94
- owner: Address
111
+ owner: Address,
112
+ skipRevert?: boolean
95
113
  ];
96
114
  morphoSetAuthorizationWithSig: [
97
- authorization: {
98
- authorizer: Address;
99
- authorized: Address;
100
- isAuthorized: boolean;
101
- nonce: bigint;
102
- deadline: bigint;
103
- },
115
+ authorization: Authorization,
104
116
  signature: Hex | null,
105
117
  skipRevert?: boolean
106
118
  ];
@@ -110,20 +122,23 @@ export interface ActionArgs {
110
122
  shares: bigint,
111
123
  slippageAmount: bigint,
112
124
  onBehalf: Address,
113
- onMorphoSupply: Action[]
125
+ onMorphoSupply: Action[],
126
+ skipRevert?: boolean
114
127
  ];
115
128
  morphoSupplyCollateral: [
116
129
  market: InputMarketParams,
117
130
  assets: bigint,
118
131
  onBehalf: Address,
119
- onMorphoSupplyCollateral: Action[]
132
+ onMorphoSupplyCollateral: Action[],
133
+ skipRevert?: boolean
120
134
  ];
121
135
  morphoBorrow: [
122
136
  market: InputMarketParams,
123
137
  assets: bigint,
124
138
  shares: bigint,
125
139
  slippageAmount: bigint,
126
- receiver: Address
140
+ receiver: Address,
141
+ skipRevert?: boolean
127
142
  ];
128
143
  morphoRepay: [
129
144
  market: InputMarketParams,
@@ -131,25 +146,29 @@ export interface ActionArgs {
131
146
  shares: bigint,
132
147
  slippageAmount: bigint,
133
148
  onBehalf: Address,
134
- onMorphoRepay: Action[]
149
+ onMorphoRepay: Action[],
150
+ skipRevert?: boolean
135
151
  ];
136
152
  morphoWithdraw: [
137
153
  market: InputMarketParams,
138
154
  assets: bigint,
139
155
  shares: bigint,
140
156
  slippageAmount: bigint,
141
- receiver: Address
157
+ receiver: Address,
158
+ skipRevert?: boolean
142
159
  ];
143
160
  morphoWithdrawCollateral: [
144
161
  market: InputMarketParams,
145
162
  assets: bigint,
146
- receiver: Address
163
+ receiver: Address,
164
+ skipRevert?: boolean
147
165
  ];
148
166
  reallocateTo: [
149
167
  vault: Address,
150
168
  fee: bigint,
151
169
  withdrawals: InputReallocation[],
152
- supplyMarket: InputMarketParams
170
+ supplyMarket: InputMarketParams,
171
+ skipRevert?: boolean
153
172
  ];
154
173
  urdClaim: [
155
174
  distributor: Address,
@@ -159,45 +178,61 @@ export interface ActionArgs {
159
178
  proof: Hex[],
160
179
  skipRevert?: boolean
161
180
  ];
162
- wrapNative: [amount: bigint, recipient?: Address];
163
- unwrapNative: [amount: bigint, recipient?: Address];
181
+ wrapNative: [amount: bigint, recipient: Address, skipRevert?: boolean];
182
+ unwrapNative: [amount: bigint, recipient: Address, skipRevert?: boolean];
164
183
  stakeEth: [
165
184
  amount: bigint,
166
185
  minShares: bigint,
167
186
  referral: Address,
168
- recipient?: Address
187
+ recipient: Address,
188
+ skipRevert?: boolean
169
189
  ];
170
- wrapStEth: [amount: bigint, recipient?: Address];
171
- unwrapStEth: [amount: bigint, recipient?: Address];
190
+ wrapStEth: [amount: bigint, recipient: Address, skipRevert?: boolean];
191
+ unwrapStEth: [amount: bigint, recipient: Address, skipRevert?: boolean];
172
192
  aaveV2Repay: [
173
193
  asset: Address,
174
194
  amount: bigint,
175
195
  onBehalf: Address,
176
- rateMode?: bigint
196
+ rateMode?: bigint,
197
+ skipRevert?: boolean
198
+ ];
199
+ aaveV2Withdraw: [
200
+ asset: Address,
201
+ amount: bigint,
202
+ recipient: Address,
203
+ skipRevert?: boolean
177
204
  ];
178
- aaveV2Withdraw: [asset: Address, amount: bigint, recipient?: Address];
179
205
  aaveV3Repay: [
180
206
  asset: Address,
181
207
  amount: bigint,
182
208
  onBehalf: Address,
183
- rateMode?: bigint
209
+ rateMode?: bigint,
210
+ skipRevert?: boolean
211
+ ];
212
+ aaveV3Withdraw: [
213
+ asset: Address,
214
+ amount: bigint,
215
+ recipient: Address,
216
+ skipRevert?: boolean
184
217
  ];
185
- aaveV3Withdraw: [asset: Address, amount: bigint, recipient?: Address];
186
218
  aaveV3OptimizerRepay: [
187
219
  underlying: Address,
188
220
  amount: bigint,
189
- onBehalf: Address
221
+ onBehalf: Address,
222
+ skipRevert?: boolean
190
223
  ];
191
224
  aaveV3OptimizerWithdraw: [
192
225
  underlying: Address,
193
226
  amount: bigint,
194
227
  maxIterations: bigint,
195
- recipient?: Address
228
+ recipient: Address,
229
+ skipRevert?: boolean
196
230
  ];
197
231
  aaveV3OptimizerWithdrawCollateral: [
198
232
  underlying: Address,
199
233
  amount: bigint,
200
- recipient?: Address
234
+ recipient: Address,
235
+ skipRevert?: boolean
201
236
  ];
202
237
  aaveV3OptimizerApproveManagerWithSig: [
203
238
  aaveV3Optimizer: Address,
@@ -206,27 +241,34 @@ export interface ActionArgs {
206
241
  nonce: bigint,
207
242
  deadline: bigint,
208
243
  signature: Hex | null,
209
- manager?: Address,
210
244
  skipRevert?: boolean
211
245
  ];
212
246
  compoundV2Repay: [
213
247
  cToken: Address,
214
248
  amount: bigint,
215
249
  isEth: boolean,
216
- onBehalf: Address
250
+ onBehalf: Address,
251
+ skipRevert?: boolean
217
252
  ];
218
253
  compoundV2Redeem: [
219
254
  cToken: Address,
220
255
  amount: bigint,
221
256
  isEth: boolean,
222
- recipient?: Address
257
+ recipient: Address,
258
+ skipRevert?: boolean
259
+ ];
260
+ compoundV3Repay: [
261
+ instance: Address,
262
+ amount: bigint,
263
+ onBehalf: Address,
264
+ skipRevert?: boolean
223
265
  ];
224
- compoundV3Repay: [instance: Address, amount: bigint, onBehalf: Address];
225
266
  compoundV3WithdrawFrom: [
226
267
  instance: Address,
227
268
  asset: Address,
228
269
  amount: bigint,
229
- recipient?: Address
270
+ recipient: Address,
271
+ skipRevert?: boolean
230
272
  ];
231
273
  compoundV3AllowBySig: [
232
274
  instance: Address,
@@ -235,7 +277,6 @@ export interface ActionArgs {
235
277
  nonce: bigint,
236
278
  expiry: bigint,
237
279
  signature: Hex | null,
238
- manager?: Address,
239
280
  skipRevert?: boolean
240
281
  ];
241
282
  }
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": "3.0.0-next.9",
4
+ "version": "3.0.0",
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": "^3.0.0-next.13",
24
- "@morpho-org/simulation-sdk": "^3.0.0-next.4",
25
- "@morpho-org/morpho-ts": "^2.2.0",
26
- "@morpho-org/blue-sdk-viem": "^2.2.2"
23
+ "@morpho-org/blue-sdk": "^3.0.0",
24
+ "@morpho-org/blue-sdk-viem": "^3.0.0",
25
+ "@morpho-org/simulation-sdk": "^3.0.0",
26
+ "@morpho-org/morpho-ts": "^2.3.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@tanstack/query-core": "^5.62.16",
@@ -35,14 +35,14 @@
35
35
  "typescript": "^5.7.2",
36
36
  "viem": "^2.23.0",
37
37
  "vitest": "^3.0.5",
38
- "@morpho-org/blue-sdk": "^3.0.0-next.13",
39
- "@morpho-org/blue-sdk-viem": "^2.2.2",
40
- "@morpho-org/morpho-ts": "^2.2.0",
41
- "@morpho-org/simulation-sdk": "^3.0.0-next.4",
42
- "@morpho-org/morpho-test": "^2.2.1",
43
- "@morpho-org/test": "^2.0.6",
44
- "@morpho-org/simulation-sdk-wagmi": "^2.0.5",
45
- "@morpho-org/test-wagmi": "^2.0.4"
38
+ "@morpho-org/blue-sdk-viem": "^3.0.0",
39
+ "@morpho-org/morpho-ts": "^2.3.0",
40
+ "@morpho-org/morpho-test": "^2.3.0",
41
+ "@morpho-org/blue-sdk": "^3.0.0",
42
+ "@morpho-org/simulation-sdk": "^3.0.0",
43
+ "@morpho-org/test-wagmi": "^2.0.4",
44
+ "@morpho-org/simulation-sdk-wagmi": "^3.0.0",
45
+ "@morpho-org/test": "^2.1.2"
46
46
  },
47
47
  "scripts": {
48
48
  "prepublish": "$npm_execpath build",