memez_fun
destroy - destroys the Migrator hot potato to get the inner balances.
public fun destroy<Meme, Quote, Witness: drop>(
migrator: MemezMigrator<Meme, Quote>,
_: Witness,
): (address, Balance<Meme>, Balance<Quote>)Arguments:
migrator: MemezMigrator<Meme, Quote>The migration hot potato representing a Memez pool in its migratable state. Consuming this object finalizes the migration process and allows recovery of the underlying assets._: WitnessA witness type ensuring only the authorized package can invokedestroyfunction. Serves as a compile-time capability check (must have thedropability).
update_metadata - replaces the pool metadata.
public fun update_metadata<Curve, Meme, Quote>(
self: &mut MemezFun<Curve, Meme, Quote>,
metadata_cap: &MetadataCap,
mut metadata: VecMap<String, String>,
)Arguments:
self: &mut MemezFun<Curve, Meme, Quote>A mutable reference to the Memez pool instance (for any curve type). This is the pool whose metadata will be updated.metadata_cap: &MetadataCapA capability object that authorizes metadata updates. Ensures only accounts with the correct permission can modify the pool’s metadata.metadata: VecMap<String, String>A key–value map of metadata fields (as strings) to attach or update on the pool. Typical entries may include name, symbol, description, or custom fields relevant to frontends or indexers.
metadata - returns the current pool metadata
public fun metadata<Curve, Meme, Quote>(
self: &MemezFun<Curve, Meme, Quote>,
): VecMap<String, String>Arguments:
self: &MemezFun<Curve, Meme, Quote>An immutable reference to the Memez pool instance (for any curve type). The pool whose metadata will be read.
next_nonce - returns the next nonce for the server to create a signature valid for the user.
public fun next_nonce<Curve, Meme, Quote>(self: &MemezFun<Curve, Meme, Quote>, user: address): u64Arguments:
self: &MemezFun<Curve, Meme, Quote>An immutable reference to the Memez pool instance (for any curve type). The pool from which the nonce will be queried.user: addressThe address of the user whose next nonce is being requested. It is used to prevent replay attacks and ensure transaction uniqueness for that user in the pool.
Last updated
Was this helpful?