Skip to content

Commit

Permalink
fix(docs): More move warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter committed Aug 13, 2024
1 parent d1f0337 commit cc19022
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ A rule module is a regular module with a `verify`-like function that typically t

```move
module example::pass_rule {
use iota::tx_context;
use iota::token::{Self, ActionRequest, TokenPolicy};
/// The Rule type
Expand Down
7 changes: 3 additions & 4 deletions docs/content/developer/standards/coin-manager.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ module example::exclusive_coin {
public struct EXCLUSIVE_COIN has drop {}
#[allow(lint(share_owned))]
fun init(witness: EXCLUSIVE_COIN, ctx: &mut TxContext) {
// Create a `Coin` type and have it managed.
let (cm_treasury_cap, cm_meta_cap, mut manager) = coin_manager::create(
let (cm_treasury_cap, cm_meta_cap, manager) = coin_manager::create(
witness,
0,
b"EXCL",
Expand Down Expand Up @@ -71,7 +70,7 @@ If you already have an existing `Coin`, you can create the `CoinManager` object
If you already froze the `Metadata` object you can only migrate to a `CoinManager` that has immutable metadata from the start. You will not receive a `CoinManagerMetadataCap` in return, but you will get a `CoinManagerTreasuryCap`:

```move
let (cm_treasury_cap, mut manager) = coin_manager::new_with_immutable_metadata(cap, &meta, ctx);
let (cm_treasury_cap, manager) = coin_manager::new_with_immutable_metadata(cap, &meta, ctx);
// Transfer the `CoinManagerTreasuryCap` to the creator of the `Coin`.
transfer::public_transfer(cm_treasury_cap, ctx.sender());
Expand All @@ -84,7 +83,7 @@ transfer::public_share_object(manager);
If the metadata object is still owned, you can take advantage of the full functionality of the `CoinManager` with mutable `Metadata`:

```move
let (cm_treasury_cap, cm_meta_cap, mut manager) = coin_manager::new(cap, meta, ctx);
let (cm_treasury_cap, cm_meta_cap, manager) = coin_manager::new(cap, meta, ctx);
// Transfer the `CoinManagerTreasuryCap` to the creator of the `Coin`.
transfer::public_transfer(cm_treasury_cap, ctx.sender());
Expand Down

0 comments on commit cc19022

Please sign in to comment.