Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3f0b433
Add changelog entry
chipshort Mar 5, 2025
2fa28a3
feat(query): Introduce non-breaking changes to handle nullable data s…
BigtoC Mar 14, 2025
dbc3283
chore(fmt): Code formatting
BigtoC Mar 14, 2025
7d2fd91
doc(comment): Add code comments
BigtoC Mar 15, 2025
bb6693b
chore(crate): Fix struct imports
BigtoC Mar 15, 2025
093e594
chore: Deprecate IBC fees
Mar 19, 2025
7963497
Add `#[allow(deprecated)]` over reexport
aumetra Mar 20, 2025
f616ad2
Allow usage of deprecated APIs in IBC module
aumetra Mar 20, 2025
01837e0
chore: Fix 'since' argument
Mar 20, 2025
4681714
chore: Update CHANGELOG
Mar 20, 2025
14f8097
[autofix.ci] apply automated fixes
autofix-ci[bot] Mar 20, 2025
10242fd
Merge pull request #2431 from CosmWasm/tkulik/chore/deprecate_ibc_fees
aumetra Mar 20, 2025
d6cb88c
Rollback changes
BigtoC Mar 28, 2025
eccbf55
refactor(metadata): Add deserializer for denom_units and aliases to h…
BigtoC Mar 28, 2025
a9b5b16
feat(metadata): Add test
BigtoC Mar 28, 2025
0d8b5eb
chore(fmt): Fix code format
BigtoC Mar 28, 2025
caf66b5
chore(Cargo): Downgrade Cargo.lock version from 4 to 3
BigtoC Mar 28, 2025
17a7a3b
Rollback cyberpunk test related codes
BigtoC Mar 29, 2025
275ea84
feat(metadata): add unit and integration tests for DenomMetadata hand…
BigtoC Mar 29, 2025
20450e6
Delete redundant test
BigtoC Apr 7, 2025
832eec5
Delete redundant test
BigtoC Apr 7, 2025
6213901
Delete redundant test
BigtoC Apr 7, 2025
2d77b1d
Delete redundant test
BigtoC Apr 7, 2025
c190704
fix(metadata): update test comments to reflect error handling for mis…
BigtoC Apr 7, 2025
a8b3400
Merge remote-tracking branch 'origin/feature/nullable-denom-metadata'…
BigtoC Apr 7, 2025
ad6c72f
chore(test): Move all unit tests to test module
BigtoC Apr 8, 2025
0ed6e01
Add changelog entry
chipshort Apr 9, 2025
a17d3b9
Merge pull request #2417 from BigtoC/feature/nullable-denom-metadata
chipshort Apr 9, 2025
09d9d14
chore: Deprecate `FeeEnabledChannel` and `FeeEnabledChannelResponse` …
kulikthebird May 15, 2025
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
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ and this project adheres to

## [Unreleased]

## Fixed

