Skip to content

Commit

Permalink
Get instantiation working with test-tube
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHartnell authored and Jake Hartnell committed Mar 26, 2024
1 parent 2f6bba4 commit 7d6b600
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions contracts/external/cw-abc/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use cw2::set_contract_version;
use cw_tokenfactory_issuer::msg::{
ExecuteMsg as IssuerExecuteMsg, InstantiateMsg as IssuerInstantiateMsg,
};
use cw_utils::{nonpayable, parse_reply_instantiate_data};
use cw_utils::parse_reply_instantiate_data;
use std::collections::HashSet;
use token_bindings::{TokenFactoryMsg, TokenFactoryQuery};

Expand Down Expand Up @@ -40,7 +40,6 @@ pub fn instantiate(
info: MessageInfo,
msg: InstantiateMsg,
) -> CwAbcResult {
nonpayable(&info)?;
set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;

let InstantiateMsg {
Expand Down
8 changes: 0 additions & 8 deletions contracts/external/cw-abc/src/test_tube/integration_tests.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
use super::test_env::{TestEnv, TestEnvBuilder};
use crate::{
abc::{
ClosedConfig, CommonsPhaseConfig, HatchConfig, MinMax, OpenConfig, ReserveToken,
SupplyToken,
},
msg::{CurveInfoResponse, ExecuteMsg, InstantiateMsg, QueryMsg},
};
use cosmwasm_std::{Coin, Decimal, Uint128};
use osmosis_test_tube::{Account, Module, OsmosisTestApp, Wasm};
use token_bindings::Metadata;

Expand Down
6 changes: 4 additions & 2 deletions contracts/external/cw-abc/src/test_tube/test_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,20 +364,22 @@ impl<'a> CwAbc<'a> {
let manifest_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let byte_code = std::fs::read(
manifest_path
.join("..")
.join("..")
.join("..")
.join("artifacts")
.join("cw_tokenfactory_issuer.wasm"),
.join("cw_abc.wasm"),
);
match byte_code {
Ok(byte_code) => byte_code,
// On arm processors, the above path is not found, so we try the following path
Err(_) => std::fs::read(
manifest_path
.join("..")
.join("..")
.join("..")
.join("artifacts")
.join("cw_tokenfactory_issuer-aarch64.wasm"),
.join("cw_abc-aarch64.wasm"),
)
.unwrap(),
}
Expand Down

0 comments on commit 7d6b600

Please sign in to comment.