Skip to content

Commit

Permalink
feat: update cosmwasm 1.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrizsabin committed Jul 29, 2024
1 parent d46ff9c commit 2e8e2ce
Show file tree
Hide file tree
Showing 11 changed files with 476 additions and 594 deletions.
1,023 changes: 456 additions & 567 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/icon-project/ibc-integration.git"
version="0.1.1"

[workspace.dependencies]
cosmwasm-std = {version="1.2.2",default-features = false,features = ["iterator", "ibc3","staking"]}
cosmwasm-std = {version="1.5.5",default-features = false,features = ["iterator", "ibc3","staking"]}
cosmwasm-storage = "1.2.2"
cosmwasm-schema = "1.2.2"
schemars = "0.8.12"
Expand Down
2 changes: 1 addition & 1 deletion contracts/cosmwasm-vm/cw-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib", "rlib"]

[dependencies]
cosmwasm-schema = {workspace=true}
cosmwasm-std = {workspace=true, features=["ibc3"]}
cosmwasm-std = {workspace=true}
serde = { workspace=true}
cw-storage-plus = {workspace=true}
serde_json = {workspace=true}
Expand Down
3 changes: 1 addition & 2 deletions contracts/cosmwasm-vm/cw-ibc-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ exclude = [
crate-type = ["cdylib", "rlib"]

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]

# use library feature to disable all instantiate/execute/query exports
library = []

Expand Down
4 changes: 1 addition & 3 deletions contracts/cosmwasm-vm/cw-icon-light-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ crate-type = ["cdylib", "rlib"]

[features]
default = []
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]

# use library feature to disable all instantiate/execute/query exports
library = []
mock=[]
Expand Down Expand Up @@ -51,7 +50,6 @@ debug_print = {workspace=true}


[dev-dependencies]
cosmwasm = "0.7.2"
hex-literal="*"
test-utils={path="../../../libraries/rust/test-utils"}
getrandom = {version = "0.2", default-features = false, features = ["custom"]}
Expand Down
4 changes: 1 addition & 3 deletions contracts/cosmwasm-vm/cw-mock-ibc-connection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ exclude = [
crate-type = ["cdylib", "rlib"]

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]

# use native_ibc feature to enable entry points for ibc
native_ibc = []
library = []
Expand Down Expand Up @@ -48,6 +47,5 @@ cw-xcall = {workspace=true}


[dev-dependencies]
cosmwasm = "0.7.2"
getrandom = {version = "0.2", default-features = false, features = ["custom"]}
hex = "0.4.3"
3 changes: 1 addition & 2 deletions contracts/cosmwasm-vm/cw-mock-ibc-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ incremental = false
overflow-checks = true

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]

# use library feature to disable all instantiate/execute/query exports
library = []

Expand Down
4 changes: 1 addition & 3 deletions contracts/cosmwasm-vm/cw-mock-ibc-dapp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ exclude = [
crate-type = ["cdylib", "rlib"]

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]

# use native_ibc feature to enable entry points for ibc
native_ibc = []
library = []
Expand Down Expand Up @@ -46,6 +45,5 @@ debug_print={workspace=true}


[dev-dependencies]
cosmwasm = "0.7.2"
getrandom = {version = "0.2", default-features = false, features = ["custom"]}
hex = "0.4.3"
3 changes: 0 additions & 3 deletions contracts/cosmwasm-vm/cw-xcall-ibc-connection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ exclude = [
crate-type = ["cdylib", "rlib"]

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
# use native_ibc feature to enable entry points for ibc
native_ibc = []
library = []
Expand Down Expand Up @@ -48,6 +46,5 @@ cw-xcall = {workspace=true}


[dev-dependencies]
cosmwasm = "0.7.2"
getrandom = {version = "0.2", default-features = false, features = ["custom"]}
hex = "0.4.3"
20 changes: 12 additions & 8 deletions libraries/rust/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<'a> PrimaryKey<'a> for &ClientId {
impl KeyDeserialize for &ClientId {
type Output = ClientId;

fn from_vec(value: Vec<u8>) -> StdResult<Self::Output> {
fn from_vec(value: Vec<u8>) -> std::result::Result<ClientId, cosmwasm_std::StdError> {
let result = String::from_utf8(value).unwrap();
let client_id = ClientId::from_str(&result).unwrap();
Ok(client_id)
Expand Down Expand Up @@ -191,13 +191,17 @@ impl<'a> PrimaryKey<'a> for &ChannelId {

impl KeyDeserialize for &ChannelId {
type Output = ChannelId;
fn from_vec(value: Vec<u8>) -> cosmwasm_std::StdResult<Self::Output> {
let result = String::from_utf8(value)
.map_err(StdError::invalid_utf8)
.unwrap();
let chan_id = ChannelId::from_str(&result).unwrap();
Ok(chan_id)
}

fn from_vec(value: Vec<u8>) -> StdResult<Self::Output> {
todo!()
}
// fn from_vec(value: Vec<u8>) -> Result<Self::Output,cosmwasm_std::errors::std_error::StdError> {
// let result = String::from_utf8(value)
// .map_err(StdError::invalid_utf8)
// .unwrap();
// let chan_id = ChannelId::from_str(&result).unwrap();
// Ok(chan_id)
// }
}

impl<'a> Prefixer<'a> for &ChannelId {
Expand Down
2 changes: 1 addition & 1 deletion libraries/rust/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
serde = { workspace=true}
serde_json = "1.0"
cosmwasm-std = {workspace=true, features = ["iterator", "ibc3"]}
cosmwasm-std = {workspace=true, features = ["iterator"]}
prost = { workspace=true}
ibc-proto = { workspace=true}
#ibc = { version = "0.32.0", default-features = false, features = ["parity-scale-codec", "mocks-no-std", "serde", "borsh"]}
Expand Down

0 comments on commit 2e8e2ce

Please sign in to comment.