Skip to content

Commit

Permalink
Document 3-asset RAMM deletion function
Browse files Browse the repository at this point in the history
  • Loading branch information
rockbmb committed Apr 22, 2024
1 parent 3271448 commit 9acbfcb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ramm-sui/sources/ramm.move
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,16 @@ module ramm_sui::ramm {
/// RAMM deletion code
/// ------------------

/// Given a 3-asset RAMM and its admin cap, delete both.
///
/// If successful, the transaction in which this Move call is included will cause, among other
/// effects:
/// 1. The deletion of the shared RAMM object
/// 2. The deletion of that RAMM's admin cap object
/// 3. The transfer of hitherto collected fees and balances, from all of the RAMM's assets,
/// to the address speficied upon the RAMM's creation as its `fee_collector`
/// 4. The transfer of all of the `Supply` objects controlling minting and burning of LP tokens
/// for each of the RAMM's assets to `fee_collector`, wrapped in an `LPTSupplyBag` object.
public fun delete_ramm_3<Asset1, Asset2, Asset3>(
self: RAMM,
admin_cap: RAMMAdminCap,
Expand Down Expand Up @@ -821,6 +831,7 @@ module ramm_sui::ramm {
/*
*/

// With this, the RAMM is deleted.
ramm_uid.delete();
}

Expand Down

0 comments on commit 9acbfcb

Please sign in to comment.