Skip to content
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 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# We set it for tests
# From https://github.com/CosmosContracts/juno/blob/32568dba828ff7783aea8cb5bb4b8b5832888255/docker/test-user.env#L2
[env]
ABSTRACT_CREATOR = "clip hire initial neck maid actor venue client foam budget lock catalog sweet steak waste crater broccoli pipe steak sister coyote moment obvious choose"
31 changes: 25 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ resolver = "2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace.dependencies]
cw-orch = "0.24.0"
abstract-app = { version = "0.23.0" }
abstract-interface = { version = "0.23.0" }
abstract-dex-adapter = { git = "https://github.com/abstractsdk/abstract.git", tag = "v0.23.0-dex-adapter" }
abstract-client = { version = "0.23.0" }
cw-asset = { version = "3.0" }
cw-orch = "0.26.0"
abstract-app = { version = "0.24.1-beta.2" }
abstract-adapter = { version = "0.24.1-beta.2" }
abstract-interface = { version = "0.24.1-beta.2" }
abstract-dex-adapter = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" }
abstract-osmosis-adapter = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" }
abstract-client = { version = "0.24.1-beta.2" }
cw-asset = { version = "4.0" }
cw-orch-osmosis-test-tube = { version = "0.4.0" }

[profile.release]
rpath = false
Expand All @@ -21,3 +24,19 @@ debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false

[patch.crates-io]
abstract-app = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" }
abstract-adapter = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" }
abstract-interface = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" }
abstract-client = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" }
abstract-dex-standard = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" }
abstract-std = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" }
abstract-sdk = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" }
abstract-adapter-utils = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" }
# abstract-osmosis-adapter = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" }
# abstract-dex-adapter = { git = "https://github.com/abstractsdk/abstract.git", branch = "buckram/update-osmosis-test-with-modified-wasm" } # Replace to tag tag = "v0.23.0-dex-adapter" }

