Skip to content

Commit

Permalink
hoho
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Nov 27, 2023
1 parent e9efc7e commit 34242fe
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 97 deletions.
90 changes: 28 additions & 62 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ num-integer = { version = "^0.1.45", default-features = false }

ibc-proto = { version = "^0.39.1", default-features = false }
serde-json-wasm = { version = "^1.0.0", default-features = false }
serde_json = { version = "^1.0.0", default-features = false, package = "serde-json-wasm" }

clap = { version = "^4.4.8", features = ["derive"] }
cosmrs = { version = "^0.15.0", features = ["cosmwasm", "rpc", "grpc", "bip32", "dev"] }
Expand All @@ -90,4 +89,5 @@ num-traits = { version = "^0.2.17", default-features = false }
thiserror = { version = "^1.0.50", default-features = false, package = "thiserror-core" }
xcm = { version = "^5.0.0", default-features = false, package = "staging-xcm" }
cw-utils = { version = "^1.0.3", default-features = false }
cw2 = { version = "^1.1.2", default-features = false }
cw2 = { version = "^1.1.2", default-features = false }
ibc-apps = { git = "https://github.com/ComposableFi/ibc-rs-apps.git", branch = "main", default-features = false }
3 changes: 1 addition & 2 deletions contracts/cosmwasm/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ crate-type = ["cdylib", "rlib"]

[features]
library = []
std = ["cvm-runtime/std", "dep:cosmwasm-schema", "dep:serde_json"]
std = ["cvm-runtime/std", "dep:cosmwasm-schema"]
default = ["std"]

[dependencies]
serde_json = { workspace = true, optional = true }
cosmwasm-std = { workspace = true }
cw-storage-plus = { workspace = true }
cosmwasm-schema = { workspace = true, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion contracts/cosmwasm/gateway/src/contract/ibc/ics27.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use cosmwasm_std::{
IbcChannelOpenResponse, IbcMsg, IbcOrder, IbcPacketAckMsg, IbcPacketReceiveMsg,
IbcPacketTimeoutMsg, IbcReceiveResponse, MessageInfo, Response, SubMsg,
};
use ibc_rs_scale::core::ics24_host::identifier::{ChannelId, ConnectionId};
use ibc::core::ics24_host::identifier::{ChannelId, ConnectionId};
use xc_core::{
proto::Isomorphism, shared::XcPacket, transport::ibc::ChannelInfo, CallOrigin, XCVMAck,
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/cosmwasm/gateway/src/contract/sudo.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{error::ContractError, state};
use cosmwasm_std::{entry_point, wasm_execute, Coin, DepsMut, Env, Event, Response};
use ibc_rs_scale::core::ics24_host::identifier::ChannelId;
use ibc::core::ics24_host::identifier::ChannelId;
use xc_core::transport::ibc::{ics20::hook::IBCLifecycleComplete, SudoMsg};

#[cfg_attr(not(feature = "library"), entry_point)]
Expand Down
2 changes: 1 addition & 1 deletion contracts/cosmwasm/gateway/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cosmwasm_std::{IbcOrder, Response, StdError};
use ibc_rs_scale::core::ics24_host::identifier::IdentifierError;
use ibc::core::ics24_host::identifier::IdentifierError;
use thiserror::Error;
use xc_core::{AssetId, NetworkId};

Expand Down
2 changes: 1 addition & 1 deletion contracts/cosmwasm/gateway/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
pub use alloc::format;
pub use cosmwasm_std::{to_binary, Addr};
pub use cw_storage_plus::Map;
pub use ibc_rs_scale::core::ics24_host::identifier::{ChannelId, ConnectionId};
pub use ibc::core::ics24_host::identifier::{ChannelId, ConnectionId};
pub use serde::{Deserialize, Serialize};
pub use xc_core::{gateway::config::*, shared::Displayed};
18 changes: 10 additions & 8 deletions crates/cvm-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ ibc-proto = { workspace = true, default-features = false, features = [
] }
serde-cw-value = { workspace = true, default-features = false }
xcm = { workspace = true, default-features = false, optional = true }
# forked for schema support, pr sent
eth-primitive-types = { package = "primitive-types", git = "https://github.com/dzmitry-lahoda-forks/parity-common", features = [
primitive-types = { version = "^0.12.2", features = [
"serde_no_std",
], default-features = false, rev = "db97e88283f15c11a848448440705c65dd2a56ec" }
], default-features = false }

ibc-apps = { workspace = true, default-features = false }

[build-dependencies]
prost-build = { workspace = true }
Expand All @@ -44,12 +45,13 @@ default = ["std"]
xcm = ["dep:xcm"]
cosmwasm = ["cw-storage-plus", "cw20"]
substrate = ["xcm"]
json-schema = [ "serde-cw-value/schema",

"dep:cosmwasm-schema",
json-schema = [
"serde-cw-value/schema",
"ibc-apps/json-schema",
"dep:cosmwasm-schema",
"dep:schemars",
"ibc/schema",
"eth-primitive-types/json-schema",
"primitive-types/json-schema",
"serde-cw-value/schema",
]

Expand All @@ -59,5 +61,5 @@ std = [
"serde-cw-value/std",
"serde-json-wasm/std",
"num/std",
"eth-primitive-types/std",
"primitive-types/std",
]
9 changes: 0 additions & 9 deletions crates/cvm-runtime/clippy.toml

This file was deleted.

4 changes: 2 additions & 2 deletions crates/cvm-runtime/src/gateway/config.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cosmwasm_std::{BlockInfo, IbcTimeout};
use ibc_rs_scale::core::ics24_host::identifier::ChannelId;
use ibc::core::ics24_host::identifier::ChannelId;

use crate::{
prelude::*,
Expand All @@ -8,7 +8,7 @@ use crate::{
AssetId, NetworkId,
};

type EthAddress = eth_primitive_types::H160;
type EthAddress = primitive_types::H160;

/// Version of IBC channels used by the gateway.
pub const IBC_VERSION: &str = "xcvm-v0";
Expand Down
6 changes: 3 additions & 3 deletions crates/cvm-runtime/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ pub use serde::{Deserialize, Serialize};

pub use parity_scale_codec::{Decode, Encode};

#[cfg(feature = "std")]
#[cfg(feature = "json-schema")]
pub use cosmwasm_schema::{cw_serde, QueryResponses};

#[cfg(feature = "std")]
#[cfg(feature = "json-schema")]
pub use schemars::JsonSchema;

pub use ibc_rs_scale::applications::transfer::PrefixedDenom;
pub use ibc::apps::transfer::types::PrefixedDenom;
7 changes: 2 additions & 5 deletions crates/cvm-runtime/src/transport/ibc/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
pub mod ics20;
pub mod picasso;

use crate::{
gateway::{self, GatewayId, RelativeTimeout},
prelude::*,
Expand All @@ -9,9 +6,9 @@ use crate::{
};
use cosmwasm_std::{to_binary, Api, BlockInfo, CosmosMsg, Deps, IbcEndpoint, StdResult, WasmMsg};

use ibc_rs_scale::core::ics24_host::identifier::{ChannelId, ConnectionId, PortId};
use ibc::core::ics24_host::identifier::{ChannelId, ConnectionId, PortId};

use self::ics20::{
use ibc_apps::{
hook::{Callback, IBCLifecycleComplete},
Memo, SendMemo,
};
Expand Down

0 comments on commit 34242fe

Please sign in to comment.