You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/fassets/reference/IAssetManager.mdx
+70Lines changed: 70 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -278,6 +278,76 @@ function redeem(
278
278
returns (uint256 _redeemedAmountUBA);
279
279
```
280
280
281
+
### `redeemAmount`
282
+
283
+
Redeem up to `_amountUBA` FAssets, like [`redeem`](/fassets/reference/IAssetManager#redeem), but accepts an arbitrary amount in UBA instead of whole lots and does not require a destination tag.
284
+
285
+
The `redeemAmount` function enforces a minimum redemption size `minimumRedeemAmount`.
286
+
287
+
In some cases, not all sent FAssets can be redeemed (for example, if there are insufficient tickets or the maximum ticket limit has been reached).
288
+
In that case, only part of the approved assets are burned and redeemed, and the redeemer can call this method again for the remaining amount.
289
+
The [`RedemptionAmountIncomplete`](/fassets/reference/IAssetManagerEvents#redemptionamountincomplete) event is emitted with the remaining amount.
290
+
291
+
Parameters:
292
+
293
+
-`_amountUBA`: Amount of redeemer's FAssets that will be burned (this is not the received amount; redemption fee is subtracted).
294
+
-`_redeemerUnderlyingAddressString`: Address to which the agent must transfer the underlying amount.
295
+
-`_executor`: Account that can execute redemption default (besides redeemer and agent).
296
+
297
+
Returns:
298
+
299
+
-`_redeemedAmountUBA`: Actual redeemed amount; may be less than requested when ticket availability or ticket limits apply.
300
+
301
+
```solidity
302
+
function redeemAmount(
303
+
uint256 _amountUBA,
304
+
string memory _redeemerUnderlyingAddressString,
305
+
address payable _executor
306
+
) external payable
307
+
returns (uint256 _redeemedAmountUBA);
308
+
```
309
+
310
+
### `redeemWithTag`
311
+
312
+
Redeem up to `_amountUBA` FAssets and require a destination tag in the redemption XRPL payment.
313
+
314
+
In some cases, not all sent FAssets can be redeemed (for example, if there are insufficient tickets or the maximum ticket limit has been reached).
315
+
In that case, only part of the approved assets are burned and redeemed, and the redeemer can call this method again for the remaining amount.
316
+
The [`RedemptionAmountIncomplete`](/fassets/reference/IAssetManagerEvents#redemptionamountincomplete) event is emitted with the remaining amount.
317
+
318
+
Parameters:
319
+
320
+
-`_amountUBA`: Amount of redeemer's FAssets that will be burned (this is not the received amount; redemption fee is subtracted).
321
+
-`_redeemerUnderlyingAddressString`: Address to which the agent must transfer the underlying amount.
322
+
-`_executor`: Account that can execute redemption default (besides redeemer and agent).
323
+
-`_destinationTag`: Destination tag required in redemption payment (XRP only; must fit in 32 bits for now).
324
+
325
+
Returns:
326
+
327
+
-`_redeemedAmountUBA`: Actual redeemed amount; may be less than requested when ticket availability or ticket limits apply.
328
+
329
+
```solidity
330
+
function redeemWithTag(
331
+
uint256 _amountUBA,
332
+
string memory _redeemerUnderlyingAddressString,
333
+
address payable _executor,
334
+
uint256 _destinationTag
335
+
) external payable
336
+
returns (uint256 _redeemedAmountUBA);
337
+
```
338
+
339
+
### `minimumRedeemAmountUBA`
340
+
341
+
Minimum amount in UBA for redemption with tag.
342
+
Redemption requests with smaller amounts are rejected.
343
+
This governance-configured minimum applies to both [`redeemAmount`](/fassets/reference/IAssetManager#redeemamount) and [`redeemWithTag`](/fassets/reference/IAssetManager#redeemwithtag) functions.
344
+
345
+
```solidity
346
+
function minimumRedeemAmountUBA()
347
+
external view
348
+
returns (uint256);
349
+
```
350
+
281
351
### `redemptionPaymentDefault`
282
352
283
353
If the agent fails to transfer the redeemed underlying assets in a timely manner, the redeemer or appointed executor can invoke this method and receive payment in collateral.
Copy file name to clipboardExpand all lines: docs/fassets/reference/IAssetManagerEvents.mdx
+58Lines changed: 58 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,6 +222,48 @@ event RedemptionRequested(
222
222
uint256 executorFeeNatWei);
223
223
```
224
224
225
+
### `RedemptionWithTagRequested`
226
+
227
+
Emitted when the redeemer starts redemption with the tag and provides FAssets.
228
+
The amount corresponding to `valueUBA` FAssets is burned.
229
+
230
+
Several `RedemptionWithTagRequested` events can be emitted in a single redemption call (one per redeemed agent, with multiple tickets for the same agent combined).
231
+
The agent's collateral remains locked at this stage.
232
+
233
+
Parameters:
234
+
235
+
-`agentVault`: Address of the agent vault.
236
+
-`redeemer`: Address of the redeemer.
237
+
-`requestId`: Unique identifier for the redemption request.
238
+
-`paymentAddress`: Address on the underlying chain to which the agent must transfer the payment.
239
+
-`valueUBA`: Amount redeemed in underlying base units.
240
+
-`feeUBA`: Redemption fee in underlying base units.
241
+
-`firstUnderlyingBlock`: First underlying block in the valid payment window.
242
+
-`lastUnderlyingBlock`: Last underlying block in the valid payment window.
243
+
-`lastUnderlyingTimestamp`: Last underlying timestamp in the valid payment window.
244
+
-`paymentReference`: Payment reference that must be used in the underlying payment.
245
+
-`executor`: Address allowed to execute redemption default (besides redeemer and agent).
246
+
-`executorFeeNatWei`: Fee paid to the executor in NAT wei.
247
+
-`destinationTag`: Destination tag required for the XRP payment.
248
+
249
+
```solidity
250
+
event RedemptionWithTagRequested(
251
+
address indexed agentVault,
252
+
address indexed redeemer,
253
+
uint256 indexed requestId,
254
+
string paymentAddress,
255
+
uint256 valueUBA,
256
+
uint256 feeUBA,
257
+
uint256 firstUnderlyingBlock,
258
+
uint256 lastUnderlyingBlock,
259
+
uint256 lastUnderlyingTimestamp,
260
+
bytes32 paymentReference,
261
+
address executor,
262
+
uint256 executorFeeNatWei,
263
+
uint256 destinationTag
264
+
);
265
+
```
266
+
225
267
### `RedemptionTicketCreated`
226
268
227
269
This event is emitted when a redemption ticket is created, when a minting transaction is executed.
Emitted when only a partial redemption can occur, for instance, if there are insufficient redemption tickets or if fulfilling the entire request would exceed the allowed ticket limit.
350
+
351
+
Parameters:
352
+
353
+
-`redeemer`: Address of the user who requested redemption.
354
+
-`remainingAmountUBA`: Amount (UBA) that could not be redeemed and is returned.
355
+
356
+
```solidity
357
+
event RedemptionAmountIncomplete(
358
+
address indexed redeemer,
359
+
uint256 remainingAmountUBA
360
+
);
361
+
```
362
+
305
363
### `RedemptionDefault`
306
364
307
365
Emitted when a redemption payment times out and the redeemer is compensated with collateral instead.
0 commit comments