- cosmwasm-std: Fix deserialization of `DenomMetadata`. ([#2417])
- cosmwasm-std: Deprecate `PayPacketFee`, `PayPacketFeeAsync`, `IbcFee`. IBC
fees have been removed from ibc-go in version 10. The mentioned struct and
enum fields are deprecated and will be removed in cosmwasm `3.0` ([#2431])
- cosmwasm-std: Deprecate `FeeEnabledChannel` and `FeeEnabledChannelResponse`
([#2481])

[#2417]: https://github.com/CosmWasm/cosmwasm/pull/2417
[#2431]: https://github.com/CosmWasm/cosmwasm/pull/2431
[#2481]: https://github.com/CosmWasm/cosmwasm/pull/2481

## [2.2.2] - 2025-03-05

### Changed
Expand All @@ -17,6 +30,10 @@ and this project adheres to

[#2384]: https://github.com/CosmWasm/cosmwasm/pull/2384

## Fixed

- cosmwasm-vm: Fix CWA-2025-003.

## [2.2.1] - 2025-02-04

## Added
Expand Down
3 changes: 3 additions & 0 deletions contracts/ibc-reflect/schema/ibc/packet_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@
"additionalProperties": false
},
"IbcFee": {
"deprecated": true,
"type": "object",
"required": [
"ack_fee",
Expand Down Expand Up @@ -598,6 +599,7 @@
},
{
"description": "Incentivizes the next IBC packet sent after this message with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled.\n\n# Example\n\nMost commonly, you will attach this message to a response right before sending a packet using [`IbcMsg::SendPacket`] or [`IbcMsg::Transfer`].\n\n```rust # use cosmwasm_std::{IbcMsg, IbcEndpoint, IbcFee, IbcTimeout, Coin, coins, CosmosMsg, Response, Timestamp};\n\nlet incentivize = IbcMsg::PayPacketFee { port_id: \"transfer\".to_string(), channel_id: \"source-channel\".to_string(), fee: IbcFee { receive_fee: coins(100, \"token\"), ack_fee: coins(201, \"token\"), timeout_fee: coins(200, \"token\"), }, relayers: vec![], }; let transfer = IbcMsg::Transfer { channel_id: \"source-channel\".to_string(), to_address: \"receiver\".to_string(), amount: Coin::new(100u32, \"token\"), timeout: IbcTimeout::with_timestamp(Timestamp::from_nanos(0)), memo: None, };\n\n# #[cfg(feature = \"stargate\")] let _: Response = Response::new() .add_message(CosmosMsg::Ibc(incentivize)) .add_message(CosmosMsg::Ibc(transfer)); ```",
"deprecated": true,
"type": "object",
"required": [
"pay_packet_fee"
Expand Down Expand Up @@ -638,6 +640,7 @@
},
{
"description": "Incentivizes the existing IBC packet with the given port, channel and sequence with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled. They are added to the existing fees on the packet.",
"deprecated": true,
"type": "object",
"required": [
"pay_packet_fee_async"
Expand Down
3 changes: 3 additions & 0 deletions contracts/reflect/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@
"additionalProperties": false
},
"IbcFee": {
"deprecated": true,
"type": "object",
"required": [
"ack_fee",
Expand Down Expand Up @@ -671,6 +672,7 @@
},
{
"description": "Incentivizes the next IBC packet sent after this message with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled.\n\n# Example\n\nMost commonly, you will attach this message to a response right before sending a packet using [`IbcMsg::SendPacket`] or [`IbcMsg::Transfer`].\n\n```rust # use cosmwasm_std::{IbcMsg, IbcEndpoint, IbcFee, IbcTimeout, Coin, coins, CosmosMsg, Response, Timestamp};\n\nlet incentivize = IbcMsg::PayPacketFee { port_id: \"transfer\".to_string(), channel_id: \"source-channel\".to_string(), fee: IbcFee { receive_fee: coins(100, \"token\"), ack_fee: coins(201, \"token\"), timeout_fee: coins(200, \"token\"), }, relayers: vec![], }; let transfer = IbcMsg::Transfer { channel_id: \"source-channel\".to_string(), to_address: \"receiver\".to_string(), amount: Coin::new(100u32, \"token\"), timeout: IbcTimeout::with_timestamp(Timestamp::from_nanos(0)), memo: None, };\n\n# #[cfg(feature = \"stargate\")] let _: Response = Response::new() .add_message(CosmosMsg::Ibc(incentivize)) .add_message(CosmosMsg::Ibc(transfer)); ```",
"deprecated": true,
"type": "object",
"required": [
"pay_packet_fee"
Expand Down Expand Up @@ -711,6 +713,7 @@
},
{
"description": "Incentivizes the existing IBC packet with the given port, channel and sequence with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled. They are added to the existing fees on the packet.",
"deprecated": true,
"type": "object",
"required": [
"pay_packet_fee_async"
Expand Down
1 change: 1 addition & 0 deletions contracts/reflect/schema/raw/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@
},
{
"description": "Queries whether the given channel supports IBC fees. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `FeeEnabledChannelResponse`.",
"deprecated": true,
"type": "object",
"required": [
"fee_enabled_channel"
Expand Down
4 changes: 4 additions & 0 deletions contracts/reflect/schema/reflect.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"additionalProperties": false
},
"IbcFee": {
"deprecated": true,
"type": "object",
"required": [
"ack_fee",
Expand Down Expand Up @@ -681,6 +682,7 @@
},
{
"description": "Incentivizes the next IBC packet sent after this message with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled.\n\n# Example\n\nMost commonly, you will attach this message to a response right before sending a packet using [`IbcMsg::SendPacket`] or [`IbcMsg::Transfer`].\n\n```rust # use cosmwasm_std::{IbcMsg, IbcEndpoint, IbcFee, IbcTimeout, Coin, coins, CosmosMsg, Response, Timestamp};\n\nlet incentivize = IbcMsg::PayPacketFee { port_id: \"transfer\".to_string(), channel_id: \"source-channel\".to_string(), fee: IbcFee { receive_fee: coins(100, \"token\"), ack_fee: coins(201, \"token\"), timeout_fee: coins(200, \"token\"), }, relayers: vec![], }; let transfer = IbcMsg::Transfer { channel_id: \"source-channel\".to_string(), to_address: \"receiver\".to_string(), amount: Coin::new(100u32, \"token\"), timeout: IbcTimeout::with_timestamp(Timestamp::from_nanos(0)), memo: None, };\n\n# #[cfg(feature = \"stargate\")] let _: Response = Response::new() .add_message(CosmosMsg::Ibc(incentivize)) .add_message(CosmosMsg::Ibc(transfer)); ```",
"deprecated": true,
"type": "object",
"required": [
"pay_packet_fee"
Expand Down Expand Up @@ -721,6 +723,7 @@
},
{
"description": "Incentivizes the existing IBC packet with the given port, channel and sequence with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled. They are added to the existing fees on the packet.",
"deprecated": true,
"type": "object",
"required": [
"pay_packet_fee_async"
Expand Down Expand Up @@ -1687,6 +1690,7 @@
},
{
"description": "Queries whether the given channel supports IBC fees. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `FeeEnabledChannelResponse`.",
"deprecated": true,
"type": "object",
"required": [
"fee_enabled_channel"
Expand Down
14 changes: 14 additions & 0 deletions packages/std/src/ibc.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)]

// The CosmosMsg variants are defined in results/cosmos_msg.rs
// The rest of the IBC related functionality is defined here

Expand Down Expand Up @@ -111,6 +113,10 @@ pub enum IbcMsg {
/// .add_message(CosmosMsg::Ibc(transfer));
/// ```
#[cfg(feature = "cosmwasm_2_2")]
#[deprecated(
since = "2.2.3",
note = "IBC fees have been removed from ibc-go `v10`, which is used in wasmd `v0.55.0`."
)]
PayPacketFee {
/// The port id on the chain where the packet is sent from (this chain).
port_id: String,
Expand All @@ -128,6 +134,10 @@ pub enum IbcMsg {
/// The fees are taken from the contract's balance immediately and locked until the packet is handled.
/// They are added to the existing fees on the packet.
#[cfg(feature = "cosmwasm_2_2")]
#[deprecated(
since = "2.2.3",
note = "IBC fees have been removed from ibc-go `v10`, which is used in wasmd `v0.55.0`."
)]
PayPacketFeeAsync {
/// The port id on the chain where the packet is sent from (this chain).
port_id: String,
Expand All @@ -144,6 +154,10 @@ pub enum IbcMsg {
},
}

#[deprecated(
since = "2.2.3",
note = "IBC fees have been removed from ibc-go `v10`, which is used in wasmd `v0.55.0`."
)]
#[derive(Serialize, Deserialize, Default, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct IbcFee {
// the packet receive fee
Expand Down
11 changes: 7 additions & 4 deletions packages/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ pub use crate::errors::{
};
pub use crate::hex_binary::HexBinary;
pub use crate::ibc::IbcChannelOpenResponse;
#[allow(deprecated)]
pub use crate::ibc::IbcFee;
pub use crate::ibc::{
Ibc3ChannelOpenResponse, IbcAckCallbackMsg, IbcAcknowledgement, IbcBasicResponse,
IbcCallbackRequest, IbcChannel, IbcChannelCloseMsg, IbcChannelConnectMsg, IbcChannelOpenMsg,
IbcDestinationCallbackMsg, IbcDstCallback, IbcEndpoint, IbcFee, IbcMsg, IbcOrder, IbcPacket,
IbcDestinationCallbackMsg, IbcDstCallback, IbcEndpoint, IbcMsg, IbcOrder, IbcPacket,
IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse,
IbcSourceCallbackMsg, IbcSrcCallback, IbcTimeout, IbcTimeoutBlock, IbcTimeoutCallbackMsg,
TransferMsgBuilder,
Expand All @@ -86,15 +88,16 @@ pub use crate::metadata::{DenomMetadata, DenomUnit};
pub use crate::msgpack::{from_msgpack, to_msgpack_binary, to_msgpack_vec};
pub use crate::never::Never;
pub use crate::pagination::PageRequest;
#[allow(deprecated)]
pub use crate::query::FeeEnabledChannelResponse;
pub use crate::query::{
AllBalanceResponse, AllDelegationsResponse, AllDenomMetadataResponse, AllValidatorsResponse,
BalanceResponse, BankQuery, BondedDenomResponse, ChannelResponse, CodeInfoResponse,
ContractInfoResponse, CustomQuery, DecCoin, Delegation, DelegationResponse,
DelegationRewardsResponse, DelegationTotalRewardsResponse, DelegatorReward,
DelegatorValidatorsResponse, DelegatorWithdrawAddressResponse, DenomMetadataResponse,
DistributionQuery, FeeEnabledChannelResponse, FullDelegation, GrpcQuery, IbcQuery,
ListChannelsResponse, PortIdResponse, QueryRequest, StakingQuery, SupplyResponse, Validator,
ValidatorResponse, WasmQuery,
DistributionQuery, FullDelegation, GrpcQuery, IbcQuery, ListChannelsResponse, PortIdResponse,
QueryRequest, StakingQuery, SupplyResponse, Validator, ValidatorResponse, WasmQuery,
};
#[cfg(all(feature = "stargate", feature = "cosmwasm_1_2"))]
pub use crate::results::WeightedVoteOption;
Expand Down
Loading