Skip to content

Commit

Permalink
[sui move examples] make managed::mint an entry function
Browse files Browse the repository at this point in the history
If this were real code, we would want to enable minting via invocation from a tx
  • Loading branch information
sblackshear committed Oct 10, 2022
1 parent c49b74e commit b703077
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ module fungible_tokens::managed {
}

/// Manager can mint new coins
public fun mint(treasury_cap: &mut TreasuryCap<MANAGED>, amount: u64, ctx: &mut TxContext): Coin<MANAGED> {
coin::mint<MANAGED>(treasury_cap, amount, ctx)
public entry fun mint(
treasury_cap: &mut TreasuryCap<MANAGED>, amount: u64, recipient: address, ctx: &mut TxContext
) {
coin::mint_and_transfer(treasury_cap, amount, recipient, ctx)
}

/// Manager can burn coins
Expand Down

0 comments on commit b703077

Please sign in to comment.