Skip to content

Ica client update evm note to 0.4.0 #566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
841 changes: 756 additions & 85 deletions framework/Cargo.lock

Large diffs are not rendered by default.

Binary file modified framework/artifacts/abstract_ica_client.wasm
Binary file not shown.
4 changes: 2 additions & 2 deletions framework/contracts/native/ica-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ cw2 = { workspace = true }
semver = { workspace = true }
thiserror = { workspace = true }

evm-note = { version = "0.1.0", features = ["library"] }
polytone-evm = "0.1.0"
evm-note = { version = "0.4.0", git = "ssh://[email protected]/AbstractSDK/evm-ibc.git", features = ["library"] }
polytone-evm = { version = "0.4.0", git = "ssh://[email protected]/AbstractSDK/evm-ibc.git" }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
workspace-hack = { version = "0.1", path = "../../../workspace-hack" }
Expand Down
12 changes: 6 additions & 6 deletions framework/contracts/native/ica-client/src/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ mod tests {
chain: chain_name,
actions: vec![IcaAction::Execute(abstract_ica::IcaExecute::Evm {
msgs: vec![EvmMsg::Call {
to: "to".to_string(),
data: vec![0x01].into(),
target: "to".to_string(),
call_data: vec![0x01].into(),
value: None,
allow_failure: None,
}],
Expand All @@ -254,8 +254,8 @@ mod tests {
&evm_note::msg::ExecuteMsg::Execute {
callback: None,
msgs: vec![EvmMsg::Call {
to: "to".to_string(),
data: vec![0x01].into(),
target: "to".to_string(),
call_data: vec![0x01].into(),
value: None,
allow_failure: None,
}],
Expand Down Expand Up @@ -375,8 +375,8 @@ mod tests {
chain: chain_name.clone(),
actions: vec![IcaAction::Execute(abstract_ica::IcaExecute::Evm {
msgs: vec![EvmMsg::Call {
to: "to".to_string(),
data: vec![0x01].into(),
target: "to".to_string(),
call_data: vec![0x01].into(),
value: None,
allow_failure: None,
}],
Expand Down
2 changes: 1 addition & 1 deletion framework/packages/abstract-ica/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ abstract-sdk = { workspace = true }
cw-orch = { workspace = true }

# EVM
polytone-evm = { version = "0.1.0" }
polytone-evm = { version = "0.4.0", git = "ssh://[email protected]/AbstractSDK/evm-ibc.git" }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
workspace-hack = { version = "0.1", path = "../../workspace-hack" }
Expand Down
1 change: 1 addition & 0 deletions framework/packages/abstract-ica/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ pub mod msg;
pub use action::{IcaAction, IcaActionResponse, IcaExecute};
pub use chain_type::{CastChainType, ChainType};

pub use polytone_evm;
pub use polytone_evm::EVM_NOTE_ID;
pub use polytone_evm::POLYTONE_EVM_VERSION;
1 change: 1 addition & 0 deletions framework/packages/abstract-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ account = { version = "0.26.1", package = "abstract-account", path = "../
ans-host = { version = "0.26.0", package = "abstract-ans-host", path = "../../contracts/native/ans-host", default-features = false }
ibc-client = { version = "0.26.0", package = "abstract-ibc-client", path = "../../contracts/native/ibc-client", default-features = false }
ibc-host = { version = "0.26.0", package = "abstract-ibc-host", path = "../../contracts/native/ibc-host", default-features = false }
ica-client = { version = "0.26.0", package = "abstract-ica-client", path = "../../contracts/native/ica-client", default-features = false }
module-factory = { version = "0.26.0", package = "abstract-module-factory", path = "../../contracts/native/module-factory", default-features = false }
registry = { version = "0.26.0", package = "abstract-registry", path = "../../contracts/native/registry", default-features = false }
workspace-hack = { version = "0.1", path = "../../workspace-hack" }
Expand Down
50 changes: 50 additions & 0 deletions framework/packages/abstract-interface/src/native/ica_client.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
use ::ica_client::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};
use abstract_std::ICA_CLIENT;

use cw_orch::{contract::Contract, interface, prelude::*};

use crate::RegisteredModule;

#[interface(InstantiateMsg, ExecuteMsg, QueryMsg, MigrateMsg, id = ICA_CLIENT)]
pub struct IcaClient<Chain>;

impl<Chain: CwEnv> cw_blob::interface::DeterministicInstantiation<Chain> for IcaClient<Chain> {}

impl<Chain: CwEnv> Uploadable for IcaClient<Chain> {
fn wrapper() -> <Mock as TxHandler>::ContractSource {
Box::new(
ContractWrapper::new_with_empty(
::ica_client::contract::execute,
::ica_client::contract::instantiate,
::ica_client::contract::query,
)
.with_migrate(::ica_client::contract::migrate),
)
}
fn wasm(_chain: &ChainInfoOwned) -> WasmPath {
artifacts_dir_from_workspace!()
.find_wasm_path("ica_client")
.unwrap()
}
}

impl<Chain: CwEnv> RegisteredModule for IcaClient<Chain> {
type InitMsg = cosmwasm_std::Empty;

fn module_id<'a>() -> &'a str {
ICA_CLIENT
}
fn module_version<'a>() -> &'a str {
::ica_client::contract::CONTRACT_VERSION
}

fn dependencies<'a>() -> &'a [abstract_std::objects::dependency::StaticDependency] {
&[]
}
}

impl<Chain: CwEnv> From<Contract<Chain>> for IcaClient<Chain> {
fn from(value: Contract<Chain>) -> Self {
IcaClient(value)
}
}
1 change: 1 addition & 0 deletions framework/packages/abstract-interface/src/native/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ mod ibc_client;
mod ibc_host;
mod module_factory;
mod registry;
pub mod ica_client;

pub use self::{ans_host::*, ibc_client::*, ibc_host::*, module_factory::*, registry::*};
2 changes: 2 additions & 0 deletions framework/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "nightly"
Loading
Loading