Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify burn behaviour in ZRC2 #197

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Changes from 2 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: 4 additions & 5 deletions zrcs/zrc-2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| ZRC | Title | Status | Type | Author | Created (yyyy-mm-dd) | Updated (yyyy-mm-dd) |
| --- | ---------------------------- | ----------- | -------- | ------------------------------------------------------------------------------------ | -------------------- | -------------------- |
| 2 | Standard for Fungible Tokens | Implemented | Standard | Vaivaswatha Nagaraj <[email protected]> <br> Chua Han Wen <[email protected]> | 2019-11-18 | 2020-11-12 |
| 2 | Standard for Fungible Tokens | Implemented | Standard | Vaivaswatha Nagaraj <[email protected]> <br> Chua Han Wen <[email protected]> | 2019-11-18 | 2024-08-27 |

## I. What are Fungible Tokens?

Expand Down Expand Up @@ -125,24 +125,23 @@ transition Mint(recipient: ByStr20, amount: Uint128)
#### 2. Burn() (Optional)

```ocaml
(* @dev: Burn existing tokens. Only contract_owner can burn. *)
(* @dev: Burn existing tokens. Only the owner of the tokens can burn. *)
(* @param burn_account: Address of the token_owner whose balance is to decrease. *)
(* @param amount: Number of tokens to be burned. *)
transition Burn(burn_account: ByStr20, amount: Uint128)
transition Burn(amount: Uint128)
```

**Arguments:**

| | Name | Type | Description |
| ------ | -------------- | --------- | -------------------------------------------------------- |
| @param | `burn_account` | `ByStr20` | Address of the token_owner whose balance is to decrease. |
| @param | `amount` | `Uint128` | Number of tokens to be burned. |

**Messages sent:**

| | Name | Description | Callback Parameters |
| ------ | --------------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_tag` | `BurnSuccessCallBack` | Provide the sender the status of the burn. | `burner` : `ByStr20`, `burn_account`: `ByStr20`, `amount`: `Uint128`, where `burner` is the address of the burner, `burn_account` is the address whose balance will be decreased, and `amount` is the amount of fungible tokens burned. |
| `_tag` | `BurnSuccessCallBack` | Provide the sender the status of the burn. | `burner` : `ByStr20`, `amount`: `Uint128`, where `burner` is the address of the burner, and `amount` is the amount of fungible tokens burned. |

**Events/Errors:**

Expand Down
Loading