Skip to content

Commit

Permalink
make local-ic work
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Dec 18, 2023
1 parent 644116b commit c85b764
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "interchaintest-e2e"
name = "ictest"
version = "0.1.0"
edition = "2021"

Expand All @@ -10,4 +10,6 @@ localic-std = {git = "https://github.com/strangelove-ventures/interchaintest", b
# localic-std = {path = "/home/reece/Desktop/Programming/Go/interchaintest/local-interchain/rust/localic-std"} # TODO: TEMP
cosmwasm-std = "1.4.0"
reqwest = { version = "0.11.20", features = ["blocking", "json"]}
serde_json = { version = "1.0.107" }
serde_json = { version = "1.0.107" }

[workspace]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use localic_std::modules::cosmwasm::CosmWasm;
use reqwest::blocking::Client;
use serde_json::json;

use localic_std::polling::*;
use localic_std::transactions::*;
Expand All @@ -28,7 +27,7 @@ fn main() {
fn test_cosmos_staking(rb: &ChainRequestBuilder) {
let mut cw = CosmWasm::new(&rb);

let file_path = get_contract_path().join("dao-voting-cosmos-staking.wasm");
let file_path = get_contract_path().join("dao_voting_token_staked.wasm");
let code_id = cw.store("acc0", &file_path);
if code_id.is_err() {
panic!("code_id error: {:?}", code_id);
Expand Down Expand Up @@ -64,11 +63,15 @@ fn test_cosmos_staking(rb: &ChainRequestBuilder) {
// println!("updated_res: {}", updated_res);
}

fn parent_dir() -> std::path::PathBuf {
return std::env::current_dir().unwrap().parent().unwrap().to_path_buf();
fn root_dir() -> std::path::PathBuf {
let mut parent = std::env::current_dir().unwrap().parent().unwrap().to_path_buf();
parent = parent.parent().unwrap().to_path_buf();
parent = parent.parent().unwrap().to_path_buf();
parent = parent.parent().unwrap().to_path_buf();
return parent;
}

// get_contract_path returns the artifacts dire from parent_dir
fn get_contract_path() -> std::path::PathBuf {
parent_dir().join("artifacts")
root_dir().join("artifacts")
}

0 comments on commit c85b764

Please sign in to comment.