-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: refactored e2e test to use interfaces provided by the ados
- Loading branch information
1 parent
574959d
commit 3b0a4ea
Showing
30 changed files
with
462 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 13 additions & 1 deletion
14
contracts/non-fungible-tokens/andromeda-crowdfund/src/interface.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
use andromeda_non_fungible_tokens::crowdfund::{ExecuteMsg, InstantiateMsg, QueryMsg}; | ||
use andromeda_non_fungible_tokens::crowdfund::{ | ||
CampaignSummaryResponse, ExecuteMsg, InstantiateMsg, QueryMsg, | ||
}; | ||
use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata}; | ||
use cw_orch_daemon::{DaemonBase, Wallet}; | ||
|
||
pub const CONTRACT_ID: &str = "crowdfund"; | ||
|
||
contract_interface!(CrowdfundContract, CONTRACT_ID, "andromeda_crowdfund.wasm"); | ||
|
||
type Chain = DaemonBase<Wallet>; | ||
|
||
impl CrowdfundContract<Chain> { | ||
pub fn campaign_summary(&self) -> CampaignSummaryResponse { | ||
let query_msg = QueryMsg::CampaignSummary {}; | ||
self.query(&query_msg).unwrap() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
contracts/non-fungible-tokens/andromeda-cw721/src/interface.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
use andromeda_non_fungible_tokens::cw721::{ExecuteMsg, InstantiateMsg, QueryMsg}; | ||
use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata}; | ||
use cw_orch_daemon::{DaemonBase, Wallet}; | ||
|
||
pub const CONTRACT_ID: &str = "cw721"; | ||
|
||
contract_interface!(CW721Contract, CONTRACT_ID, "andromeda_cw721.wasm"); | ||
|
||
type Chain = DaemonBase<Wallet>; | ||
|
||
impl CW721Contract<Chain> { | ||
pub fn owner_of(&self, token_id: impl Into<String>) -> cw721::OwnerOfResponse { | ||
let query_msg = QueryMsg::OwnerOf { | ||
token_id: token_id.into(), | ||
include_expired: None, | ||
}; | ||
self.query(&query_msg).unwrap() | ||
} | ||
} |
Oops, something went wrong.