Skip to content

Commit 3087ee2

Browse files
Merge branch 'main' into farhad/interchain-accounts
2 parents 16aef3a + 9cba2fc commit 3087ee2

33 files changed

+764
-580
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Organize acknowledgement types under the `ics04_channel` module to get
2+
accessible by any applications.
3+
([#717](https://github.com/cosmos/ibc-rs/issues/717))
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Sync field and method namings of ics04 events with the convention
2+
([#750](https://github.com/cosmos/ibc-rs/issues/750))
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- use ibc_proto::protobuf::Protobuf to replace tendermint_proto::Protobuf
2+
([#754](https://github.com/cosmos/ibc-rs/pull/754))
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Tendermint ConsensusState -> Any can crash if out of memory
2+
([#747](https://github.com/cosmos/ibc-rs/issues/747))
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Height::from_str accepts invalid heights
2+
([#752](https://github.com/cosmos/ibc-rs/issues/752))
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Scale encoding for ICS-20 transfer message
2+
([#745](https://github.com/cosmos/ibc-rs/issues/745))

ci/no-std-check/Cargo.lock

Lines changed: 65 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ibc-derive/src/consensus_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn consensus_state_derive_impl(ast: DeriveInput) -> TokenStream {
3535
}
3636
}
3737

38-
fn encode_vec(&self) -> core::result::Result<Vec<u8>, tendermint_proto::Error> {
38+
fn encode_vec(&self) -> Vec<u8> {
3939
match self {
4040
#(#encode_vec_impl),*
4141
}

crates/ibc/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ interchain-accounts = []
5353
ibc-proto = { version = "0.32.0", default-features = false }
5454
cosmrs = "0.14.0"
5555
ics23 = { version = "0.10.1", default-features = false, features = ["host-functions"] }
56-
time = { version = ">=0.3.0, <0.3.23", default-features = false }
56+
time = { version = ">=0.3.0, <0.3.24", default-features = false }
5757
serde_derive = { version = "1.0.104", default-features = false, optional = true }
5858
serde = { version = "1.0", default-features = false, optional = true }
5959
serde_json = { version = "1", default-features = false, optional = true }
@@ -98,7 +98,7 @@ default-features = false
9898

9999
[dev-dependencies]
100100
env_logger = "0.10.0"
101-
rstest = "0.16.0"
101+
rstest = "0.18.1"
102102
tracing-subscriber = { version = "0.3.14", features = ["fmt", "env-filter", "json"]}
103103
test-log = { version = "0.2.10", features = ["trace"] }
104104
tendermint-rpc = { version = "0.32", features = ["http-client", "websocket-client"] }

crates/ibc/src/applications/transfer/amount.rs

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Contains the `Amount` type, which represents amounts of tokens transferred.
22
3-
use core::str::FromStr;
3+
use core::{ops::Deref, str::FromStr};
44
use derive_more::{Display, From, Into};
55

66
use super::error::TokenTransferError;
@@ -11,6 +11,28 @@ use primitive_types::U256;
1111
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Display, From, Into)]
1212
pub struct Amount(U256);
1313

14+
#[cfg(feature = "parity-scale-codec")]
15+
impl parity_scale_codec::WrapperTypeDecode for Amount {
16+
type Wrapped = [u64; 4];
17+
}
18+
19+
#[cfg(feature = "parity-scale-codec")]
20+
impl parity_scale_codec::WrapperTypeEncode for Amount {}
21+
22+
impl Deref for Amount {
23+
type Target = [u64; 4];
24+
25+
fn deref(&self) -> &Self::Target {
26+
&self.0 .0
27+
}
28+
}
29+
30+
impl From<[u64; 4]> for Amount {
31+
fn from(value: [u64; 4]) -> Self {
32+
Self(U256(value))
33+
}
34+
}
35+
1436
impl Amount {
1537
pub fn checked_add(self, rhs: Self) -> Option<Self> {
1638
self.0.checked_add(rhs.0).map(Self)

0 commit comments

Comments
 (0)