cw-orch-osmosis-test-tube = { git = "https://github.com/AbstractSDK/cw-orchestrator.git", branch = "buckram/revive-osmosis-test-tube" }
cw-orch-core = { git = "https://github.com/AbstractSDK/cw-orchestrator.git", branch = "buckram/revive-osmosis-test-tube" }
cw-orch-traits = { git = "https://github.com/AbstractSDK/cw-orchestrator.git", branch = "buckram/revive-osmosis-test-tube" }
8 changes: 4 additions & 4 deletions bot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ path = "src/bin/local.rs"
cw-orch = { workspace = true, features = ["daemon"] }
abstract-app = { workspace = true }
abstract-client = { workspace = true }
cosmwasm-std = { version = "1.2" }
osmosis-std = { version = "0.21.0" }
cosmos-sdk-proto = { version = "0.20.0" }
cosmwasm-std = { version = "2.0" }
osmosis-std = { version = "0.26.0" }
cosmos-sdk-proto = { version = "0.24.0", features = ["cosmwasm"] }
dotenv = "0.15.0"
env_logger = "0.11.2"
log = "0.4.20"
tonic = "0.10.0"
tonic = "0.12.3"
carrot-app = { path = "../contracts/carrot-app", features = ["interface"] }
clap = { version = "4", features = ["derive"] }
humantime = "2.1.0"
Expand Down
12 changes: 6 additions & 6 deletions bot/src/bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ use std::{
use tonic::transport::Channel;

use abstract_app::{
abstract_interface::VCQueryFns,
abstract_interface::RegistryQueryFns,
objects::module::{ModuleInfo, ModuleStatus},
std::{ans_host, version_control::ModuleFilter},
std::{ans_host, registry::ModuleFilter},
};

const LAST_INCOMPATIBLE_VERSION: &str = "0.3.1";
Expand Down Expand Up @@ -330,7 +330,7 @@ fn autocompound_instance(
}

mod utils {
use abstract_app::std::version_control::ModulesListResponse;
use abstract_app::std::registry::ModulesListResponse;
use cosmos_sdk_proto::{
cosmos::base::query::v1beta1::{PageRequest, PageResponse},
cosmwasm::wasm::v1::QueryContractsByCodeResponse,
Expand Down Expand Up @@ -407,8 +407,8 @@ mod utils {
.block_on(async {
authz_querier
._grants(
granter.to_string(),
authz_grantee.clone(),
&granter,
&Addr::unchecked(authz_grantee),
// Get every authorization
"".to_owned(),
None,
Expand Down Expand Up @@ -496,7 +496,7 @@ mod utils {
});
let mut module_list = ModulesListResponse { modules: vec![] };
loop {
let saving_modules = abstr.version_control().module_list(
let saving_modules = abstr.registry().module_list(
Some(ModuleFilter {
namespace: Some(module_info.namespace.to_string()),
name: Some(module_info.name.clone()),
Expand Down
27 changes: 12 additions & 15 deletions contracts/carrot-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,38 +33,35 @@ interface = ["export", "dep:cw-orch"]
schema = ["abstract-app/schema"]

[dependencies]
cw-utils = { version = "1.0.3" }
cosmwasm-std = { version = "1.2" }
cosmwasm-schema = { version = "1.2" }
cw-controllers = { version = "1.0.1" }
cw-storage-plus = "1.2.0"
cw-utils = { version = "2.0.0" }
cosmwasm-std = { version = "2.0" }
cosmwasm-schema = { version = "2.0" }
cw-controllers = { version = "2.0.0" }
cw-storage-plus = { version = "2.0.0" }
thiserror = { version = "1.0.50" }
schemars = "0.8"
cw-asset = { workspace = true }

abstract-app = { workspace = true }
abstract-app = { workspace = true, features = ["stargate"] }
# Dependencies for interface
abstract-dex-adapter = { workspace = true, features = ["osmosis"] }
cw-orch = { workspace = true, optional = true }

osmosis-std = { version = "0.25.0" }
prost = { version = "0.12.3" }
# TODO: just to enable "stargate" on abstract-app remove, see ABS-480
abstract-sdk = { version = "0.23.0", features = ["stargate"] }
osmosis-std = { version = "0.26.0" }
prost = { version = "0.13.1" }

[dev-dependencies]
abstract-interface = { workspace = true, features = ["daemon"] }
bip32 = "0.5.2"

prost = { version = "0.12.3" }
prost-types = { version = "0.12.3" }
prost-types = { version = "0.13.1" }
log = { version = "0.4.20" }
carrot-app = { path = ".", features = ["interface"] }
abstract-client = { workspace = true }
abstract-app = { workspace = true, features = ["test-utils"] }
speculoos = "0.11.0"
abstract-app = { workspace = true, features = ["test-utils", "stargate"] }
semver = "1.0"
dotenv = "0.15.0"
env_logger = "0.10.0"
cw-orch = { workspace = true }
cw-orch-osmosis-test-tube = "0.3.0"
cw-orch-osmosis-test-tube = { workspace = true }
clap = { version = "4.3.7", features = ["derive"] }
8 changes: 5 additions & 3 deletions contracts/carrot-app/examples/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ fn main() -> anyhow::Result<()> {
let abstr = abstract_client::AbstractClient::new(daemon)?;

let publisher = abstr
.publisher_builder(Namespace::new(ABSTRACT_NAMESPACE)?)
.build()?;
.fetch_or_build_account(Namespace::new(ABSTRACT_NAMESPACE)?, |builder| {
builder.namespace(Namespace::new(ABSTRACT_NAMESPACE).unwrap())
})?
.publisher()?;

publisher.publish_app::<AppInterface<Daemon>>()?;
abstr.version_control().approve_any_abstract_modules()?;
abstr.registry().approve_any_abstract_modules()?;
Ok(())
}
156 changes: 78 additions & 78 deletions contracts/carrot-app/examples/install_savings_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ mod utils {
module::{ModuleInfo, ModuleVersion},
AccountId,
};
use abstract_app::std::{account_factory, manager::ModuleInstallConfig};
use abstract_app::std::account::ModuleInstallConfig;
use abstract_client::*;
use abstract_dex_adapter::DEX_ADAPTER_ID;
use abstract_interface::Abstract;
Expand Down Expand Up @@ -203,7 +203,7 @@ mod utils {
app_data: &CarrotAppInitData,
) -> Result<Vec<Any>, anyhow::Error> {
let dex_fee_account = client.account_from(AccountId::local(0))?;
let dex_fee_addr = dex_fee_account.proxy()?.to_string();
let dex_fee_addr = dex_fee_account.address()?.to_string();
let chain = client.environment().clone();

let authorization_urls = [
Expand Down Expand Up @@ -281,48 +281,48 @@ mod utils {
) -> anyhow::Result<Any> {
let chain = client.environment();
let abstr = Abstract::load_from(chain.clone())?;
let account_factory_addr = abstr.account_factory.addr_str()?;
let random_account_id = client.random_account_id()?;

let msg = Any {
type_url: MsgExecuteContract::TYPE_URL.to_owned(),
value: MsgExecuteContract {
sender: chain.sender_addr().to_string(),
contract: account_factory_addr.to_string(),
msg: to_json_vec(&account_factory::ExecuteMsg::CreateAccount {
governance: GovernanceDetails::Monarchy {
monarch: chain.sender_addr().to_string(),
},
name: "bob".to_owned(),
description: None,
link: None,
base_asset: None,
namespace: None,
install_modules: vec![
ModuleInstallConfig::new(
ModuleInfo::from_id(
DEX_ADAPTER_ID,
ModuleVersion::Version(
abstract_dex_adapter::contract::CONTRACT_VERSION.to_owned(),
),
)?,
None,
),
ModuleInstallConfig::new(
ModuleInfo::from_id(
APP_ID,
ModuleVersion::Version(APP_VERSION.to_owned()),
)?,
Some(to_json_binary(&init_msg)?),
),
],
account_id: Some(AccountId::local(random_account_id)),
})?,
funds: vec![],
}
.to_proto_bytes(),
};
Ok(msg)
todo!();
// let msg = Any {
// type_url: MsgExecuteContract::TYPE_URL.to_owned(),
// value: MsgExecuteContract {
// sender: chain.sender_addr().to_string(),
// contract: account_factory_addr.to_string(),
// msg: to_json_vec(&account_factory::ExecuteMsg::CreateAccount {
// governance: GovernanceDetails::Monarchy {
// monarch: chain.sender_addr().to_string(),
// },
// name: "bob".to_owned(),
// description: None,
// link: None,
// base_asset: None,
// namespace: None,
// install_modules: vec![
// ModuleInstallConfig::new(
// ModuleInfo::from_id(
// DEX_ADAPTER_ID,
// ModuleVersion::Version(
// abstract_dex_adapter::contract::CONTRACT_VERSION.to_owned(),
// ),
// )?,
// None,
// ),
// ModuleInstallConfig::new(
// ModuleInfo::from_id(
// APP_ID,
// ModuleVersion::Version(APP_VERSION.to_owned()),
// )?,
// Some(to_json_binary(&init_msg)?),
// ),
// ],
// account_id: Some(AccountId::local(random_account_id)),
// })?,
// funds: vec![],
// }
// .to_proto_bytes(),
// };
// Ok(msg)
}

pub fn create_sub_account_message<Chain: CwEnv>(
Expand All @@ -333,41 +333,41 @@ mod utils {
let chain = client.environment();
let random_account_id = client.random_account_id()?;

let msg = Any {
type_url: MsgExecuteContract::TYPE_URL.to_owned(),
value: MsgExecuteContract {
sender: chain.sender_addr().to_string(),
contract: account.manager()?.to_string(),
msg: to_json_vec(&abstract_app::std::manager::ExecuteMsg::CreateSubAccount {
name: "deep-adventurous-afternoon".to_owned(),
description: None,
link: None,
base_asset: None,
namespace: None,
install_modules: vec![
ModuleInstallConfig::new(
ModuleInfo::from_id(
DEX_ADAPTER_ID,
ModuleVersion::Version(
abstract_dex_adapter::contract::CONTRACT_VERSION.to_owned(),
),
)?,
None,
),
ModuleInstallConfig::new(
ModuleInfo::from_id(
APP_ID,
ModuleVersion::Version(APP_VERSION.to_owned()),
)?,
Some(to_json_binary(&init_msg)?),
),
],
account_id: Some(random_account_id),
})?,
funds: vec![],
}
.to_proto_bytes(),
};
Ok(msg)
todo!()
// let msg = Any {
// type_url: MsgExecuteContract::TYPE_URL.to_owned(),
// value: MsgExecuteContract {
// sender: chain.sender_addr().to_string(),
// contract: account.address()?.to_string(),
// msg: to_json_vec(&abstract_app::std::account::ExecuteMsg::CreateSubAccount {
// name: Some("deep-adventurous-afternoon".to_owned()),
// description: None,
// link: None,
// namespace: None,
// install_modules: vec![
// ModuleInstallConfig::new(
// ModuleInfo::from_id(
// DEX_ADAPTER_ID,
// ModuleVersion::Version(
// abstract_dex_adapter::contract::CONTRACT_VERSION.to_owned(),
// ),
// )?,
// None,
// ),
// ModuleInstallConfig::new(
// ModuleInfo::from_id(
// APP_ID,
// ModuleVersion::Version(APP_VERSION.to_owned()),
// )?,
// Some(to_json_binary(&init_msg)?),
// ),
// ],
// account_id: Some(random_account_id),
// })?,
// funds: vec![],
// }
// .to_proto_bytes(),
// };
// Ok(msg)
}
}
6 changes: 3 additions & 3 deletions contracts/carrot-app/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ impl<Chain: cw_orch::environment::CwEnv> abstract_app::abstract_interface::Depen
fn dependency_install_configs(
_configuration: Self::DependenciesConfig,
) -> Result<
Vec<abstract_app::std::manager::ModuleInstallConfig>,
Vec<abstract_app::std::account::ModuleInstallConfig>,
abstract_app::abstract_interface::AbstractInterfaceError,
> {
let dex_dependency_install_configs: Vec<abstract_app::std::manager::ModuleInstallConfig> =
let dex_dependency_install_configs: Vec<abstract_app::std::account::ModuleInstallConfig> =
<abstract_dex_adapter::interface::DexAdapter<Chain> as abstract_app::abstract_interface::DependencyCreation>::dependency_install_configs(
cosmwasm_std::Empty {},
)?;

let adapter_install_config = abstract_app::std::manager::ModuleInstallConfig::new(
let adapter_install_config = abstract_app::std::account::ModuleInstallConfig::new(
abstract_app::std::objects::module::ModuleInfo::from_id(
abstract_dex_adapter::DEX_ADAPTER_ID,
abstract_dex_adapter::contract::CONTRACT_VERSION.into(),
Expand Down
Loading