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

Bank burn msg #860

Merged
merged 5 commits into from
Apr 8, 2021
Merged
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ and this project adheres to
- cosmwasm-std: Replace `HumanAddr` with `String` in `BankQuery`, `StakingQuery`
and `WasmQuery` query requests.
- cosmwasm-vm: Add import `addr_validate` ([#802]).
- cosmwasm-std: Add `BankMsg::Burn` variant when you want the tokens to
disappear ([#860])

[#692]: https://github.com/CosmWasm/cosmwasm/issues/692
[#706]: https://github.com/CosmWasm/cosmwasm/pull/706
Expand All @@ -68,6 +70,7 @@ and this project adheres to
[#793]: https://github.com/CosmWasm/cosmwasm/pull/793
[#796]: https://github.com/CosmWasm/cosmwasm/pull/796
[#802]: https://github.com/CosmWasm/cosmwasm/pull/802
[#860]: https://github.com/CosmWasm/cosmwasm/pull/860

### Changed

Expand Down
24 changes: 24 additions & 0 deletions contracts/ibc-reflect-send/schema/execute_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,30 @@
}
},
"additionalProperties": false
},
{
"description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.",
"type": "object",
"required": [
"burn"
],
"properties": {
"burn": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down
24 changes: 24 additions & 0 deletions contracts/ibc-reflect-send/schema/packet_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,30 @@
}
},
"additionalProperties": false
},
{
"description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.",
"type": "object",
"required": [
"burn"
],
"properties": {
"burn": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down
24 changes: 24 additions & 0 deletions contracts/ibc-reflect/schema/packet_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,30 @@
}
},
"additionalProperties": false
},
{
"description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.",
"type": "object",
"required": [
"burn"
],
"properties": {
"burn": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down
24 changes: 24 additions & 0 deletions contracts/reflect/schema/execute_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,30 @@
}
},
"additionalProperties": false
},
{
"description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.",
"type": "object",
"required": [
"burn"
],
"properties": {
"burn": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down
24 changes: 24 additions & 0 deletions contracts/reflect/schema/response_for__custom_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,30 @@
}
},
"additionalProperties": false
},
{
"description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.",
"type": "object",
"required": [
"burn"
],
"properties": {
"burn": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down
24 changes: 24 additions & 0 deletions packages/std/schema/cosmos_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,30 @@
}
},
"additionalProperties": false
},
{
"description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.",
"type": "object",
"required": [
"burn"
],
"properties": {
"burn": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions packages/std/src/results/cosmos_msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ pub enum BankMsg {
to_address: String,
amount: Vec<Coin>,
},
/// This will burn the given coins from the contract's account.
/// There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper.
/// Important if a contract controls significant token supply that must be retired.
Burn { amount: Vec<Coin> },
}

/// The message types of the staking module.
Expand Down