Skip to content

Commit 77f616a

Browse files
committed
Add cosmwasm_2_2 feature
1 parent fb0ad94 commit 77f616a

File tree

5 files changed

+25
-13
lines changed

5 files changed

+25
-13
lines changed

contracts/ibc-reflect/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ cranelift = ["cosmwasm-vm/cranelift"]
3030

3131
[dependencies]
3232
cosmwasm-schema = { path = "../../packages/schema" }
33-
cosmwasm-std = { path = "../../packages/std", features = ["iterator", "stargate", "cosmwasm_2_1"] }
33+
cosmwasm-std = { path = "../../packages/std", features = ["iterator", "stargate", "cosmwasm_2_2"] }
3434
schemars = "0.8.12"
3535
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3636

3737
[dev-dependencies]
38-
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator", "stargate"] }
38+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
39+
"iterator",
40+
"stargate",
41+
] }

packages/go-gen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ release = false
1010

1111
[dependencies]
1212
cosmwasm-std = { version = "2.1.1", path = "../std", features = [
13-
"cosmwasm_2_1",
13+
"cosmwasm_2_2",
1414
"staking",
1515
"stargate",
1616
] }

packages/std/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ cosmwasm_2_0 = ["cosmwasm_1_4"]
4848
# This enables functionality that is only available on 2.1 chains.
4949
# It adds verification and key recovery for the secp256r1 elliptic curve.
5050
cosmwasm_2_1 = ["cosmwasm_2_0"]
51+
# This enables functionality that is only available on 2.2 chains.
52+
# It adds `IbcMsg::PayPacketFee` and `IbcMsg::PayPacketFeeAsync`.
53+
cosmwasm_2_2 = ["cosmwasm_2_1"]
5154

5255
[dependencies]
5356
base64 = "0.22.0"

packages/std/src/exports.rs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,45 +35,49 @@ use crate::{CustomMsg, Deps, DepsMut, MessageInfo};
3535
// See `docs/CAPABILITIES.md` for more details.
3636
#[cfg(feature = "iterator")]
3737
#[no_mangle]
38-
extern "C" fn requires_iterator() -> () {}
38+
extern "C" fn requires_iterator() {}
3939

4040
#[cfg(feature = "staking")]
4141
#[no_mangle]
42-
extern "C" fn requires_staking() -> () {}
42+
extern "C" fn requires_staking() {}
4343

4444
#[cfg(feature = "stargate")]
4545
#[no_mangle]
46-
extern "C" fn requires_stargate() -> () {}
46+
extern "C" fn requires_stargate() {}
4747

4848
#[cfg(feature = "cosmwasm_1_1")]
4949
#[no_mangle]
50-
extern "C" fn requires_cosmwasm_1_1() -> () {}
50+
extern "C" fn requires_cosmwasm_1_1() {}
5151

5252
#[cfg(feature = "cosmwasm_1_2")]
5353
#[no_mangle]
54-
extern "C" fn requires_cosmwasm_1_2() -> () {}
54+
extern "C" fn requires_cosmwasm_1_2() {}
5555

5656
#[cfg(feature = "cosmwasm_1_3")]
5757
#[no_mangle]
58-
extern "C" fn requires_cosmwasm_1_3() -> () {}
58+
extern "C" fn requires_cosmwasm_1_3() {}
5959

6060
#[cfg(feature = "cosmwasm_1_4")]
6161
#[no_mangle]
62-
extern "C" fn requires_cosmwasm_1_4() -> () {}
62+
extern "C" fn requires_cosmwasm_1_4() {}
6363

6464
#[cfg(feature = "cosmwasm_2_0")]
6565
#[no_mangle]
66-
extern "C" fn requires_cosmwasm_2_0() -> () {}
66+
extern "C" fn requires_cosmwasm_2_0() {}
6767

6868
#[cfg(feature = "cosmwasm_2_1")]
6969
#[no_mangle]
70-
extern "C" fn requires_cosmwasm_2_1() -> () {}
70+
extern "C" fn requires_cosmwasm_2_1() {}
71+
72+
#[cfg(feature = "cosmwasm_2_2")]
73+
#[no_mangle]
74+
extern "C" fn requires_cosmwasm_2_2() {}
7175

7276
/// interface_version_* exports mark which Wasm VM interface level this contract is compiled for.
7377
/// They can be checked by cosmwasm_vm.
7478
/// Update this whenever the Wasm VM interface breaks.
7579
#[no_mangle]
76-
extern "C" fn interface_version_8() -> () {}
80+
extern "C" fn interface_version_8() {}
7781

7882
/// allocate reserves the given number of bytes in wasm memory and returns a pointer
7983
/// to a Region defining this data. This space is managed by the calling process

packages/std/src/ibc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ pub enum IbcMsg {
111111
/// .add_message(CosmosMsg::Ibc(incentivize))
112112
/// .add_message(CosmosMsg::Ibc(transfer));
113113
/// ```
114+
#[cfg(feature = "cosmwasm_2_2")]
114115
PayPacketFee {
115116
src: IbcEndpoint,
116117
fee: IbcFee,
@@ -121,6 +122,7 @@ pub enum IbcMsg {
121122
/// Incentivizes the existing IBC packet with the given port, channel and sequence with a fee.
122123
/// Note that this does not necessarily have to be a packet sent by this contract.
123124
/// The fees are taken from the contract's balance immediately and locked until the packet is handled.
125+
#[cfg(feature = "cosmwasm_2_2")]
124126
PayPacketFeeAsync {
125127
src: IbcEndpoint,
126128
sequence: u64,

0 commit comments

Comments
 (0)