gondi 0.8.2 → 0.9.2

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,468 @@
1
+ # Breaking Changes 0.6.0
2
+
3
+ ### Important
4
+
5
+ ---
6
+
7
+ This document outlines the breaking changes introduced in our codebase for version 0.6.0. Please review these changes carefully to ensure a smooth migration.
8
+
9
+ ## Table of Contents
10
+
11
+ - [Emit Loan](#emit-loan)
12
+ - [Revoke Delegate](#revoke-delegate)
13
+ - [Make Offer](#make-offer)
14
+ - [Make Refinance Offer](#make-refinance-offer)
15
+
16
+ ---
17
+
18
+ ## Emit Loan
19
+
20
+ **Description:**
21
+
22
+ `emitLoan` method argument has been updated to:
23
+
24
+ ```ts
25
+ interface EmitLoanArgs {
26
+ offerExecution: {
27
+ offer: Omit<model.SingleNftOffer | model.CollectionOffer, 'nftId'>;
28
+ amount?: bigint;
29
+ lenderOfferSignature: Hash;
30
+ }[];
31
+ tokenId: bigint;
32
+ duration: bigint;
33
+ principalReceiver?: Address;
34
+ expirationTime?: bigint;
35
+ }
36
+ ```
37
+
38
+ **Reason:**
39
+
40
+ This allows us to introduce further customization of this method in the future for new versions of the contracts.
41
+
42
+ **Migration Steps:**
43
+
44
+ See `offerExecutionFromOffers` helper. `amounts` is optional and should specify the amount to be taken from each offer. If index of offer not found in amounts, will default to offer principal ammount.
45
+
46
+ ```ts
47
+ offerExecutionFromOffers(offers: OfferFromExecutionOffer[], amounts?: bigint[])
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Revoke Delegate
53
+
54
+ **Description:**
55
+
56
+ As `emitLoan` arguments have been updated, argument `emit` from `revokeDelegate` has to be updated.
57
+
58
+ **Reason:**
59
+
60
+ `emitLoan` arguments have been updated and that impacts this method.
61
+
62
+ **Migration Steps:**
63
+
64
+ Build `emit` argument the same way it's explained in `emitLoan` migrations steps.
65
+
66
+ ---
67
+
68
+ ## Make Offer
69
+
70
+ **Description:**
71
+
72
+ `maxSeniorRepayment` it's been added to object received in `makeCollectionOffer` and `makeSingleNftOffer`.
73
+
74
+ **Reason:**
75
+
76
+ This allows us to set a floor when using the current offer with other offer when creating loans.
77
+
78
+ ---
79
+
80
+ ## Make Refinance Offer
81
+
82
+ **Description:**
83
+
84
+ `targetPrincipal` it's still required for versions 1 and 2 of Gondi. In future versions, `trancheIndex` will be required in its place.
85
+
86
+ **Reason:**
87
+
88
+ Next versions of Gondi will change the way in which sources (future tranches) from loan are refinanced.
89
+
90
+ ---
91
+
92
+ # Breaking Changes 0.5.0
93
+
94
+ ### Important
95
+
96
+ ---
97
+
98
+ This document outlines the breaking changes introduced in our codebase for version 0.5.0. Please review these changes carefully to ensure a smooth migration.
99
+
100
+ ## Table of Contents
101
+
102
+ - [Offers](#offers)
103
+
104
+ ---
105
+
106
+ ## Offers
107
+
108
+ **Description:**
109
+
110
+ `offers` method now expects `lenders: Address[]` instead of `lender: Address` uin the `filterBy` argument.
111
+
112
+ **Reason:**
113
+
114
+ Query now allows multiple addresses in the filter.
115
+
116
+ ---
117
+
118
+ # Breaking Changes 0.3.8
119
+
120
+ ### Important
121
+
122
+ This document outlines the breaking changes introduced in our codebase for version 0.3.8. Please review these changes carefully to ensure a smooth migration.
123
+
124
+ ## Table of Contents
125
+
126
+ - [Repay Loan](#repay-loan)
127
+ - [Refinance Full Loan](#refinance-full-loan)
128
+ - [Refinance Partial Loan](#refinance-partial-loan)
129
+ - [Liquidate Loan](#liquidate-loan)
130
+ - [Leverage Sell](#leverage-sell)
131
+
132
+ ---
133
+
134
+ ## Repay Loan
135
+
136
+ **Description:**
137
+
138
+ `repayLoan` method now expects `loanId` argument:
139
+
140
+ ```ts
141
+ async repayLoan(args: { loan: LoanV4V5; loanId: bigint; nftReceiver?: Address }) { ... }
142
+ ```
143
+
144
+ **Reason:**
145
+
146
+ We previously assumed that the loanId was equal to the loanId of the first source. Due to loan extension that's no longer the case
147
+
148
+ ---
149
+
150
+ ## Refinance Full Loan
151
+
152
+ **Description:**
153
+
154
+ `refinanceFullLoan` method now expects `loanId` argument:
155
+
156
+ ```ts
157
+ async refinanceFullLoan(args: { loan: LoanV4V5; loanId: bigint; offer: model.RenegotiationOffer; }) { ... }
158
+ ```
159
+
160
+ **Reason:**
161
+
162
+ We previously assumed that the loanId was equal to the loanId of the first source. Due to loan extension that's no longer the case
163
+
164
+ ---
165
+
166
+ ## Refinance Partial Loan
167
+
168
+ **Description:**
169
+
170
+ `refinancePartialLoan` method now expects `loanId` argument:
171
+
172
+ ```ts
173
+ async refinancePartialLoan(args: { loan: LoanV4V5; loanId: bigint; offer: model.RenegotiationOffer; }) { ... }
174
+ ```
175
+
176
+ **Reason:**
177
+
178
+ We previously assumed that the loanId was equal to the loanId of the first source. Due to loan extension that's no longer the case
179
+
180
+ ---
181
+
182
+ ## Liquidate Loan
183
+
184
+ **Description:**
185
+
186
+ `liquidateLoan` method now expects one argument with both `loanId` and `loan`:
187
+
188
+ ```ts
189
+ async liquidateLoan(args: { loan: LoanV4V5; loanId: bigint; }) { ... }
190
+ ```
191
+
192
+ **Reason:**
193
+
194
+ We previously assumed that the loanId was equal to the loanId of the first source. Due to loan extension that's no longer the case.
195
+ We are also using an object to accomodate for the flexibility of adding new parameters in the future
196
+
197
+ ---
198
+
199
+ ## Leverage Sell
200
+
201
+ **Description:**
202
+
203
+ `leverageSell` method now expects `loanId` argument:
204
+
205
+ ```ts
206
+ async leverageSell(args: { loan: LoanV4V5; loanId: bigint; price: bigint; orderSource: string; }) { ... }
207
+ ```
208
+
209
+ **Reason:**
210
+
211
+ We previously assumed that the loanId was equal to the loanId of the first source. Due to loan extension that's no longer the case.
212
+
213
+ ---
214
+
215
+ # Breaking Changes 0.3.0b4
216
+
217
+ ### Important
218
+
219
+ **Migration to version 0.3.x is discouraged until release is a stable version, and not a beta version as it is right now.**
220
+
221
+ ---
222
+
223
+ This document outlines the breaking changes introduced in our codebase for version 0.3.0b4. Please review these changes carefully to ensure a smooth migration.
224
+
225
+ ## Table of Contents
226
+
227
+ - [Settle Auction](#settle-auction)
228
+
229
+ ---
230
+
231
+ ## Settle Auction
232
+
233
+ **Description:**
234
+
235
+ `settleAuction` method now no loger expects `collectionContractAddress` and `tokenId` arguments:
236
+
237
+ ```ts
238
+ async settleAuction(args: { loan: LoanV4V5; auction: model.Auction }) { ... }
239
+ ```
240
+
241
+ **Reason:**
242
+
243
+ Both arguments could be inferred from loan.
244
+
245
+ ---
246
+
247
+ # Breaking Changes 0.3.0b1
248
+
249
+ ### Important
250
+
251
+ **Migration to version 0.3.x is discouraged until release is a stable version, and not a beta version as it is right now.**
252
+
253
+ ---
254
+
255
+ This document outlines the breaking changes introduced in our codebase for version 0.3.0b1. Please review these changes carefully to ensure a smooth migration.
256
+
257
+ ## Table of Contents
258
+
259
+ - [Approve NFT For All](#approve-nft-for-all)
260
+ - [Approve Token](#approve-token)
261
+
262
+ ---
263
+
264
+ ## Approve NFT For All
265
+
266
+ **Description:**
267
+
268
+ `approveNFTForAll` method now expects an object with the following shape:
269
+
270
+ ```ts
271
+ async approveNFTForAll(args: { nftAddress: Address; to?: Address }) { ... }
272
+ ```
273
+
274
+ `to` is optional and will default to MultiSourceLoan contract.
275
+
276
+ **Reason:**
277
+
278
+ Consistency accross other methods.
279
+
280
+ ---
281
+
282
+ ## Approve Token
283
+
284
+ **Description:**
285
+
286
+ `approveToken` method now expects an object with the following shape:
287
+
288
+ ```ts
289
+ async approveToken(args: { tokenAddress: Address; amount?: bigint; to?: Address }) { ... }
290
+ ```
291
+
292
+ `amount` is optional and will default to MultiSourceLoan contract.
293
+
294
+ `to` is optional and will default to internal `MAX_NUMBER`` constant.
295
+
296
+ **Reason:**
297
+
298
+ Consistency accross other methods.
299
+
300
+ ---
301
+
302
+ # Breaking Changes 0.2.0
303
+
304
+ This document outlines the breaking changes introduced in our codebase for version 0.2.0. Please review these changes carefully to ensure a smooth migration.
305
+
306
+ ## Table of Contents
307
+
308
+ - [Hide Offer](#hide-offer)
309
+ - [Hide Renegotiation Offer](#hide-renegotiation-offer)
310
+
311
+ ---
312
+
313
+ ## Hide Offer
314
+
315
+ **Description:**
316
+ `hideOffer` method now expects an object with an id and contract address inside. This id should be the `offerId` of the offer you want to hide, not the full id.
317
+
318
+ **Reason:**
319
+ Consistency accross other methods.
320
+
321
+ **Migration Steps:**
322
+
323
+ Change the argument sent to `hideOffer` to an object containing the `offerId` of the offer you want to hide, and the contract address of the offer
324
+
325
+ ---
326
+
327
+ ## Hide Renegotiation Offer
328
+
329
+ **Description:**
330
+ `hideRenegotiationOffer` method now expects an object with an id and contract address inside. This id should be the `renegotiationId` of the renegotiation you want to hide, not the full id.
331
+
332
+ **Reason:**
333
+ Consistency accross other methods.
334
+
335
+ **Migration Steps:**
336
+
337
+ Change the argument sent to `hideRenegotiationOffer` to an object containing the `renegotiationId` of the renegotiation you want to hide, and the `loanAddress` of the renegotiation
338
+
339
+ ---
340
+
341
+ # Breaking Changes 0.1.0
342
+
343
+ This document outlines the breaking changes introduced in our codebase for version 0.1.0. Please review these changes carefully to ensure a smooth migration.
344
+
345
+ ## Table of Contents
346
+
347
+ - [Cancel Offer](#cancel-offer)
348
+ - [Cancel Refinance Offer](#cancel-refinance-offer)
349
+ - [Cancel All Offers](#cancel-all-offers)
350
+ - [Cancel All Renegotiations](#cancel-all-renegotiations)
351
+ - [Repay Loan](#repay-loan-1)
352
+ - [Refinance Full Loan](#refinance-full-loan-1)
353
+ - [Emit Loan](#emit-loan-1)
354
+ - [Make Refinance Offer](#make-refinance-offer-1)
355
+
356
+ ---
357
+
358
+ ## Cancel Offer
359
+
360
+ **Description:**
361
+ `cancelOffer` method now expects an object as an argument, with the id and contractAddress inside
362
+
363
+ **Reason:**
364
+ This allows us to introduce further customization of this method in the future.
365
+
366
+ **Migration Steps:**
367
+
368
+ Change the argument sent to `cancelOffer` to an object containing the id of the offer you want to cancel, and the contract address of the related contract
369
+
370
+ ---
371
+
372
+ ## Cancel Refinance Offer
373
+
374
+ **Description:**
375
+ `cancelRefinanceOffer` method now expects an object as an argument, with the id and contractAddress inside
376
+
377
+ **Reason:**
378
+ This allows us to introduce further customization of this method in the future.
379
+
380
+ **Migration Steps:**
381
+
382
+ Change the argument sent to `cancelRefinanceOffer` to an object containing the id of the offer you want to cancel, and the contract address of the related contract
383
+
384
+ ---
385
+
386
+ ## Cancel All Offers
387
+
388
+ **Description:**
389
+ `cancelOffers` method now expects the key `contractAddress` instead of `contract` in the argument
390
+
391
+ **Reason:**
392
+ Consistency accross other methods
393
+
394
+ **Migration Steps:**
395
+
396
+ Change the key from `contract` to `contractAddress`
397
+
398
+ ---
399
+
400
+ ## Cancel All Renegotiations
401
+
402
+ **Description:**
403
+ `cancelAllRenegotiations` method now expects the key `contractAddress` instead of `contract` in the argument
404
+
405
+ **Reason:**
406
+ Consistency accross other methods
407
+
408
+ **Migration Steps:**
409
+
410
+ Change the key from `contract` to `contractAddress`
411
+
412
+ ---
413
+
414
+ ## Repay Loan
415
+
416
+ **Description:**
417
+ `repayLoan` method now expects an object as an argument, with the loan and nftReceiver
418
+
419
+ **Reason:**
420
+ This allows us to introduce further customization of this method in the future.
421
+
422
+ **Migration Steps:**
423
+
424
+ Change the argument sent to `repayLoan` to an object containing the loan you want to repay, and the address of the receiver of the NFT
425
+
426
+ ---
427
+
428
+ ## Refinance Full Loan
429
+
430
+ **Description:**
431
+ `refinanceFullLoan` method now expects an object as an argument, with the loan and the refinance offer
432
+
433
+ **Reason:**
434
+ This allows us to introduce further customization of this method in the future.
435
+
436
+ **Migration Steps:**
437
+
438
+ Change the argument sent to `refinanceFullLoan` to an object containing the loan you want to refinance, and the refinance offer
439
+
440
+ ---
441
+
442
+ ## Emit Loan
443
+
444
+ **Description:**
445
+ `emitLoan` method now expects an object as an argument, with the offer and tokenId
446
+
447
+ **Reason:**
448
+ This allows us to introduce further customization of this method in the future.
449
+
450
+ **Migration Steps:**
451
+
452
+ Change the argument sent to `emitLoan` to an object containing the offer you want to emit, and the tokenId of the NFT
453
+
454
+ ---
455
+
456
+ ## Make Refinance Offer
457
+
458
+ **Description:**
459
+ `makeRefinanceOffer` method now expects an object as an argument, with the renegotiation, the contract address and the skipSignature boolean
460
+
461
+ **Reason:**
462
+ This allows us to introduce further customization of this method in the future.
463
+
464
+ **Migration Steps:**
465
+
466
+ Change the argument sent to `makeRefinanceOffer` to an object containing the renegotiation data, the contract address of the related contract and the skipSignature boolean
467
+
468
+ ---