Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions cross-chain/sui/deploy_l2/docs/tbtc.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The contract is initialized with:

## Administrative Methods

### `add_minter`
### `add_minter_with_cap`
**Purpose:** Add a new address with minting permissions

**Parameters:**
Expand All @@ -46,7 +46,7 @@ The contract is initialized with:
**Behavior:**
- Ensures the address is not already a minter
- Adds the address to the minters list
- Creates and transfers a `MinterCap` to the new minter
- Creates and returns a `MinterCap` for the caller to store or pass onward
- Emits a `MinterAdded` event

### `remove_minter`
Expand All @@ -61,6 +61,9 @@ The contract is initialized with:
**Behavior:**
- Verifies the address is currently a minter
- Removes the address from the minters list
- Does not destroy previously issued `MinterCap` objects; live minting also
requires the `TreasuryCap`, and gateway minting can be stopped by pausing the
gateway/token path
- Emits a `MinterRemoved` event

### `add_guardian`
Expand Down Expand Up @@ -195,4 +198,4 @@ Use the contract's methods to add trusted minters, guardians, etc.

## License

This contract is licensed under GPL-3.0-only.
This contract is licensed under GPL-3.0-only.
8 changes: 5 additions & 3 deletions cross-chain/sui/deploy_l2/sources/token/tbtc.move
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ module l2_tbtc::TBTC {

vector::remove(&mut state.minters, index);

// Note: We cannot delete the MinterCap that was previously transferred,
// but it will no longer be valid as we've removed the minter from the state
// Note: This removes the minter from TokenState bookkeeping but does
// not destroy any previously issued MinterCap. Live minting still
// requires the TreasuryCap, and governance can stop gateway minting by
// pausing the gateway/token path.

event::emit(MinterRemoved { minter });
}
Expand Down Expand Up @@ -352,4 +354,4 @@ module l2_tbtc::TBTC {
public fun is_paused(state: &TokenState): bool {
state.paused
}
}
}
Loading