Skip to content

Commit

Permalink
cosmwasm: add missing feature flags in Cargo.toml files
Browse files Browse the repository at this point in the history
These flags were previously not declared, which is now reported by
clippy.
Also fixed the docstring indentation, which clippy also complains about now.
  • Loading branch information
kcsongor authored and evan-gray committed Jul 25, 2024
1 parent 81d1db5 commit 5995fd6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
5 changes: 4 additions & 1 deletion cosmwasm/contracts/ibc-translator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ crate-type = ["cdylib", "rlib"]
backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all instantiate/execute/query/reply exports
library = []
cosmwasm_1_2 = ["cosmwasm-std/cosmwasm_1_2"]
stargate = ["cosmwasm-std/stargate"]
staking = ["cosmwasm-std/staking"]

[dependencies]
anybuf = "0.1.0"
Expand All @@ -35,4 +38,4 @@ wormhole-sdk = { workspace = true, features = ["schemars"] }
cosmwasm-crypto = { version = "1.2.7" }
hex = "0.4.3"
prost = "0.11.0"
serde = { version = "1.0.103", features = ["derive", "alloc"]}
serde = { version = "1.0.103", features = ["derive", "alloc"]}
3 changes: 2 additions & 1 deletion cosmwasm/contracts/wormchain-ibc-receiver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ crate-type = ["cdylib", "rlib"]

[features]
backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cosmwasm-std = { version = "1.0.0", features = ["ibc3"] }
Expand All @@ -19,4 +20,4 @@ semver = "1.0.16"
thiserror = "1.0.31"
wormhole-bindings = "0.1.0"
wormhole-sdk = { workspace = true, features = ["schemars"] }
serde_wormhole.workspace = true
serde_wormhole.workspace = true
6 changes: 3 additions & 3 deletions cosmwasm/contracts/wormchain-ibc-receiver/src/ibc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::msg::WormholeIbcPacketMsg;
pub const IBC_APP_VERSION: &str = "ibc-wormhole-v1";

/// 1. Opening a channel. Step 1 of handshake. Combines ChanOpenInit and ChanOpenTry from the spec.
/// The only valid action of the contract is to accept the channel or reject it.
/// The only valid action of the contract is to accept the channel or reject it.
#[cfg_attr(not(feature = "library"), entry_point)]
pub fn ibc_channel_open(
_deps: DepsMut,
Expand Down Expand Up @@ -150,7 +150,7 @@ fn encode_ibc_error(msg: impl Into<String>) -> Binary {
}

/// 5. Acknowledging a packet. Called when the other chain successfully receives a packet from us.
/// Never should be called as this contract never sends packets
/// Never should be called as this contract never sends packets
#[cfg_attr(not(feature = "library"), entry_point)]
pub fn ibc_packet_ack(
_deps: DepsMut,
Expand All @@ -163,7 +163,7 @@ pub fn ibc_packet_ack(
}

/// 6. Timing out a packet. Called when the packet was not recieved on the other chain before the timeout.
/// Never should be called as this contract never sends packets
/// Never should be called as this contract never sends packets
#[cfg_attr(not(feature = "library"), entry_point)]
pub fn ibc_packet_timeout(
_deps: DepsMut,
Expand Down
3 changes: 2 additions & 1 deletion cosmwasm/contracts/wormhole-ibc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ crate-type = ["cdylib", "rlib"]

[features]
backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
wormhole-cosmwasm = { version = "0.1.0", default-features = false, features = ["library", "full"] }
Expand All @@ -24,4 +25,4 @@ serde_wormhole.workspace = true
wormhole-sdk = { workspace = true, features = ["schemars"] }

[dev-dependencies]
hex = "0.4.3"
hex = "0.4.3"
4 changes: 2 additions & 2 deletions cosmwasm/contracts/wormhole-ibc/src/ibc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub const IBC_APP_VERSION: &str = "ibc-wormhole-v1";
pub const PACKET_LIFETIME: u64 = 31_536_000;

/// 1. Opening a channel. Step 1 of handshake. Combines ChanOpenInit and ChanOpenTry from the spec.
/// The only valid action of the contract is to accept the channel or reject it.
/// The only valid action of the contract is to accept the channel or reject it.
#[cfg_attr(not(feature = "library"), entry_point)]
pub fn ibc_channel_open(
_deps: DepsMut,
Expand Down Expand Up @@ -71,7 +71,7 @@ pub fn ibc_channel_close(
}

/// 4. Receiving a packet.
/// Never should be called as the other side never sends packets
/// Never should be called as the other side never sends packets
#[cfg_attr(not(feature = "library"), entry_point)]
pub fn ibc_packet_receive(
_deps: DepsMut,
Expand Down

0 comments on commit 5995fd6

Please sign in to comment.