Skip to content

Commit

Permalink
fix: cleanup, remove astroport generator
Browse files Browse the repository at this point in the history
  • Loading branch information
ApolloGie committed Jun 22, 2024
1 parent 705dcb9 commit 82e5614
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 94 deletions.
64 changes: 3 additions & 61 deletions Cargo.lock

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

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ astroport-multi-test = [
"astroport-token",
"astroport-native-coin-registry",
"astroport-factory",
"astroport-generator",
"astroport-maker",
"astroport-pair-stable",
"astroport-pair",
Expand All @@ -69,7 +68,7 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.cargo-machete]
ignored = ["astroport-token", "astroport-native-coin-registry", "astroport-factory", "astroport-generator", "astroport-maker", "astroport-pair-stable", "astroport-pair", "astroport-router", "astroport-staking", "astroport-vesting", "astroport-whitelist"]
ignored = ["astroport-token", "astroport-native-coin-registry", "astroport-factory", "astroport-maker", "astroport-pair-stable", "astroport-pair", "astroport-router", "astroport-staking", "astroport-vesting", "astroport-whitelist"]

[dependencies]
bip32 = { version = "0.5", features = ["bip39"], optional = true }
Expand Down Expand Up @@ -97,7 +96,6 @@ cw20 = { version = "0.15", optional = true }
astroport-token = { version = "=1.1.1", optional = true, features = ["library"] }
astroport-native-coin-registry = { version = "=1.0.1", optional = true, features = ["library"] }
astroport-factory = { version = "=1.8.0", optional = true, features = ["library"] }
astroport-generator = { version = "=2.3.2", optional = true }
astroport-maker = { version = "=1.5.0", optional = true }
astroport-pair-stable = { version = "=4.0.0", optional = true, features = ["library"] }
astroport-pair = { version = "=2.0.1", optional = true }
Expand Down
1 change: 0 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ exceptions = [
{ allow = ["OpenSSL"], name = "ring" },
{ allow = ["GPL-3.0"], name = "astroport-incentives" },
{ allow = ["GPL-3.0"], name = "astroport-factory" },
{ allow = ["GPL-3.0"], name = "astroport-generator" },
{ allow = ["GPL-3.0"], name = "astroport-maker" },
{ allow = ["GPL-3.0"], name = "astroport-pair" },
{ allow = ["GPL-3.0"], name = "astroport-pair-concentrated" },
Expand Down
9 changes: 4 additions & 5 deletions src/astroport/robot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,8 @@ mod tests {
use super::AstroportTestRobot;
use crate::traits::CwItRunner;
use crate::{
astroport::utils::{cw20_info, native_info, AstroportContracts},
robot::TestRobot,
ContractMap, OwnedTestRunner, TestRunner,
astroport::utils::AstroportContracts, robot::TestRobot, ContractMap, OwnedTestRunner,
TestRunner,
};
use cosmwasm_std::Addr;

Expand Down Expand Up @@ -583,7 +582,7 @@ mod tests {

let asset_infos = get_asset_infos(asset_info_choice, &contracts.astro_token.address);

let (pair_addr, lp_token_addr, lp_token_denom) = robot.create_astroport_pair(
let (pair_addr, _lp_token_addr, lp_token_denom) = robot.create_astroport_pair(
pair_type.clone(),
&asset_infos,
init_params,
Expand Down Expand Up @@ -635,7 +634,7 @@ mod tests {

let asset_infos = get_asset_infos(asset_info_choice, &contracts.astro_token.address);
let initial_liquidity = Some(&[420420u128, 696969u128]);
let (pair_addr, _lp_token_addr, lp_token_denom) = robot.create_astroport_pair(
let (pair_addr, _lp_token_addr, _lp_token_denom) = robot.create_astroport_pair(
pair_type,
&asset_infos,
init_params,
Expand Down
39 changes: 15 additions & 24 deletions src/astroport/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,28 @@ use crate::{ContractMap, ContractType, TestRunner};
use astroport::asset::{Asset, AssetInfo};
use astroport::maker::InstantiateMsg as MakerInstantiateMsg;
use astroport::native_coin_registry::InstantiateMsg as CoinRegistryInstantiateMsg;
use astroport::router::InstantiateMsg as RouterInstantiateMsg;
use astroport::token::InstantiateMsg as AstroTokenInstantiateMsg;
use astroport::vesting::{
Cw20HookMsg as VestingHookMsg, InstantiateMsg as VestingInstantiateMsg, VestingAccount,
VestingSchedule, VestingSchedulePoint,
};
use astroport_v5::asset::AssetInfo as AssetInfoV5;
use astroport_v5::factory::{
ExecuteMsg as AstroportFactoryExecuteMsg, InstantiateMsg as AstroportFactoryInstantiateMsg,
PairConfig, PairType,
};
use astroport_v5::incentives::InstantiateMsg as IncentivesInstantiateMsg;
use cosmwasm_schema::cw_serde;
use cosmwasm_std::{to_json_binary, Addr, Binary, Coin, Event, Uint128, Uint64};
use cw20::{BalanceResponse, Cw20Coin, Cw20ExecuteMsg, Cw20QueryMsg, MinterResponse};
use osmosis_std::types::cosmos::bank::v1beta1::QueryBalanceRequest;
use osmosis_std::types::cosmos::base::v1beta1::Coin as OsmosisCoin;
use osmosis_std::types::osmosis::tokenfactory::v1beta1::{
MsgCreateDenom, MsgCreateDenomResponse, MsgMint, MsgMintResponse,
};
use test_tube::ExecuteResponse;
// use astroport_v5::tokenfactory_tracker::InstantiateMsg as TrackerInstantiateMsg;
use osmosis_std::types::cosmos::bank::v1beta1::QueryBalanceRequest;
use std::collections::HashMap;

// use astroport::liquidity_manager::InstantiateMsg as LiquidityManagerInstantiateMsg;
use astroport::router::InstantiateMsg as RouterInstantiateMsg;
use astroport::token::InstantiateMsg as AstroTokenInstantiateMsg;
use astroport::vesting::{
Cw20HookMsg as VestingHookMsg, InstantiateMsg as VestingInstantiateMsg, VestingAccount,
VestingSchedule, VestingSchedulePoint,
};
use cosmwasm_schema::cw_serde;
use cosmwasm_std::{to_json_binary, Addr, Binary, Coin, Event, Uint128, Uint64};
use cw20::{BalanceResponse, Cw20Coin, Cw20ExecuteMsg, Cw20QueryMsg, MinterResponse};
use test_tube::ExecuteResponse;
use test_tube::{Account, Bank, Module, Runner, SigningAccount, Wasm};

pub fn astroport_asset_info_to_astroport_v5_asset_info(
Expand All @@ -47,15 +44,11 @@ pub const ASTROPORT_CONTRACT_NAMES: [&str; 11] = [
"astroport_token",
"astroport_native_coin_registry",
"astroport_factory",
// "astroport_generator",
"astroport_maker",
"astroport_pair_stable",
"astroport_pair",
"astroport_router",
// "astroport_staking",
"astroport_vesting",
// "astroport_whitelist",
// "astroport_liquidity_manager",
"astroport_pair_concentrated",
"astroport_incentives",
"astroport_tokenfactory_tracker",
Expand Down Expand Up @@ -671,8 +664,6 @@ pub fn get_astroport_multitest_contracts() -> HashMap<String, ContractType> {
);

contract_wrappers.extend(create_contract_wrappers_with_reply!(
// "astroport_generator",
// "astroport_staking",
"astroport_factory",
"astroport_pair_stable",
"astroport_pair"
Expand Down Expand Up @@ -715,7 +706,7 @@ pub fn get_astroport_multitest_contracts() -> HashMap<String, ContractType> {
mod tests {
use astroport::asset::{Asset, AssetInfo};
use cosmwasm_std::{Addr, Coin, Decimal, Uint128};
use cw20::{AllowanceResponse, BalanceResponse, Cw20ExecuteMsg, Cw20QueryMsg};
use cw20::{AllowanceResponse, Cw20ExecuteMsg, Cw20QueryMsg};
use osmosis_std::types::cosmos::bank::v1beta1::QueryAllBalancesRequest;
use osmosis_std::types::cosmos::bank::v1beta1::QueryBalanceRequest;
use test_tube::{Account, Bank, Module, Wasm};
Expand All @@ -742,8 +733,8 @@ mod tests {

#[cfg(feature = "chain-download")]
use {
super::get_wasm_path, crate::artifact::Artifact, crate::artifact::ChainArtifact,
crate::ContractType, std::collections::HashMap,
super::get_wasm_path, crate::artifact::ChainArtifact, crate::ContractType,
std::collections::HashMap,
};

#[cfg(feature = "rpc-runner")]
Expand Down Expand Up @@ -822,7 +813,7 @@ mod tests {
#[cfg(feature = "chain-download")]
/// Get artifacts from Neutron testnet
fn get_neutron_testnet_artifacts() -> HashMap<String, ContractType> {
let mut artifacts = NEUTRON_CONTRACT_ADDRESSES
let artifacts = NEUTRON_CONTRACT_ADDRESSES
.iter()
.map(|(name, chain_artifact)| {
(
Expand Down

0 comments on commit 82e5614

Please sign in to comment.