Skip to content

Commit

Permalink
remove coin registry crate; rename PCL contract folder
Browse files Browse the repository at this point in the history
  • Loading branch information
epanchee committed Dec 1, 2023
1 parent 963ed46 commit fd9c0fc
Show file tree
Hide file tree
Showing 21 changed files with 13 additions and 40 deletions.
7 changes: 0 additions & 7 deletions Cargo.lock

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

10 changes: 0 additions & 10 deletions contracts/coin_registry/Cargo.toml

This file was deleted.

2 changes: 0 additions & 2 deletions contracts/coin_registry/src/lib.rs

This file was deleted.

2 changes: 1 addition & 1 deletion contracts/factory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ thiserror = "1.0"
itertools = "0.11"

[dev-dependencies]
astroport-pcl-osmo = { path = "../pair_pcl" }
astroport-pcl-osmo = { path = "../pair_concentrated" }
cw-multi-test = { git = "https://github.com/CosmWasm/cw-multi-test", rev = "b1ce5acd07226b91c45f27b9bb01e67697cdd20f" }
prost = "0.11"
anyhow = "1"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions e2e_tests/contracts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Contracts which are not part of this repo but are used in the e2e tests.
1. astroport-native-coin-registry from [release v2.9.5](https://github.com/astroport-fi/astroport-core/releases/tag/v2.9.5)
Binary file not shown.
30 changes: 10 additions & 20 deletions e2e_tests/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ use std::path::Path;
use std::process::Command;
use std::str::FromStr;

use serde::Serialize;

use anyhow::Result as AnyResult;
use astroport::asset::{Asset, AssetInfo, PairInfo};
use astroport::factory::{PairConfig, PairType};
use astroport::pair_concentrated::ConcentratedPoolParams;
use astroport::{factory, pair};
use astroport_on_osmosis::pair_pcl::ExecuteMsg;
use cosmwasm_std::{coin, coins, to_json_binary, Coin, Decimal};
use osmosis_std::types::cosmos::bank::v1beta1::QueryBalanceRequest;
use osmosis_std::types::cosmwasm::wasm::v1::MsgExecuteContractResponse;
Expand All @@ -29,6 +26,9 @@ use osmosis_test_tube::{
Account, Bank, GovWithAppAccess, Module, OsmosisTestApp, PoolManager, Runner,
RunnerExecuteResult, SigningAccount, TokenFactory, Wasm,
};
use serde::Serialize;

use astroport_on_osmosis::pair_pcl::ExecuteMsg;

fn locate_workspace_root() -> String {
let result = Command::new("cargo")
Expand Down Expand Up @@ -57,7 +57,6 @@ const FAKE_MAKER: &str = "osmo1ek9r5ulgr0cmwdwchhd87d2x4lajaucwv8p5xn";
const BUILD_CONTRACTS: &[&str] = &[
// "astroport-pcl-osmo", // we build this contract separately to hardcode factory address
"astroport-factory-osmosis",
"coin-registry",
];

fn compile_wasm(project_dir: &str, contract: &str) {
Expand Down Expand Up @@ -105,7 +104,8 @@ impl<'a> TestAppWrapper<'a> {
}

let target_dir = Path::new(&project_dir).join("target/wasm32-unknown-unknown/release");
let native_registry_wasm = target_dir.join("coin_registry.wasm");
let native_registry_wasm =
Path::new(&project_dir).join("e2e_tests/contracts/astroport_native_coin_registry.wasm");
let factory_wasm = target_dir.join("astroport_factory_osmosis.wasm");

let mut helper = Self {
Expand Down Expand Up @@ -165,7 +165,11 @@ impl<'a> TestAppWrapper<'a> {
.unwrap();

// Pin factory address in the PCL wasm binary
fs::write("../contracts/pair_pcl/src/factory_address", &helper.factory).unwrap();
fs::write(
"../contracts/pair_concentrated/src/factory_address",
&helper.factory,
)
.unwrap();
compile_wasm(&project_dir, "astroport-pcl-osmo");
println!("Storing cl pool contract...");
let cl_pool_wasm = target_dir.join("astroport_pcl_osmo.wasm");
Expand Down Expand Up @@ -332,7 +336,6 @@ impl<'a> TestAppWrapper<'a> {
let pool_infos: Vec<CosmWasmPool> = self
.app
.query::<_, PoolsResponse>("/osmosis.cosmwasmpool.v1beta1.Query/Pools", &query_msg)
// .query::<_, PoolsResponse>(PoolsRequest::TYPE_URL, &query_msg)
.unwrap()
.pools
.into_iter()
Expand Down Expand Up @@ -427,19 +430,6 @@ impl<'a> TestAppWrapper<'a> {
)
}

// pub fn give_me_money(&self, to: &str, coins: &[Coin]) {
// self.bank
// .send(
// MsgSend {
// from_address: self.signer.address().to_string(),
// to_address: to.to_string(),
// amount: coins.into_iter().map(Into::into).collect(),
// },
// &self.signer,
// )
// .unwrap();
// }

pub fn store_code<P>(&self, contract_path: P) -> AnyResult<u64>
where
P: AsRef<Path>,
Expand Down

0 comments on commit fd9c0fc

Please sign in to comment.