Skip to content

Commit

Permalink
Feat/e2e refactor (#575)
Browse files Browse the repository at this point in the history
Co-authored-by: Connor Barr <[email protected]>
  • Loading branch information
cowboy0015 and crnbarr93 authored Nov 20, 2024
1 parent 836ad0d commit 5344453
Show file tree
Hide file tree
Showing 65 changed files with 1,069 additions and 503 deletions.
File renamed without changes.
88 changes: 62 additions & 26 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resolver = "2"
[profile.release]
debug = false
debug-assertions = false
opt-level = 'z'
opt-level = 's'
codegen-units = 1
rpath = false
lto = true
Expand Down
3 changes: 2 additions & 1 deletion contracts/app/andromeda-app-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ enum-repr = { workspace = true }
cw-multi-test = { workspace = true, optional = true }
andromeda-testing = { workspace = true, optional = true }
cw-orch = { workspace = true }

cw-orch-daemon = "0.24.2"

[features]
testing = ["cw-multi-test", "andromeda-testing"]
library = []
10 changes: 10 additions & 0 deletions contracts/app/andromeda-app-contract/src/interface.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
use andromeda_app::app::{ExecuteMsg, InstantiateMsg, QueryMsg};
use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata};
use cw_orch_daemon::{DaemonBase, Wallet};

pub const CONTRACT_ID: &str = "app-contract";

contract_interface!(AppContract, CONTRACT_ID, "andromeda_app_contract.wasm");

type Chain = DaemonBase<Wallet>;

impl AppContract<Chain> {
pub fn get_address(&self, name: impl Into<String>) -> String {
let query_msg = QueryMsg::GetAddress { name: name.into() };
self.query(&query_msg).unwrap()
}
}
2 changes: 1 addition & 1 deletion contracts/data-storage/andromeda-counter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ cosmwasm-schema = { workspace = true }
cw-storage-plus = { workspace = true }
cw-utils = { workspace = true }
cw20 = { workspace = true }
cw-orch = { workspace = true }

andromeda-std = { workspace = true, features = ["rates"] }
andromeda-data-storage = { workspace = true }


[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
cw-orch = { workspace = true }
cw-multi-test = { workspace = true, optional = true }
andromeda-testing = { workspace = true, optional = true }
2 changes: 2 additions & 0 deletions contracts/ecosystem/andromeda-vault/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rust-version = "1.75.0"
[lib]
crate-type = ["cdylib", "rlib"]


[dependencies]
cosmwasm-std = { workspace = true }
cosmwasm-schema = { workspace = true }
Expand All @@ -24,3 +25,4 @@ cw-multi-test = { workspace = true, optional = true }

[features]
testing = ["cw-multi-test"]
library = []
2 changes: 1 addition & 1 deletion contracts/finance/andromeda-fixed-multisig/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ cosmwasm-std = { workspace = true }
cosmwasm-schema = { workspace = true }
cw-storage-plus = { workspace = true }
cw-utils = { workspace = true }
cw-orch = { workspace = true }
cw2 = { workspace = true }
cw3 = { workspace = true }
cw4 = { workspace = true }
Expand All @@ -30,6 +29,7 @@ andromeda-std = { workspace = true }
andromeda-finance = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
cw-orch = { workspace = true }
cw-multi-test = { workspace = true, optional = true }
andromeda-testing = { workspace = true, optional = true }

Expand Down
1 change: 1 addition & 0 deletions contracts/finance/andromeda-validator-staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ chrono = "0.3"
cw-multi-test = { workspace = true, optional = true }
andromeda-testing = { workspace = true }
cw-orch = { workspace = true }
cw-orch-daemon = "0.24.2"
10 changes: 10 additions & 0 deletions contracts/finance/andromeda-validator-staking/src/interface.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use andromeda_finance::validator_staking::{ExecuteMsg, InstantiateMsg, QueryMsg};
use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata};
use cw_orch_daemon::{DaemonBase, Wallet};

pub const CONTRACT_ID: &str = "validator-staking";

Expand All @@ -8,3 +9,12 @@ contract_interface!(
CONTRACT_ID,
"andromeda_validator_staking.wasm"
);

type Chain = DaemonBase<Wallet>;

impl ValidatorStakingContract<Chain> {
pub fn staked_tokens(&self, validator: Option<Addr>) -> Option<::cosmwasm_std::FullDelegation> {
let query_msg = QueryMsg::StakedTokens { validator };
self.query(&query_msg).unwrap()
}
}
1 change: 1 addition & 0 deletions contracts/fungible-tokens/andromeda-cw20/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ andromeda-fungible-tokens = { workspace = true }
cw-multi-test = { workspace = true, optional = true }
andromeda-testing = { workspace = true, optional = true }
cw-orch = { workspace = true }
cw-orch-daemon = "0.24.2"

[dev-dependencies]
andromeda-app = { workspace = true }
13 changes: 13 additions & 0 deletions contracts/fungible-tokens/andromeda-cw20/src/interface.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
use andromeda_fungible_tokens::cw20::{ExecuteMsg, InstantiateMsg, QueryMsg};
use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata};
use cw20::BalanceResponse;
use cw_orch_daemon::{DaemonBase, Wallet};

pub const CONTRACT_ID: &str = "cw20";

contract_interface!(CW20Contract, CONTRACT_ID, "andromeda_cw20.wasm");

type Chain = DaemonBase<Wallet>;

impl CW20Contract<Chain> {
pub fn balance(&self, address: impl Into<String>) -> BalanceResponse {
let query_msg = QueryMsg::Balance {
address: address.into(),
};
self.query(&query_msg).unwrap()
}
}
Loading

0 comments on commit 5344453

Please sign in to comment.