Skip to content

Commit

Permalink
Merge pull request #860 from CosmWasm/bank-burn-msg
Browse files Browse the repository at this point in the history
Bank burn msg
  • Loading branch information
mergify[bot] authored Apr 8, 2021
2 parents 345fada + 3f11ee3 commit 8536381
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 0 deletions.
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

0 comments on commit 8536381

Please sign in to comment.