Skip to content

Commit

Permalink
Minting tokens works!
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHartnell committed Aug 31, 2023
1 parent 8893cb9 commit 0e39a50
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
16 changes: 13 additions & 3 deletions contracts/external/cw-abc/src/test_tube/integration_tests.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
use crate::msg::ExecuteMsg;

use super::test_env::{TestEnv, TestEnvBuilder};
use osmosis_test_tube::{Account, Module, OsmosisTestApp, Wasm};
use token_bindings::Metadata;

use cosmwasm_std::coins;
use osmosis_test_tube::OsmosisTestApp;

#[test]
fn test_happy_path() {
let app = OsmosisTestApp::new();

let env = TestEnvBuilder::new();
let TestEnv { abc, accounts, .. } = env.default_setup(&app);
// TODO

// Buy tokens
abc.execute(&ExecuteMsg::Buy {}, &coins(1000000, "uosmo"), &accounts[0])
.unwrap();

// TODO query curve

// TODO burn
}
7 changes: 3 additions & 4 deletions contracts/external/cw-abc/src/test_tube/test_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ use crate::{
};

use cosmwasm_std::{Coin, Decimal, Uint128};
use cw_tokenfactory_issuer::msg::{DenomResponse, DenomUnit};
use cw_utils::Duration;
use dao_testing::test_tube::cw_tokenfactory_issuer::TokenfactoryIssuer;
use osmosis_test_tube::{
osmosis_std::types::cosmos::bank::v1beta1::QueryAllBalancesRequest,
Expand All @@ -28,7 +26,8 @@ use std::fmt::Debug;
use std::path::PathBuf;

pub const DENOM: &str = "ucat";
pub const JUNO: &str = "ujuno";
// Needs to match what's configured for test-tube
pub const RESERVE: &str = "uosmo";

pub struct TestEnv<'a> {
pub app: &'a OsmosisTestApp,
Expand Down Expand Up @@ -121,7 +120,7 @@ impl TestEnvBuilder {
decimals: 6,
},
reserve: ReserveToken {
denom: JUNO.to_string(),
denom: RESERVE.to_string(),
decimals: 6,
},
phase_config: CommonsPhaseConfig {
Expand Down

0 comments on commit 0e39a50

Please sign in to comment.