Skip to content

Moved ica-client #482

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

Closed
wants to merge 2 commits into from
Closed
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
4,097 changes: 3,673 additions & 424 deletions framework/Cargo.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions framework/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ ibc-host = { package = "abstract-ibc-host", path = "contracts/native/ibc-host" }
proxy = { package = "abstract-proxy", path = "contracts/account/proxy" }
manager = { package = "abstract-manager", path = "contracts/account/manager" }

abstract-ica = { path = "packages/abstract-ica" }
abstract-sdk = { version = "0.23.0", path = "packages/abstract-sdk" }
abstract-testing = { version = "0.23.0", path = "packages/abstract-testing" }
abstract-std = { version = "0.23.0", path = "packages/abstract-std" }
Expand Down Expand Up @@ -121,4 +120,4 @@ incremental = false
[workspace.metadata.cargo-udeps.ignore]
# ensures CI doens't flag workspace-hack as unused dep
normal = ["workspace-hack"]
development = ["workspace-hack"]
development = ["workspace-hack"]
1 change: 0 additions & 1 deletion framework/contracts/account/proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ semver = { workspace = true }
serde = { workspace = true }
thiserror = { workspace = true }
abstract-macros = { workspace = true }
abstract-ica = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
workspace-hack = { version = "0.1", path = "../../../workspace-hack" }
Expand Down
4 changes: 2 additions & 2 deletions framework/contracts/account/proxy/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub fn ica_action(deps: DepsMut, msg_info: MessageInfo, action_query: Binary) ->
))
})?;

let res: abstract_ica::msg::IcaActionResult = deps.querier.query(
let res: abstract_std::ica_client::IcaActionResult = deps.querier.query(
&WasmQuery::Smart {
contract_addr: ica_client_address.into(),
msg: action_query,
Expand Down Expand Up @@ -521,7 +521,7 @@ mod test {
}

mod ica_action {
use abstract_ica::msg::IcaActionResult;
use abstract_std::ica_client::IcaActionResult;
use abstract_std::{manager, proxy::state::State};

use super::*;
Expand Down
6 changes: 3 additions & 3 deletions framework/contracts/native/ica-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ abstract-std = { workspace = true }
abstract-sdk = { workspace = true }
semver = { workspace = true }
polytone = { workspace = true }
abstract-ica = { workspace = true }
abstract-macros ={ workspace = true }
abstract-macros = { workspace = true }

evm-note = { version = "0.0.2", features = ["library"]}
evm-note = { version = "0.0.2", features = ["library"] }
polytone-evm = "0.0.2"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
Expand All @@ -40,6 +39,7 @@ workspace-hack = { version = "0.1", path = "../../../workspace-hack" }
cosmwasm-schema = { workspace = true }
abstract-testing = { workspace = true }
speculoos = { workspace = true }
union-connector = { git = "https://github.com/abstractsdk/evm-ibc", branch = "development/create-union-bundle" }

[profile.release]
rpath = false
Expand Down
18 changes: 18 additions & 0 deletions framework/contracts/native/ica-client/examples/integration_test.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
fn main() -> anyhow::Result<()> {
// This is an integration test with Abstract And polytone EVM already deployed on Union

// If it's not deployed, we can redeploy it here

let chain = Daemon::builder().chain(UNION_TESTNET_8).build()?;
let abs = Abstract::load_from(chain.clone())?;

// We get the account and install the ICA client app on it

// We start by sending some funds to the interchain account to be able to send it around in the ica action

// We query the ICA client action from the script

// We send the message from the account directly

// We make sure the messages do the right actions with a query on the EVM chain
}
8 changes: 5 additions & 3 deletions framework/contracts/native/ica-client/src/chain_types/evm.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::state::Config;
use abstract_ica::EVM_NOTE_ID;
use abstract_sdk::{feature_objects::VersionControlContract, Resolve};
use abstract_std::ica_client::EVM_NOTE_ID;
use abstract_std::objects::{module::ModuleInfo, ChannelEntry, ContractEntry, TruncatedChainId};
use cosmwasm_std::{
wasm_execute, Addr, Binary, Coin, CosmosMsg, Deps, Env, HexBinary, QuerierWrapper, WasmMsg,
Expand Down Expand Up @@ -91,8 +91,10 @@ pub fn send_funds(
}

fn evm_note_addr(vc: &VersionControlContract, querier: &QuerierWrapper) -> IcaClientResult<Addr> {
let evm_note_entry =
ModuleInfo::from_id(EVM_NOTE_ID, abstract_ica::POLYTONE_EVM_VERSION.parse()?)?;
let evm_note_entry = ModuleInfo::from_id(
EVM_NOTE_ID,
abstract_std::ica_client::POLYTONE_EVM_VERSION.parse()?,
)?;

vc.query_module(evm_note_entry, querier)?
.reference
Expand Down
2 changes: 1 addition & 1 deletion framework/contracts/native/ica-client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub mod contract;
pub mod error;
pub use abstract_ica::msg;
pub use abstract_std::ica_client as msg;
mod chain_types;
mod queries;
pub(crate) mod state;
Expand Down
6 changes: 3 additions & 3 deletions framework/contracts/native/ica-client/src/queries.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::state::{Config, CONFIG};
use abstract_ica::{msg::ConfigResponse, ChainType, IcaAction, IcaActionResponse};
use abstract_std::ica_client::{ChainType, ConfigResponse, IcaAction, IcaActionResponse};
use abstract_std::objects::TruncatedChainId;
use cosmwasm_std::{ensure_eq, CosmosMsg, Deps, Env};

Expand Down Expand Up @@ -27,7 +27,7 @@ pub(crate) fn ica_action(
actions: Vec<IcaAction>,
) -> IcaClientResult<IcaActionResponse> {
// match chain-id with cosmos or EVM
use abstract_ica::CastChainType;
use abstract_std::ica_client::CastChainType;
let chain_type = chain.chain_type().ok_or(IcaClientError::NoChainType {
chain: chain.to_string(),
})?;
Expand All @@ -37,7 +37,7 @@ pub(crate) fn ica_action(
let process_action = |action: IcaAction| -> IcaClientResult<Vec<CosmosMsg>> {
match action {
IcaAction::Execute(ica_exec) => match ica_exec {
abstract_ica::IcaExecute::Evm { msgs, callback } => {
abstract_std::ica_client::IcaExecute::Evm { msgs, callback } => {
ensure_eq!(
chain_type,
ChainType::Evm,
Expand Down
42 changes: 0 additions & 42 deletions framework/packages/abstract-ica/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions framework/packages/abstract-ica/README.md

This file was deleted.

53 changes: 0 additions & 53 deletions framework/packages/abstract-ica/src/action.rs

This file was deleted.

57 changes: 0 additions & 57 deletions framework/packages/abstract-ica/src/chain_type.rs

This file was deleted.

9 changes: 0 additions & 9 deletions framework/packages/abstract-ica/src/lib.rs

This file was deleted.

52 changes: 0 additions & 52 deletions framework/packages/abstract-ica/src/msg.rs

This file was deleted.

Loading
Loading