diff --git a/0.03536 b/0.03536 deleted file mode 100644 index e69de29b..00000000 diff --git a/Cargo.lock b/Cargo.lock index c2ed3f62..2a9ef6c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -541,7 +541,7 @@ dependencies = [ "semver", "serde", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -587,7 +587,7 @@ dependencies = [ "schemars", "serde", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -614,7 +614,7 @@ dependencies = [ "vault", "vault_factory", "whale-lair", - "white-whale", + "white-whale-std", ] [[package]] @@ -631,7 +631,7 @@ dependencies = [ "semver", "serde", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -685,7 +685,7 @@ dependencies = [ "serde", "terraswap-pair", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -787,7 +787,7 @@ dependencies = [ "serde", "terraswap-token", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -804,7 +804,7 @@ dependencies = [ "semver", "serde", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -1532,7 +1532,7 @@ dependencies = [ "serde", "stable-swap-sim", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -1602,7 +1602,7 @@ dependencies = [ "semver", "serde", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -1623,7 +1623,7 @@ dependencies = [ "semver", "serde", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -1640,7 +1640,7 @@ dependencies = [ "semver", "serde", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -1657,7 +1657,7 @@ dependencies = [ "schemars", "serde", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -1733,7 +1733,7 @@ dependencies = [ "semver", "serde", "thiserror", - "white-whale", + "white-whale-std", ] [[package]] @@ -1754,7 +1754,7 @@ dependencies = [ "serde", "thiserror", "vault", - "white-whale", + "white-whale-std", ] [[package]] @@ -1776,7 +1776,7 @@ dependencies = [ "thiserror", "vault", "vault_factory", - "white-whale", + "white-whale-std", ] [[package]] @@ -1820,12 +1820,12 @@ dependencies = [ "semver", "serde", "thiserror", - "white-whale", + "white-whale-std", "white-whale-testing", ] [[package]] -name = "white-whale" +name = "white-whale-std" version = "1.1.1" dependencies = [ "cosmwasm-schema", @@ -1853,7 +1853,7 @@ dependencies = [ "schemars", "serde", "whale-lair", - "white-whale", + "white-whale-std", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index cebc164b..18c94824 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,14 +2,14 @@ resolver = "2" members = [ - "packages/*", - "contracts/liquidity_hub/pool-network/*", - "contracts/liquidity_hub/fee_collector", - "contracts/liquidity_hub/fee_distributor", - "contracts/liquidity_hub/fee-distributor-mock", - "contracts/liquidity_hub/whale_lair", - "contracts/liquidity_hub/vault-network/*", - "contracts/liquidity_hub/epoch-manager", + "packages/*", + "contracts/liquidity_hub/pool-network/*", + "contracts/liquidity_hub/fee_collector", + "contracts/liquidity_hub/fee_distributor", + "contracts/liquidity_hub/fee-distributor-mock", + "contracts/liquidity_hub/whale_lair", + "contracts/liquidity_hub/vault-network/*", + "contracts/liquidity_hub/epoch-manager", ] [workspace.package] @@ -34,16 +34,19 @@ semver = "1.0.12" serde = { version = "1.0.145", default-features = false, features = ["derive"] } thiserror = "1.0.43" osmosis-std-derive = "0.15.3" -prost = {version = "0.11.9", default-features = false, features = ["prost-derive"]} -prost-types = {version = "0.11.9", default-features = false} -white-whale = { path = "./packages/white-whale", features = [] } +prost = { version = "0.11.9", default-features = false, features = [ + "prost-derive", +] } +prost-types = { version = "0.11.9", default-features = false } +white-whale-std = { version = "1.1.1", path = "packages/white-whale-std", features = [ +] } white-whale-testing = { path = "./packages/white-whale-testing" } cw-multi-test = { version = "0.16.5" } uint = "0.9.5" integer-sqrt = "0.1.5" -anyhow = { version = "1.0.71"} +anyhow = { version = "1.0.71" } cw-controllers = "1.1.0" -anybuf = { version = "0.3.0"} +anybuf = { version = "0.3.0" } # contracts whale-lair = { path = "./contracts/liquidity_hub/whale_lair" } diff --git a/contracts/liquidity_hub/epoch-manager/Cargo.toml b/contracts/liquidity_hub/epoch-manager/Cargo.toml index 44262838..0c502f52 100644 --- a/contracts/liquidity_hub/epoch-manager/Cargo.toml +++ b/contracts/liquidity_hub/epoch-manager/Cargo.toml @@ -16,9 +16,9 @@ exclude = [ crate-type = ["cdylib", "rlib"] [features] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] -injective = ["white-whale/injective"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] @@ -32,7 +32,7 @@ schemars.workspace = true serde.workspace = true semver.workspace = true thiserror.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true cw-controllers.workspace = true [dev-dependencies] diff --git a/contracts/liquidity_hub/epoch-manager/src/bin/schema.rs b/contracts/liquidity_hub/epoch-manager/src/bin/schema.rs index 53f4d093..7b0b4383 100644 --- a/contracts/liquidity_hub/epoch-manager/src/bin/schema.rs +++ b/contracts/liquidity_hub/epoch-manager/src/bin/schema.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::write_api; -use white_whale::epoch_manager::epoch_manager::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use white_whale_std::epoch_manager::epoch_manager::{ExecuteMsg, InstantiateMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/epoch-manager/src/commands.rs b/contracts/liquidity_hub/epoch-manager/src/commands.rs index 7d6bb311..321f6751 100644 --- a/contracts/liquidity_hub/epoch-manager/src/commands.rs +++ b/contracts/liquidity_hub/epoch-manager/src/commands.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{Api, DepsMut, Env, MessageInfo, Response, SubMsg}; -use white_whale::epoch_manager::epoch_manager::EpochConfig; -use white_whale::epoch_manager::hooks::EpochChangedHookMsg; +use white_whale_std::epoch_manager::epoch_manager::EpochConfig; +use white_whale_std::epoch_manager::hooks::EpochChangedHookMsg; use crate::state::{ADMIN, CONFIG, EPOCH, HOOKS}; use crate::ContractError; diff --git a/contracts/liquidity_hub/epoch-manager/src/contract.rs b/contracts/liquidity_hub/epoch-manager/src/contract.rs index 8421f12b..f3e3679e 100644 --- a/contracts/liquidity_hub/epoch-manager/src/contract.rs +++ b/contracts/liquidity_hub/epoch-manager/src/contract.rs @@ -3,10 +3,10 @@ use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult} use cw2::{get_contract_version, set_contract_version}; use semver::Version; -use white_whale::epoch_manager::epoch_manager::{ +use white_whale_std::epoch_manager::epoch_manager::{ Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, }; -use white_whale::migrate_guards::check_contract_name; +use white_whale_std::migrate_guards::check_contract_name; use crate::error::ContractError; use crate::state::{ADMIN, CONFIG, EPOCH}; diff --git a/contracts/liquidity_hub/epoch-manager/src/queries.rs b/contracts/liquidity_hub/epoch-manager/src/queries.rs index 82036505..75775a59 100644 --- a/contracts/liquidity_hub/epoch-manager/src/queries.rs +++ b/contracts/liquidity_hub/epoch-manager/src/queries.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{Addr, Deps, StdResult}; -use white_whale::epoch_manager::epoch_manager::{ConfigResponse, EpochResponse, EpochV2}; +use white_whale_std::epoch_manager::epoch_manager::{ConfigResponse, EpochResponse, EpochV2}; use crate::state::{ADMIN, CONFIG, EPOCH}; diff --git a/contracts/liquidity_hub/epoch-manager/src/state.rs b/contracts/liquidity_hub/epoch-manager/src/state.rs index b123dab9..1e0c424b 100644 --- a/contracts/liquidity_hub/epoch-manager/src/state.rs +++ b/contracts/liquidity_hub/epoch-manager/src/state.rs @@ -1,6 +1,6 @@ use cw_controllers::{Admin, Hooks}; use cw_storage_plus::Item; -use white_whale::epoch_manager::epoch_manager::{Config, EpochV2}; +use white_whale_std::epoch_manager::epoch_manager::{Config, EpochV2}; pub const CONFIG: Item<Config> = Item::new("config"); pub const ADMIN: Admin = Admin::new("admin"); diff --git a/contracts/liquidity_hub/fee-distributor-mock/Cargo.toml b/contracts/liquidity_hub/fee-distributor-mock/Cargo.toml index 7563c292..197d8bbe 100644 --- a/contracts/liquidity_hub/fee-distributor-mock/Cargo.toml +++ b/contracts/liquidity_hub/fee-distributor-mock/Cargo.toml @@ -27,10 +27,10 @@ incremental = false overflow-checks = true [features] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] backtraces = ["cosmwasm-std/backtraces"] # use library feature to disable all instantiate/execute/query exports library = [] @@ -51,7 +51,7 @@ cw2 = "1.0.1" schemars = "0.8.10" serde = { version = "1.0.145", default-features = false, features = ["derive"] } thiserror = { version = "1.0.31" } -white-whale.workspace = true +white-whale-std.workspace = true [dev-dependencies] cw-multi-test = "0.16.2" diff --git a/contracts/liquidity_hub/fee-distributor-mock/src/contract.rs b/contracts/liquidity_hub/fee-distributor-mock/src/contract.rs index d2486011..04432923 100644 --- a/contracts/liquidity_hub/fee-distributor-mock/src/contract.rs +++ b/contracts/liquidity_hub/fee-distributor-mock/src/contract.rs @@ -3,7 +3,7 @@ use cosmwasm_std::{ to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, Uint64, }; -use white_whale::fee_distributor::EpochResponse; +use white_whale_std::fee_distributor::EpochResponse; use crate::error::ContractError; use crate::msg::InstantiateMsg; @@ -26,7 +26,7 @@ pub fn instantiate( ) -> Result<Response, ContractError> { CURRENT_EPOCH.save( deps.storage, - &white_whale::fee_distributor::Epoch { + &white_whale_std::fee_distributor::Epoch { id: Uint64::one(), start_time: env.block.time, total: vec![], @@ -44,11 +44,11 @@ pub fn execute( deps: DepsMut, _env: Env, _info: MessageInfo, - msg: white_whale::fee_distributor::ExecuteMsg, + msg: white_whale_std::fee_distributor::ExecuteMsg, ) -> Result<Response, ContractError> { - if let white_whale::fee_distributor::ExecuteMsg::NewEpoch {} = msg { + if let white_whale_std::fee_distributor::ExecuteMsg::NewEpoch {} = msg { CURRENT_EPOCH.update(deps.storage, |epoch| -> StdResult<_> { - Ok(white_whale::fee_distributor::Epoch { + Ok(white_whale_std::fee_distributor::Epoch { id: epoch.id + Uint64::one(), start_time: epoch.start_time.plus_seconds(86400u64), total: vec![], @@ -66,18 +66,18 @@ pub fn execute( pub fn query( deps: Deps, _env: Env, - msg: white_whale::fee_distributor::QueryMsg, + msg: white_whale_std::fee_distributor::QueryMsg, ) -> StdResult<Binary> { match msg { - white_whale::fee_distributor::QueryMsg::Config {} => {} - white_whale::fee_distributor::QueryMsg::CurrentEpoch {} => { + white_whale_std::fee_distributor::QueryMsg::Config {} => {} + white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {} => { return to_json_binary(&EpochResponse { epoch: CURRENT_EPOCH.load(deps.storage)?, }); } - white_whale::fee_distributor::QueryMsg::Epoch { .. } => {} - white_whale::fee_distributor::QueryMsg::ClaimableEpochs { .. } => {} - white_whale::fee_distributor::QueryMsg::Claimable { .. } => {} + white_whale_std::fee_distributor::QueryMsg::Epoch { .. } => {} + white_whale_std::fee_distributor::QueryMsg::ClaimableEpochs { .. } => {} + white_whale_std::fee_distributor::QueryMsg::Claimable { .. } => {} } to_json_binary(&"") diff --git a/contracts/liquidity_hub/fee-distributor-mock/src/state.rs b/contracts/liquidity_hub/fee-distributor-mock/src/state.rs index d468f639..2f041b94 100644 --- a/contracts/liquidity_hub/fee-distributor-mock/src/state.rs +++ b/contracts/liquidity_hub/fee-distributor-mock/src/state.rs @@ -1,4 +1,4 @@ use cw_storage_plus::Item; -use white_whale::fee_distributor::Epoch; +use white_whale_std::fee_distributor::Epoch; pub const CURRENT_EPOCH: Item<Epoch> = Item::new("epoch"); diff --git a/contracts/liquidity_hub/fee_collector/Cargo.toml b/contracts/liquidity_hub/fee_collector/Cargo.toml index 7eca1ba5..d14b73f2 100644 --- a/contracts/liquidity_hub/fee_collector/Cargo.toml +++ b/contracts/liquidity_hub/fee_collector/Cargo.toml @@ -11,9 +11,9 @@ documentation.workspace = true publish.workspace = true exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -24,9 +24,9 @@ crate-type = ["cdylib", "rlib"] [features] # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] -injective = ["white-whale/injective"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] [dependencies] @@ -39,7 +39,7 @@ schemars.workspace = true semver.workspace = true serde.workspace = true thiserror.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true cosmwasm-schema.workspace = true [dev-dependencies] diff --git a/contracts/liquidity_hub/fee_collector/rustfmt.toml b/contracts/liquidity_hub/fee_collector/rustfmt.toml index 11a85e6a..6918e223 100644 --- a/contracts/liquidity_hub/fee_collector/rustfmt.toml +++ b/contracts/liquidity_hub/fee_collector/rustfmt.toml @@ -12,4 +12,3 @@ tab_spaces = 4 #struct_field_align_threshold = 20 #struct_lit_single_line = true #report_todo = "Always" - diff --git a/contracts/liquidity_hub/fee_collector/src/bin/fee_collector_schema.rs b/contracts/liquidity_hub/fee_collector/src/bin/fee_collector_schema.rs index c275001e..5c872c2b 100644 --- a/contracts/liquidity_hub/fee_collector/src/bin/fee_collector_schema.rs +++ b/contracts/liquidity_hub/fee_collector/src/bin/fee_collector_schema.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::write_api; -use white_whale::fee_collector::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use white_whale_std::fee_collector::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/fee_collector/src/commands.rs b/contracts/liquidity_hub/fee_collector/src/commands.rs index 3a3f082b..76640625 100644 --- a/contracts/liquidity_hub/fee_collector/src/commands.rs +++ b/contracts/liquidity_hub/fee_collector/src/commands.rs @@ -4,13 +4,13 @@ use cosmwasm_std::{ }; use cw20::{Cw20ExecuteMsg, Cw20QueryMsg}; -use white_whale::fee_collector::{Config, ContractType, ExecuteMsg, FactoryType, FeesFor}; -use white_whale::fee_distributor::Epoch; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::pool_network::factory::{PairsResponse, QueryMsg}; -use white_whale::pool_network::router; -use white_whale::pool_network::router::SwapOperation; -use white_whale::vault_network::vault_factory::VaultsResponse; +use white_whale_std::fee_collector::{Config, ContractType, ExecuteMsg, FactoryType, FeesFor}; +use white_whale_std::fee_distributor::Epoch; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::factory::{PairsResponse, QueryMsg}; +use white_whale_std::pool_network::router; +use white_whale_std::pool_network::router::SwapOperation; +use white_whale_std::vault_network::vault_factory::VaultsResponse; use crate::contract::{FEES_AGGREGATION_REPLY_ID, FEES_COLLECTION_REPLY_ID}; use crate::queries::query_distribution_asset; @@ -48,12 +48,12 @@ pub fn collect_fees(deps: DepsMut, collect_fees_for: FeesFor) -> Result<Response /// Builds the message to collect the fees for the given contract fn collect_fees_for_contract(contract: Addr, contract_type: ContractType) -> StdResult<CosmosMsg> { let collect_protocol_fees_msg = match contract_type { - ContractType::Vault {} => { - to_json_binary(&white_whale::vault_network::vault::ExecuteMsg::CollectProtocolFees {})? - } - ContractType::Pool {} => { - to_json_binary(&white_whale::pool_network::pair::ExecuteMsg::CollectProtocolFees {})? - } + ContractType::Vault {} => to_json_binary( + &white_whale_std::vault_network::vault::ExecuteMsg::CollectProtocolFees {}, + )?, + ContractType::Pool {} => to_json_binary( + &white_whale_std::pool_network::pair::ExecuteMsg::CollectProtocolFees {}, + )?, }; Ok(CosmosMsg::Wasm(WasmMsg::Execute { @@ -77,7 +77,7 @@ fn collect_fees_for_factory( deps.querier.query(&QueryRequest::Wasm(WasmQuery::Smart { contract_addr: factory.to_string(), msg: to_json_binary( - &white_whale::vault_network::vault_factory::QueryMsg::Vaults { + &white_whale_std::vault_network::vault_factory::QueryMsg::Vaults { start_after, limit, }, @@ -183,7 +183,7 @@ pub fn aggregate_fees( deps.querier.query(&QueryRequest::Wasm(WasmQuery::Smart { contract_addr: factory.to_string(), msg: to_json_binary( - &white_whale::vault_network::vault_factory::QueryMsg::Vaults { + &white_whale_std::vault_network::vault_factory::QueryMsg::Vaults { start_after, limit, }, diff --git a/contracts/liquidity_hub/fee_collector/src/contract.rs b/contracts/liquidity_hub/fee_collector/src/contract.rs index c7e8a1c0..9db41c92 100644 --- a/contracts/liquidity_hub/fee_collector/src/contract.rs +++ b/contracts/liquidity_hub/fee_collector/src/contract.rs @@ -7,10 +7,10 @@ use cosmwasm_std::{ use cw2::{get_contract_version, set_contract_version}; use semver::Version; -use white_whale::fee_collector::{ +use white_whale_std::fee_collector::{ Config, ExecuteMsg, ForwardFeesResponse, InstantiateMsg, MigrateMsg, QueryMsg, }; -use white_whale::pool_network::asset::{Asset, AssetInfo, ToCoins}; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, ToCoins}; use crate::error::ContractError; use crate::queries::query_distribution_asset; @@ -153,7 +153,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> { #[cfg(not(tarpaulin_include))] #[entry_point] pub fn migrate(mut deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> { - use white_whale::migrate_guards::check_contract_name; + use white_whale_std::migrate_guards::check_contract_name; let version: Version = CONTRACT_VERSION.parse()?; let storage_version: Version = get_contract_version(deps.storage)?.version.parse()?; diff --git a/contracts/liquidity_hub/fee_collector/src/migrations.rs b/contracts/liquidity_hub/fee_collector/src/migrations.rs index 25a90f9b..cfc4d9b5 100644 --- a/contracts/liquidity_hub/fee_collector/src/migrations.rs +++ b/contracts/liquidity_hub/fee_collector/src/migrations.rs @@ -2,7 +2,7 @@ use cosmwasm_schema::cw_serde; use cosmwasm_std::{Addr, DepsMut, StdError}; use cw_storage_plus::Item; -use white_whale::fee_collector::Config; +use white_whale_std::fee_collector::Config; use crate::state::CONFIG; diff --git a/contracts/liquidity_hub/fee_collector/src/queries.rs b/contracts/liquidity_hub/fee_collector/src/queries.rs index 050539ed..ab6bb4a0 100644 --- a/contracts/liquidity_hub/fee_collector/src/queries.rs +++ b/contracts/liquidity_hub/fee_collector/src/queries.rs @@ -1,12 +1,12 @@ use cosmwasm_std::{to_json_binary, Addr, Deps, QueryRequest, StdResult, WasmQuery}; -use white_whale::fee_collector::{Config, ContractType, FactoryType, FeesFor}; -use white_whale::pool_network; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::pool_network::factory::PairsResponse; -use white_whale::pool_network::pair::ProtocolFeesResponse as ProtocolPairFeesResponse; -use white_whale::vault_network::vault::ProtocolFeesResponse as ProtocolVaultFeesResponse; -use white_whale::vault_network::vault_factory::VaultsResponse; +use white_whale_std::fee_collector::{Config, ContractType, FactoryType, FeesFor}; +use white_whale_std::pool_network; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::factory::PairsResponse; +use white_whale_std::pool_network::pair::ProtocolFeesResponse as ProtocolPairFeesResponse; +use white_whale_std::vault_network::vault::ProtocolFeesResponse as ProtocolVaultFeesResponse; +use white_whale_std::vault_network::vault_factory::VaultsResponse; use crate::state::CONFIG; @@ -75,9 +75,9 @@ fn query_fees_for_vault(deps: &Deps, vault: String, all_time: bool) -> StdResult .querier .query::<ProtocolVaultFeesResponse>(&QueryRequest::Wasm(WasmQuery::Smart { contract_addr: vault, - msg: to_json_binary(&white_whale::vault_network::vault::QueryMsg::ProtocolFees { - all_time, - })?, + msg: to_json_binary( + &white_whale_std::vault_network::vault::QueryMsg::ProtocolFees { all_time }, + )?, }))? .fees; @@ -115,7 +115,7 @@ fn query_fees_for_factory( deps.querier.query(&QueryRequest::Wasm(WasmQuery::Smart { contract_addr: factory.to_string(), msg: to_json_binary( - &white_whale::vault_network::vault_factory::QueryMsg::Vaults { + &white_whale_std::vault_network::vault_factory::QueryMsg::Vaults { start_after, limit, }, @@ -151,10 +151,10 @@ fn query_fees_for_factory( pub(crate) fn query_distribution_asset(deps: Deps) -> StdResult<AssetInfo> { let config: Config = CONFIG.load(deps.storage)?; - let fee_distributor_config: white_whale::fee_distributor::Config = + let fee_distributor_config: white_whale_std::fee_distributor::Config = deps.querier.query(&QueryRequest::Wasm(WasmQuery::Smart { contract_addr: config.fee_distributor.to_string(), - msg: to_json_binary(&white_whale::fee_distributor::QueryMsg::Config {})?, + msg: to_json_binary(&white_whale_std::fee_distributor::QueryMsg::Config {})?, }))?; Ok(fee_distributor_config.distribution_asset) diff --git a/contracts/liquidity_hub/fee_collector/src/state.rs b/contracts/liquidity_hub/fee_collector/src/state.rs index cfc6dadf..4e09a68e 100644 --- a/contracts/liquidity_hub/fee_collector/src/state.rs +++ b/contracts/liquidity_hub/fee_collector/src/state.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{DepsMut, Order, StdResult}; use cw_storage_plus::{Item, Map}; -use white_whale::fee_collector::Config; -use white_whale::fee_distributor::Epoch; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::fee_collector::Config; +use white_whale_std::fee_distributor::Epoch; +use white_whale_std::pool_network::asset::AssetInfo; pub const CONFIG: Item<Config> = Item::new("config"); pub const TMP_ASSET_INFOS: Map<String, AssetInfo> = Map::new("tmp_asset_infos"); diff --git a/contracts/liquidity_hub/fee_collector/src/tests/integration.rs b/contracts/liquidity_hub/fee_collector/src/tests/integration.rs index 11de53d9..db6c7778 100644 --- a/contracts/liquidity_hub/fee_collector/src/tests/integration.rs +++ b/contracts/liquidity_hub/fee_collector/src/tests/integration.rs @@ -7,25 +7,25 @@ use cosmwasm_std::{ use cw20::{BalanceResponse, Cw20Coin, Cw20ExecuteMsg, MinterResponse}; use cw_multi_test::Executor; -use white_whale::epoch_manager::epoch_manager::EpochConfig; -use white_whale::fee::{Fee, VaultFee}; -use white_whale::fee_collector::ExecuteMsg::{ +use white_whale_std::epoch_manager::epoch_manager::EpochConfig; +use white_whale_std::fee::{Fee, VaultFee}; +use white_whale_std::fee_collector::ExecuteMsg::{ AggregateFees, CollectFees, ForwardFees, UpdateConfig, }; -use white_whale::fee_collector::{ +use white_whale_std::fee_collector::{ Contract, ContractType, FactoryType, FeesFor, InstantiateMsg, QueryMsg, }; -use white_whale::fee_distributor::ExecuteMsg::NewEpoch; -use white_whale::fee_distributor::{ClaimableEpochsResponse, Epoch, EpochResponse}; -use white_whale::pool_network::asset::AssetInfo::NativeToken; -use white_whale::pool_network::asset::{Asset, AssetInfo, PairType}; -use white_whale::pool_network::factory::ExecuteMsg::{AddNativeTokenDecimals, CreatePair}; -use white_whale::pool_network::factory::PairsResponse; -use white_whale::pool_network::pair::{PoolFee, PoolResponse, ProtocolFeesResponse}; -use white_whale::pool_network::router::{SwapOperation, SwapRoute}; -use white_whale::vault_network::vault_factory::ExecuteMsg; -use white_whale::whale_lair::BondingWeightResponse; -use white_whale::{pool_network, vault_network}; +use white_whale_std::fee_distributor::ExecuteMsg::NewEpoch; +use white_whale_std::fee_distributor::{ClaimableEpochsResponse, Epoch, EpochResponse}; +use white_whale_std::pool_network::asset::AssetInfo::NativeToken; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, PairType}; +use white_whale_std::pool_network::factory::ExecuteMsg::{AddNativeTokenDecimals, CreatePair}; +use white_whale_std::pool_network::factory::PairsResponse; +use white_whale_std::pool_network::pair::{PoolFee, PoolResponse, ProtocolFeesResponse}; +use white_whale_std::pool_network::router::{SwapOperation, SwapRoute}; +use white_whale_std::vault_network::vault_factory::ExecuteMsg; +use white_whale_std::whale_lair::BondingWeightResponse; +use white_whale_std::{pool_network, vault_network}; use crate::tests::common_integration::{ increase_allowance, mock_app, mock_app_with_balance, mock_creator, @@ -409,7 +409,7 @@ fn collect_all_factories_cw20_fees_successfully() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: "whale_lair".clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(1), @@ -428,7 +428,7 @@ fn collect_all_factories_cw20_fees_successfully() { app.execute_contract( creator.sender.clone(), fee_collector_address.clone(), - &white_whale::fee_collector::ExecuteMsg::UpdateConfig { + &white_whale_std::fee_collector::ExecuteMsg::UpdateConfig { owner: None, pool_router: None, fee_distributor: Some(fee_distributor_address.to_string()), @@ -1398,7 +1398,7 @@ fn collect_pools_native_fees_successfully() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: "whale_lair".clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(1), @@ -1417,7 +1417,7 @@ fn collect_pools_native_fees_successfully() { app.execute_contract( creator.sender.clone(), fee_collector_address.clone(), - &white_whale::fee_collector::ExecuteMsg::UpdateConfig { + &white_whale_std::fee_collector::ExecuteMsg::UpdateConfig { owner: None, pool_router: None, fee_distributor: Some(fee_distributor_address.to_string()), @@ -2049,7 +2049,7 @@ fn collect_fees_for_vault() { .instantiate_contract( vault_factory_id, creator.clone().sender, - &white_whale::vault_network::vault_factory::InstantiateMsg { + &white_whale_std::vault_network::vault_factory::InstantiateMsg { owner: creator.clone().sender.into_string(), vault_id, token_id, @@ -2116,7 +2116,7 @@ fn collect_fees_for_vault() { app.execute_contract( creator.clone().sender.clone(), vaults[i].clone(), - &white_whale::vault_network::vault::ExecuteMsg::Deposit { + &white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(400_000_000u128), }, &[Coin { @@ -2167,20 +2167,22 @@ fn collect_fees_for_vault() { // Perform some flashloans for (i, coin) in native_tokens.iter().enumerate() { // verify the protocol fees are zero before the flashloan - let query_protocol_fees_res: white_whale::vault_network::vault::ProtocolFeesResponse = app - .wrap() - .query_wasm_smart( - &vaults[i], - &white_whale::vault_network::vault::QueryMsg::ProtocolFees { all_time: false }, - ) - .unwrap(); + let query_protocol_fees_res: white_whale_std::vault_network::vault::ProtocolFeesResponse = + app.wrap() + .query_wasm_smart( + &vaults[i], + &white_whale_std::vault_network::vault::QueryMsg::ProtocolFees { + all_time: false, + }, + ) + .unwrap(); assert_eq!(query_protocol_fees_res.fees.amount, Uint128::zero()); // make a dummy message which transfers desired amount back to vault app.execute_contract( dummy_flash_loan_address.clone(), vaults[i].clone(), - &white_whale::vault_network::vault::ExecuteMsg::FlashLoan { + &white_whale_std::vault_network::vault::ExecuteMsg::FlashLoan { amount: Uint128::new(flash_loan_value), msg: to_json_binary(&BankMsg::Send { to_address: vaults[i].to_string(), @@ -2194,13 +2196,15 @@ fn collect_fees_for_vault() { .unwrap(); // verify the protocol fees where collected after flashloan - let query_protocol_fees_res: white_whale::vault_network::vault::ProtocolFeesResponse = app - .wrap() - .query_wasm_smart( - &vaults[i], - &white_whale::vault_network::vault::QueryMsg::ProtocolFees { all_time: false }, - ) - .unwrap(); + let query_protocol_fees_res: white_whale_std::vault_network::vault::ProtocolFeesResponse = + app.wrap() + .query_wasm_smart( + &vaults[i], + &white_whale_std::vault_network::vault::QueryMsg::ProtocolFees { + all_time: false, + }, + ) + .unwrap(); assert!(query_protocol_fees_res.fees.amount > Uint128::zero()); assert_eq!( computed_protocol_fees, @@ -2241,13 +2245,15 @@ fn collect_fees_for_vault() { // verify the protocol fees are zero after collecting the fees from the flashloans for vault in vaults.clone() { - let query_protocol_fees_res: white_whale::vault_network::vault::ProtocolFeesResponse = app - .wrap() - .query_wasm_smart( - &vault, - &white_whale::vault_network::vault::QueryMsg::ProtocolFees { all_time: false }, - ) - .unwrap(); + let query_protocol_fees_res: white_whale_std::vault_network::vault::ProtocolFeesResponse = + app.wrap() + .query_wasm_smart( + &vault, + &white_whale_std::vault_network::vault::QueryMsg::ProtocolFees { + all_time: false, + }, + ) + .unwrap(); assert_eq!(query_protocol_fees_res.fees.amount, Uint128::zero()); } @@ -2345,7 +2351,7 @@ fn aggregate_fees_for_vault() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: "whale_lair".clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(1), @@ -2366,7 +2372,7 @@ fn aggregate_fees_for_vault() { app.execute_contract( creator.sender.clone(), fee_collector_address.clone(), - &white_whale::fee_collector::ExecuteMsg::UpdateConfig { + &white_whale_std::fee_collector::ExecuteMsg::UpdateConfig { owner: None, pool_router: None, fee_distributor: Some(fee_distributor_address.to_string()), @@ -2381,7 +2387,7 @@ fn aggregate_fees_for_vault() { .instantiate_contract( vault_factory_id, creator.clone().sender, - &white_whale::vault_network::vault_factory::InstantiateMsg { + &white_whale_std::vault_network::vault_factory::InstantiateMsg { owner: creator.clone().sender.into_string(), vault_id, token_id, @@ -2544,7 +2550,7 @@ fn aggregate_fees_for_vault() { app.execute_contract( creator.clone().sender.clone(), vaults[i].clone(), - &white_whale::vault_network::vault::ExecuteMsg::Deposit { + &white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(400_000_000u128), }, &[Coin { @@ -2595,20 +2601,22 @@ fn aggregate_fees_for_vault() { // Perform some flashloans for (i, coin) in native_tokens.iter().enumerate() { // verify the protocol fees are zero before the flashloan - let query_protocol_fees_res: white_whale::vault_network::vault::ProtocolFeesResponse = app - .wrap() - .query_wasm_smart( - &vaults[i], - &white_whale::vault_network::vault::QueryMsg::ProtocolFees { all_time: false }, - ) - .unwrap(); + let query_protocol_fees_res: white_whale_std::vault_network::vault::ProtocolFeesResponse = + app.wrap() + .query_wasm_smart( + &vaults[i], + &white_whale_std::vault_network::vault::QueryMsg::ProtocolFees { + all_time: false, + }, + ) + .unwrap(); assert_eq!(query_protocol_fees_res.fees.amount, Uint128::zero()); // make a dummy message which transfers desired amount back to vault app.execute_contract( dummy_flash_loan_address.clone(), vaults[i].clone(), - &white_whale::vault_network::vault::ExecuteMsg::FlashLoan { + &white_whale_std::vault_network::vault::ExecuteMsg::FlashLoan { amount: Uint128::new(flash_loan_value), msg: to_json_binary(&BankMsg::Send { to_address: vaults[i].to_string(), @@ -2622,13 +2630,15 @@ fn aggregate_fees_for_vault() { .unwrap(); // verify the protocol fees where collected after flashloan - let query_protocol_fees_res: white_whale::vault_network::vault::ProtocolFeesResponse = app - .wrap() - .query_wasm_smart( - &vaults[i], - &white_whale::vault_network::vault::QueryMsg::ProtocolFees { all_time: false }, - ) - .unwrap(); + let query_protocol_fees_res: white_whale_std::vault_network::vault::ProtocolFeesResponse = + app.wrap() + .query_wasm_smart( + &vaults[i], + &white_whale_std::vault_network::vault::QueryMsg::ProtocolFees { + all_time: false, + }, + ) + .unwrap(); assert!(query_protocol_fees_res.fees.amount > Uint128::zero()); assert_eq!( computed_protocol_fees, @@ -2669,13 +2679,15 @@ fn aggregate_fees_for_vault() { // verify the protocol fees are zero after collecting the fees from the flashloans for vault in vaults.clone() { - let query_protocol_fees_res: white_whale::vault_network::vault::ProtocolFeesResponse = app - .wrap() - .query_wasm_smart( - &vault, - &white_whale::vault_network::vault::QueryMsg::ProtocolFees { all_time: false }, - ) - .unwrap(); + let query_protocol_fees_res: white_whale_std::vault_network::vault::ProtocolFeesResponse = + app.wrap() + .query_wasm_smart( + &vault, + &white_whale_std::vault_network::vault::QueryMsg::ProtocolFees { + all_time: false, + }, + ) + .unwrap(); assert_eq!(query_protocol_fees_res.fees.amount, Uint128::zero()); } @@ -3073,7 +3085,7 @@ fn collect_and_distribute_fees_successfully() { .instantiate_contract( whale_lair_id, creator.clone().sender, - &white_whale::whale_lair::InstantiateMsg { + &white_whale_std::whale_lair::InstantiateMsg { unbonding_period: Uint64::new(1_000_000_000_000u64), growth_rate: Decimal::one(), bonding_assets: vec![ @@ -3095,7 +3107,7 @@ fn collect_and_distribute_fees_successfully() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: whale_lair_address.clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(2), @@ -3117,7 +3129,7 @@ fn collect_and_distribute_fees_successfully() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::UpdateConfig { + &white_whale_std::whale_lair::ExecuteMsg::UpdateConfig { fee_distributor_addr: Some(fee_distributor_address.to_string()), owner: None, unbonding_period: None, @@ -3337,7 +3349,7 @@ fn collect_and_distribute_fees_successfully() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); // it means no epoch has been created yet @@ -3362,7 +3374,7 @@ fn collect_and_distribute_fees_successfully() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); assert_eq!(fee_distributor_current_epoch_query.epoch.id, Uint64::one()); @@ -3490,7 +3502,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .instantiate_contract( whale_lair_id, creator.clone().sender, - &white_whale::whale_lair::InstantiateMsg { + &white_whale_std::whale_lair::InstantiateMsg { unbonding_period: Uint64::new(1_000_000_000_000u64), growth_rate: Decimal::one(), bonding_assets: vec![ @@ -3512,7 +3524,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: whale_lair_address.clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(1), @@ -3534,7 +3546,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::UpdateConfig { + &white_whale_std::whale_lair::ExecuteMsg::UpdateConfig { fee_distributor_addr: Some(fee_distributor_address.to_string()), owner: None, unbonding_period: None, @@ -3706,7 +3718,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -3724,7 +3736,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e app.execute_contract( Addr::unchecked("other").clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -3746,7 +3758,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( whale_lair_address.clone(), - &white_whale::whale_lair::QueryMsg::Weight { + &white_whale_std::whale_lair::QueryMsg::Weight { address: user.to_string(), // timestamp: Some(Timestamp::from_nanos(1678888800_000000000u64-1)), global_index: None, @@ -3803,7 +3815,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: creator.sender.to_string(), }, ) @@ -3816,7 +3828,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); assert_eq!(epoch_1.epoch.id, Uint64::one()); @@ -3838,7 +3850,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( whale_lair_address.clone(), - &white_whale::whale_lair::QueryMsg::Weight { + &white_whale_std::whale_lair::QueryMsg::Weight { address: user.to_string(), // timestamp: Some(Timestamp::from_nanos(1678888800_000000000u64-1)), global_index: None, @@ -3879,7 +3891,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( whale_lair_address.clone(), - &white_whale::whale_lair::QueryMsg::Weight { + &white_whale_std::whale_lair::QueryMsg::Weight { address: creator.sender.to_string(), // timestamp: Some(Timestamp::from_nanos(1678888800_000000000u64-1)), global_index: None, @@ -3908,7 +3920,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e app.execute_contract( creator.sender.clone(), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -3935,7 +3947,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e app.execute_contract( Addr::unchecked("other"), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -3951,7 +3963,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -3981,7 +3993,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -3994,7 +4006,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { id: Uint64::one() }, + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::one() }, ) .unwrap(); assert!(expired_epoch_res.epoch.available.is_empty()); @@ -4020,7 +4032,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( whale_lair_address.clone(), - &white_whale::whale_lair::QueryMsg::Weight { + &white_whale_std::whale_lair::QueryMsg::Weight { address: creator.sender.to_string(), // timestamp: Some(Timestamp::from_nanos(1678888800_000000000u64-1)), global_index: None, @@ -4034,7 +4046,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( whale_lair_address.clone(), - &white_whale::whale_lair::QueryMsg::Weight { + &white_whale_std::whale_lair::QueryMsg::Weight { address: Addr::unchecked("other").to_string(), // timestamp: Some(Timestamp::from_nanos(1678888800_000000000u64-1)), global_index: None, @@ -4099,7 +4111,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e app.execute_contract( creator.sender.clone(), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -4126,7 +4138,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e app.execute_contract( Addr::unchecked("other"), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -4143,7 +4155,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -4174,7 +4186,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -4187,7 +4199,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::from(2u64), }, ) @@ -4218,7 +4230,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e // assert!(total_amount_new_epoch - total_amount_expired > Uint128::zero()); // // Query and verify what is due to user 1 - // let claimable: ClaimableEpochsResponse = app.wrap().query_wasm_smart(fee_distributor_address.clone(), &white_whale::fee_distributor::QueryMsg::Claimable { address: creator.sender.to_string() }).unwrap(); + // let claimable: ClaimableEpochsResponse = app.wrap().query_wasm_smart(fee_distributor_address.clone(), &white_whale_std::fee_distributor::QueryMsg::Claimable { address: creator.sender.to_string() }).unwrap(); // println!(" -> claimable: {:?}", claimable); // claim some rewards let uwhale_balance_before_claiming = app @@ -4230,7 +4242,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e app.execute_contract( Addr::unchecked("other"), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -4256,7 +4268,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e app.execute_contract( creator.sender.clone(), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -4290,7 +4302,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::from(1u64), }, ) @@ -4299,7 +4311,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::from(2u64), }, ) @@ -4308,7 +4320,7 @@ fn collect_and_dist_fees_where_one_bonder_is_increasing_weight_no_claims_until_e .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::from(3u64), }, ) @@ -4457,7 +4469,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { .instantiate_contract( whale_lair_id, creator.clone().sender, - &white_whale::whale_lair::InstantiateMsg { + &white_whale_std::whale_lair::InstantiateMsg { unbonding_period: Uint64::new(1_000_000_000_000u64), growth_rate: Decimal::one(), bonding_assets: vec![ @@ -4479,7 +4491,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: whale_lair_address.clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(1), @@ -4501,7 +4513,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::UpdateConfig { + &white_whale_std::whale_lair::ExecuteMsg::UpdateConfig { fee_distributor_addr: Some(fee_distributor_address.to_string()), owner: None, unbonding_period: None, @@ -4672,7 +4684,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "bWHALE".to_string(), @@ -4690,7 +4702,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { app.execute_contract( Addr::unchecked("other").clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -4750,7 +4762,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); assert_eq!(expiring_epoch_res.epoch.id, Uint64::one()); @@ -4804,7 +4816,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -4817,7 +4829,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { id: Uint64::one() }, + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::one() }, ) .unwrap(); assert!(expired_epoch_res.epoch.available.is_empty()); @@ -4849,7 +4861,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { app.execute_contract( creator.sender.clone(), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -4867,7 +4879,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { .execute_contract( creator.sender.clone(), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap_err(); @@ -4882,7 +4894,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -4898,7 +4910,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { app.execute_contract( Addr::unchecked("other"), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -4907,7 +4919,7 @@ fn collect_and_distribute_fees_with_expiring_epoch_successfully() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); println!("{:?}", current_epoch_res); @@ -5031,7 +5043,7 @@ fn create_epoch_unsuccessfully() { .instantiate_contract( whale_lair_id, creator.clone().sender, - &white_whale::whale_lair::InstantiateMsg { + &white_whale_std::whale_lair::InstantiateMsg { unbonding_period: Uint64::new(1_000_000_000_000u64), growth_rate: Decimal::one(), bonding_assets: vec![ @@ -5053,7 +5065,7 @@ fn create_epoch_unsuccessfully() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: whale_lair_address.clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(1), @@ -5335,7 +5347,7 @@ fn aggregate_fees_unsuccessfully() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: "whale_lair".to_string(), fee_collector_addr: fee_collector_address.to_string(), grace_period: Uint64::new(5), @@ -5536,7 +5548,7 @@ fn decrease_grace_period_fee_distributor() { .instantiate_contract( whale_lair_id, creator.clone().sender, - &white_whale::whale_lair::InstantiateMsg { + &white_whale_std::whale_lair::InstantiateMsg { unbonding_period: Uint64::new(1_000_000_000_000u64), growth_rate: Decimal::one(), bonding_assets: vec![ @@ -5558,7 +5570,7 @@ fn decrease_grace_period_fee_distributor() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: whale_lair_address.clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(2), @@ -5818,7 +5830,7 @@ fn decrease_grace_period_fee_distributor() { .execute_contract( creator.sender.clone(), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::UpdateConfig { + &white_whale_std::fee_distributor::ExecuteMsg::UpdateConfig { owner: None, bonding_contract_addr: None, fee_collector_addr: None, @@ -5958,7 +5970,7 @@ fn users_cannot_claim_rewards_from_past_epochs() { .instantiate_contract( whale_lair_id, creator.clone().sender, - &white_whale::whale_lair::InstantiateMsg { + &white_whale_std::whale_lair::InstantiateMsg { unbonding_period: Uint64::new(1_000_000_000_000u64), growth_rate: Decimal::one(), bonding_assets: vec![ @@ -5980,7 +5992,7 @@ fn users_cannot_claim_rewards_from_past_epochs() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: whale_lair_address.clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(3u64), @@ -6002,7 +6014,7 @@ fn users_cannot_claim_rewards_from_past_epochs() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::UpdateConfig { + &white_whale_std::whale_lair::ExecuteMsg::UpdateConfig { fee_distributor_addr: Some(fee_distributor_address.to_string()), owner: None, unbonding_period: None, @@ -6173,7 +6185,7 @@ fn users_cannot_claim_rewards_from_past_epochs() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "bWHALE".to_string(), @@ -6233,7 +6245,7 @@ fn users_cannot_claim_rewards_from_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); assert_eq!(expiring_epoch_res.epoch.id, Uint64::one()); @@ -6286,7 +6298,7 @@ fn users_cannot_claim_rewards_from_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -6298,7 +6310,7 @@ fn users_cannot_claim_rewards_from_past_epochs() { app.execute_contract( Addr::unchecked("other").clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -6318,7 +6330,7 @@ fn users_cannot_claim_rewards_from_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "other".to_string(), }, ) @@ -6368,7 +6380,7 @@ fn users_cannot_claim_rewards_from_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -6380,7 +6392,7 @@ fn users_cannot_claim_rewards_from_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "other".to_string(), }, ) @@ -6394,7 +6406,7 @@ fn users_cannot_claim_rewards_from_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: creator.sender.clone().to_string(), }, ) @@ -6525,7 +6537,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .instantiate_contract( whale_lair_id, creator.clone().sender, - &white_whale::whale_lair::InstantiateMsg { + &white_whale_std::whale_lair::InstantiateMsg { unbonding_period: Uint64::new(1_000_000_000_000u64), growth_rate: Decimal::one(), bonding_assets: vec![ @@ -6547,7 +6559,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: whale_lair_address.clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(3u64), @@ -6569,7 +6581,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::UpdateConfig { + &white_whale_std::whale_lair::ExecuteMsg::UpdateConfig { fee_distributor_addr: Some(fee_distributor_address.to_string()), owner: None, unbonding_period: None, @@ -6740,7 +6752,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "bWHALE".to_string(), @@ -6758,7 +6770,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { app.execute_contract( Addr::unchecked("other").clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -6818,7 +6830,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); assert_eq!(expiring_epoch_res.epoch.id, Uint64::one()); @@ -6871,7 +6883,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -6884,7 +6896,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "creator".to_string(), }, ) @@ -6896,7 +6908,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "other".to_string(), }, ) @@ -6908,7 +6920,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { app.execute_contract( creator.sender.clone(), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -6917,7 +6929,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "creator".to_string(), }, ) @@ -6930,7 +6942,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::new(2u64), }, ) @@ -6942,7 +6954,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::new(1u64), }, ) @@ -6954,7 +6966,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "other".to_string(), }, ) @@ -6964,7 +6976,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Unbond { + &white_whale_std::whale_lair::ExecuteMsg::Unbond { asset: Asset { info: AssetInfo::NativeToken { denom: "bWHALE".to_string(), @@ -7018,7 +7030,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -7030,7 +7042,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "other".to_string(), }, ) @@ -7039,7 +7051,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { app.execute_contract( Addr::unchecked("other"), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -7048,7 +7060,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "creator".to_string(), }, ) @@ -7056,7 +7068,7 @@ fn user_can_claim_even_when_his_weight_increases_for_past_epochs() { app.execute_contract( Addr::unchecked("creator"), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -7184,7 +7196,7 @@ fn user_weight_accounts_for_unbondings() { .instantiate_contract( whale_lair_id, creator.clone().sender, - &white_whale::whale_lair::InstantiateMsg { + &white_whale_std::whale_lair::InstantiateMsg { unbonding_period: Uint64::new(1_000_000_000_000u64), growth_rate: Decimal::one(), bonding_assets: vec![ @@ -7206,7 +7218,7 @@ fn user_weight_accounts_for_unbondings() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: whale_lair_address.clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(3u64), @@ -7228,7 +7240,7 @@ fn user_weight_accounts_for_unbondings() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::UpdateConfig { + &white_whale_std::whale_lair::ExecuteMsg::UpdateConfig { fee_distributor_addr: Some(fee_distributor_address.to_string()), owner: None, unbonding_period: None, @@ -7401,7 +7413,7 @@ fn user_weight_accounts_for_unbondings() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "bWHALE".to_string(), @@ -7419,7 +7431,7 @@ fn user_weight_accounts_for_unbondings() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -7437,7 +7449,7 @@ fn user_weight_accounts_for_unbondings() { app.execute_contract( Addr::unchecked("other").clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -7497,7 +7509,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); assert_eq!(expiring_epoch_res.epoch.id, Uint64::one()); @@ -7550,7 +7562,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -7563,7 +7575,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "creator".to_string(), }, ) @@ -7575,7 +7587,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "other".to_string(), }, ) @@ -7587,7 +7599,7 @@ fn user_weight_accounts_for_unbondings() { app.execute_contract( creator.sender.clone(), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -7596,7 +7608,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "creator".to_string(), }, ) @@ -7609,7 +7621,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::new(2u64), }, ) @@ -7621,7 +7633,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::new(1u64), }, ) @@ -7633,7 +7645,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "other".to_string(), }, ) @@ -7643,7 +7655,7 @@ fn user_weight_accounts_for_unbondings() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Unbond { + &white_whale_std::whale_lair::ExecuteMsg::Unbond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -7698,7 +7710,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); assert_eq!(new_epoch_res.epoch.id, Uint64::new(3u64)); @@ -7709,7 +7721,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "other".to_string(), }, ) @@ -7720,7 +7732,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: "creator".to_string(), }, ) @@ -7730,7 +7742,7 @@ fn user_weight_accounts_for_unbondings() { app.execute_contract( Addr::unchecked("creator"), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -7739,7 +7751,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::new(3u64), }, ) @@ -7769,7 +7781,7 @@ fn user_weight_accounts_for_unbondings() { app.execute_contract( Addr::unchecked("other"), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -7778,7 +7790,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::new(3u64), }, ) @@ -7814,7 +7826,7 @@ fn user_weight_accounts_for_unbondings() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Unbond { + &white_whale_std::whale_lair::ExecuteMsg::Unbond { asset: Asset { info: AssetInfo::NativeToken { denom: "bWHALE".to_string(), @@ -7872,7 +7884,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); assert_eq!(new_epoch_res.epoch.id, Uint64::new(4u64)); @@ -7883,7 +7895,7 @@ fn user_weight_accounts_for_unbondings() { app.execute_contract( Addr::unchecked("creator"), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -7892,7 +7904,7 @@ fn user_weight_accounts_for_unbondings() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::new(4u64), }, ) @@ -8040,7 +8052,7 @@ fn users_can_claim_even_when_global_index_was_taken_after_epoch_was_created() { .instantiate_contract( whale_lair_id, creator.clone().sender, - &white_whale::whale_lair::InstantiateMsg { + &white_whale_std::whale_lair::InstantiateMsg { unbonding_period: Uint64::new(1_000_000_000_000u64), growth_rate: Decimal::one(), bonding_assets: vec![ @@ -8062,7 +8074,7 @@ fn users_can_claim_even_when_global_index_was_taken_after_epoch_was_created() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: whale_lair_address.clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(3u64), @@ -8084,7 +8096,7 @@ fn users_can_claim_even_when_global_index_was_taken_after_epoch_was_created() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::UpdateConfig { + &white_whale_std::whale_lair::ExecuteMsg::UpdateConfig { fee_distributor_addr: Some(fee_distributor_address.to_string()), owner: None, unbonding_period: None, @@ -8262,7 +8274,7 @@ fn users_can_claim_even_when_global_index_was_taken_after_epoch_was_created() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "bWHALE".to_string(), @@ -8322,7 +8334,7 @@ fn users_can_claim_even_when_global_index_was_taken_after_epoch_was_created() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -8373,7 +8385,7 @@ fn users_can_claim_even_when_global_index_was_taken_after_epoch_was_created() { .execute_contract( Addr::unchecked("other").clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -8407,7 +8419,7 @@ fn users_can_claim_even_when_global_index_was_taken_after_epoch_was_created() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -8424,7 +8436,7 @@ fn users_can_claim_even_when_global_index_was_taken_after_epoch_was_created() { app.execute_contract( Addr::unchecked("other").clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -8562,7 +8574,7 @@ fn collect_distribute_with_unbonders() { .instantiate_contract( whale_lair_id, creator.clone().sender, - &white_whale::whale_lair::InstantiateMsg { + &white_whale_std::whale_lair::InstantiateMsg { unbonding_period: Uint64::new(1u64), growth_rate: Decimal::one(), bonding_assets: vec![ @@ -8584,7 +8596,7 @@ fn collect_distribute_with_unbonders() { .instantiate_contract( fee_distributor_id, creator.clone().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: whale_lair_address.clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(1), @@ -8606,7 +8618,7 @@ fn collect_distribute_with_unbonders() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::UpdateConfig { + &white_whale_std::whale_lair::ExecuteMsg::UpdateConfig { fee_distributor_addr: Some(fee_distributor_address.to_string()), owner: None, unbonding_period: None, @@ -8778,7 +8790,7 @@ fn collect_distribute_with_unbonders() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -8796,7 +8808,7 @@ fn collect_distribute_with_unbonders() { app.execute_contract( Addr::unchecked("other").clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Bond { + &white_whale_std::whale_lair::ExecuteMsg::Bond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -8858,7 +8870,7 @@ fn collect_distribute_with_unbonders() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); assert_eq!(expiring_epoch_res.epoch.id, Uint64::one()); @@ -8883,7 +8895,7 @@ fn collect_distribute_with_unbonders() { // .wrap() // .query_wasm_smart( // whale_lair_address.clone(), - // &white_whale::whale_lair::QueryMsg::Weight { + // &white_whale_std::whale_lair::QueryMsg::Weight { // address: user.to_string(), // // timestamp: Some(Timestamp::from_nanos(1678888800_000000000u64-1)), // global_weight: None, @@ -8924,7 +8936,7 @@ fn collect_distribute_with_unbonders() { .wrap() .query_wasm_smart( whale_lair_address.clone(), - &white_whale::whale_lair::QueryMsg::Weight { + &white_whale_std::whale_lair::QueryMsg::Weight { address: creator.sender.to_string(), // timestamp: Some(Timestamp::from_nanos(1678888800_000000000u64-1)), global_index: None, @@ -8955,7 +8967,7 @@ fn collect_distribute_with_unbonders() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -8968,7 +8980,7 @@ fn collect_distribute_with_unbonders() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { id: Uint64::one() }, + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::one() }, ) .unwrap(); assert!(expired_epoch_res.epoch.available.is_empty()); @@ -8977,7 +8989,7 @@ fn collect_distribute_with_unbonders() { // .wrap() // .query_wasm_smart( // whale_lair_address.clone(), - // &white_whale::whale_lair::QueryMsg::Weight { + // &white_whale_std::whale_lair::QueryMsg::Weight { // address: creator.sender.to_string(), // // timestamp: Some(Timestamp::from_nanos(1678888800_000000000u64-1)), // global_weight: None, @@ -8991,7 +9003,7 @@ fn collect_distribute_with_unbonders() { // .wrap() // .query_wasm_smart( // whale_lair_address.clone(), - // &white_whale::whale_lair::QueryMsg::Weight { + // &white_whale_std::whale_lair::QueryMsg::Weight { // address: Addr::unchecked("other").to_string(), // // timestamp: Some(Timestamp::from_nanos(1678888800_000000000u64-1)), // global_weight: None, @@ -9030,7 +9042,7 @@ fn collect_distribute_with_unbonders() { app.execute_contract( creator.sender.clone(), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -9052,7 +9064,7 @@ fn collect_distribute_with_unbonders() { app.execute_contract( creator.sender.clone(), whale_lair_address.clone(), - &white_whale::whale_lair::ExecuteMsg::Unbond { + &white_whale_std::whale_lair::ExecuteMsg::Unbond { asset: Asset { info: AssetInfo::NativeToken { denom: "ampWHALE".to_string(), @@ -9112,7 +9124,7 @@ fn collect_distribute_with_unbonders() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ) .unwrap(); @@ -9125,7 +9137,7 @@ fn collect_distribute_with_unbonders() { .wrap() .query_wasm_smart( fee_distributor_address.clone(), - &white_whale::fee_distributor::QueryMsg::Epoch { + &white_whale_std::fee_distributor::QueryMsg::Epoch { id: Uint64::from(2u64), }, ) @@ -9155,7 +9167,7 @@ fn collect_distribute_with_unbonders() { // assert!(total_amount_new_epoch - total_amount_expired > Uint128::zero()); // // Query and verify what is due to user 1 - // let claimable: ClaimableEpochsResponse = app.wrap().query_wasm_smart(fee_distributor_address.clone(), &white_whale::fee_distributor::QueryMsg::Claimable { address: creator.sender.to_string() }).unwrap(); + // let claimable: ClaimableEpochsResponse = app.wrap().query_wasm_smart(fee_distributor_address.clone(), &white_whale_std::fee_distributor::QueryMsg::Claimable { address: creator.sender.to_string() }).unwrap(); // println!(" -> claimable: {:?}", claimable); // claim some rewards let uwhale_balance_before_claiming = app @@ -9167,7 +9179,7 @@ fn collect_distribute_with_unbonders() { app.execute_contract( Addr::unchecked("other"), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); @@ -9192,7 +9204,7 @@ fn collect_distribute_with_unbonders() { app.execute_contract( creator.sender.clone(), fee_distributor_address.clone(), - &white_whale::fee_distributor::ExecuteMsg::Claim {}, + &white_whale_std::fee_distributor::ExecuteMsg::Claim {}, &[], ) .unwrap(); diff --git a/contracts/liquidity_hub/fee_collector/src/tests/testing.rs b/contracts/liquidity_hub/fee_collector/src/tests/testing.rs index dcfbd99d..d0d03d39 100644 --- a/contracts/liquidity_hub/fee_collector/src/tests/testing.rs +++ b/contracts/liquidity_hub/fee_collector/src/tests/testing.rs @@ -4,10 +4,10 @@ use cw2::{get_contract_version, set_contract_version, ContractVersion}; use std::env; use crate::contract::{execute, instantiate, migrate, query}; -use white_whale::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::mock_querier::mock_dependencies; use crate::ContractError; -use white_whale::fee_collector::{Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use white_whale_std::fee_collector::{Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; pub fn mock_instantiation(deps: DepsMut, info: MessageInfo) -> Result<Response, ContractError> { let msg = InstantiateMsg {}; diff --git a/contracts/liquidity_hub/fee_distributor/Cargo.toml b/contracts/liquidity_hub/fee_distributor/Cargo.toml index c32358b4..224a1537 100644 --- a/contracts/liquidity_hub/fee_distributor/Cargo.toml +++ b/contracts/liquidity_hub/fee_distributor/Cargo.toml @@ -24,9 +24,9 @@ crate-type = ["cdylib", "rlib"] [features] # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] -injective = ["white-whale/injective"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] [dependencies] @@ -39,7 +39,7 @@ schemars.workspace = true serde.workspace = true semver.workspace = true thiserror.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true [dev-dependencies] cw-multi-test.workspace = true diff --git a/contracts/liquidity_hub/fee_distributor/src/bin/fee_distributor_schema.rs b/contracts/liquidity_hub/fee_distributor/src/bin/fee_distributor_schema.rs index dc3f6e50..34a9927e 100644 --- a/contracts/liquidity_hub/fee_distributor/src/bin/fee_distributor_schema.rs +++ b/contracts/liquidity_hub/fee_distributor/src/bin/fee_distributor_schema.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::write_api; -use white_whale::fee_distributor::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use white_whale_std::fee_distributor::{ExecuteMsg, InstantiateMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/fee_distributor/src/commands.rs b/contracts/liquidity_hub/fee_distributor/src/commands.rs index 8169abdc..554dafb3 100644 --- a/contracts/liquidity_hub/fee_distributor/src/commands.rs +++ b/contracts/liquidity_hub/fee_distributor/src/commands.rs @@ -2,12 +2,12 @@ use cosmwasm_std::{ to_json_binary, CosmosMsg, DepsMut, Env, MessageInfo, QueryRequest, ReplyOn, Response, StdError, SubMsg, Timestamp, Uint64, WasmMsg, WasmQuery, }; -use white_whale::epoch_manager::epoch_manager::EpochConfig; +use white_whale_std::epoch_manager::epoch_manager::EpochConfig; -use white_whale::fee_distributor::Epoch; -use white_whale::pool_network::asset; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::whale_lair::{BondingWeightResponse, QueryMsg}; +use white_whale_std::fee_distributor::Epoch; +use white_whale_std::pool_network::asset; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::whale_lair::{BondingWeightResponse, QueryMsg}; use crate::contract::EPOCH_CREATION_REPLY_ID; use crate::helpers::{validate_epoch_config, validate_grace_period}; @@ -59,7 +59,7 @@ pub fn create_new_epoch(deps: DepsMut, env: Env) -> Result<Response, ContractErr id: EPOCH_CREATION_REPLY_ID, msg: CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: config.fee_collector_addr.to_string(), - msg: to_json_binary(&white_whale::fee_collector::ExecuteMsg::ForwardFees { + msg: to_json_binary(&white_whale_std::fee_collector::ExecuteMsg::ForwardFees { epoch: new_epoch.clone(), forward_fees_as: config.distribution_asset, })?, diff --git a/contracts/liquidity_hub/fee_distributor/src/contract.rs b/contracts/liquidity_hub/fee_distributor/src/contract.rs index 6488e0b7..4863ebbd 100644 --- a/contracts/liquidity_hub/fee_distributor/src/contract.rs +++ b/contracts/liquidity_hub/fee_distributor/src/contract.rs @@ -12,13 +12,13 @@ use crate::helpers::{validate_epoch_config, validate_grace_period}; use crate::state::{get_expiring_epoch, CONFIG, EPOCHS}; use crate::{commands, migrations, queries, state}; use semver::Version; -use white_whale::fee_collector::ForwardFeesResponse; -use white_whale::fee_distributor::{ +use white_whale_std::fee_collector::ForwardFeesResponse; +use white_whale_std::fee_distributor::{ Config, Epoch, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, }; -use white_whale::pool_network::asset; -use white_whale::whale_lair::GlobalIndex; -use white_whale::whale_lair::QueryMsg as LairQueryMsg; +use white_whale_std::pool_network::asset; +use white_whale_std::whale_lair::GlobalIndex; +use white_whale_std::whale_lair::QueryMsg as LairQueryMsg; // version info for migration info const CONTRACT_NAME: &str = "white_whale-fee_distributor"; @@ -167,7 +167,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> { #[cfg(not(tarpaulin_include))] #[cfg_attr(not(feature = "library"), entry_point)] pub fn migrate(mut deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> { - use white_whale::migrate_guards::check_contract_name; + use white_whale_std::migrate_guards::check_contract_name; check_contract_name(deps.storage, CONTRACT_NAME.to_string())?; let version: Version = CONTRACT_VERSION.parse()?; diff --git a/contracts/liquidity_hub/fee_distributor/src/helpers.rs b/contracts/liquidity_hub/fee_distributor/src/helpers.rs index 9a3e59dd..807161fa 100644 --- a/contracts/liquidity_hub/fee_distributor/src/helpers.rs +++ b/contracts/liquidity_hub/fee_distributor/src/helpers.rs @@ -1,7 +1,7 @@ use cosmwasm_std::Uint64; use crate::ContractError; -use white_whale::epoch_manager::epoch_manager::EpochConfig; +use white_whale_std::epoch_manager::epoch_manager::EpochConfig; const MAX_GRACE_PERIOD: u64 = 30u64; pub const DAY_IN_NANOSECONDS: u64 = 86_400_000_000_000u64; diff --git a/contracts/liquidity_hub/fee_distributor/src/migrations.rs b/contracts/liquidity_hub/fee_distributor/src/migrations.rs index 326b6c31..43cf3755 100644 --- a/contracts/liquidity_hub/fee_distributor/src/migrations.rs +++ b/contracts/liquidity_hub/fee_distributor/src/migrations.rs @@ -7,11 +7,11 @@ use cosmwasm_std::{ }; use cw_storage_plus::Map; -use white_whale::fee_distributor::Epoch; -use white_whale::pool_network::asset; -use white_whale::pool_network::asset::Asset; -use white_whale::whale_lair::GlobalIndex; -use white_whale::whale_lair::QueryMsg as LairQueryMsg; +use white_whale_std::fee_distributor::Epoch; +use white_whale_std::pool_network::asset; +use white_whale_std::pool_network::asset::Asset; +use white_whale_std::whale_lair::GlobalIndex; +use white_whale_std::whale_lair::QueryMsg as LairQueryMsg; use crate::state::{get_claimable_epochs, CONFIG, EPOCHS}; diff --git a/contracts/liquidity_hub/fee_distributor/src/queries.rs b/contracts/liquidity_hub/fee_distributor/src/queries.rs index c1a1d65d..5500a702 100644 --- a/contracts/liquidity_hub/fee_distributor/src/queries.rs +++ b/contracts/liquidity_hub/fee_distributor/src/queries.rs @@ -1,6 +1,6 @@ use crate::state::CONFIG; use cosmwasm_std::{Deps, StdResult}; -use white_whale::fee_distributor::Config; +use white_whale_std::fee_distributor::Config; /// Queries the [Config] of the contract pub fn query_config(deps: Deps) -> StdResult<Config> { diff --git a/contracts/liquidity_hub/fee_distributor/src/state.rs b/contracts/liquidity_hub/fee_distributor/src/state.rs index 782cff7c..990d2498 100644 --- a/contracts/liquidity_hub/fee_distributor/src/state.rs +++ b/contracts/liquidity_hub/fee_distributor/src/state.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{to_json_binary, Addr, Deps, Order, QueryRequest, StdResult, Uint64, WasmQuery}; use cw_storage_plus::{Item, Map}; -use white_whale::fee_distributor::{ClaimableEpochsResponse, Config, Epoch, EpochResponse}; -use white_whale::whale_lair::{BondedResponse, QueryMsg}; +use white_whale_std::fee_distributor::{ClaimableEpochsResponse, Config, Epoch, EpochResponse}; +use white_whale_std::whale_lair::{BondedResponse, QueryMsg}; pub const CONFIG: Item<Config> = Item::new("config"); pub const LAST_CLAIMED_EPOCH: Map<&Addr, Uint64> = Map::new("last_claimed_epoch"); diff --git a/contracts/liquidity_hub/fee_distributor/src/tests/epoch.rs b/contracts/liquidity_hub/fee_distributor/src/tests/epoch.rs index ff847b43..eb2325fa 100644 --- a/contracts/liquidity_hub/fee_distributor/src/tests/epoch.rs +++ b/contracts/liquidity_hub/fee_distributor/src/tests/epoch.rs @@ -1,10 +1,10 @@ use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info}; use cosmwasm_std::{Timestamp, Uint64}; -use white_whale::epoch_manager::epoch_manager::EpochConfig; +use white_whale_std::epoch_manager::epoch_manager::EpochConfig; use crate::ContractError; -use white_whale::fee_distributor::Epoch; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::fee_distributor::Epoch; +use white_whale_std::pool_network::asset::AssetInfo; use crate::tests::robot::TestingRobot; use crate::tests::test_helpers; diff --git a/contracts/liquidity_hub/fee_distributor/src/tests/helpers.rs b/contracts/liquidity_hub/fee_distributor/src/tests/helpers.rs index beced2e8..768adcb8 100644 --- a/contracts/liquidity_hub/fee_distributor/src/tests/helpers.rs +++ b/contracts/liquidity_hub/fee_distributor/src/tests/helpers.rs @@ -1,7 +1,7 @@ use cosmwasm_std::Uint128; -use white_whale::pool_network::asset; +use white_whale_std::pool_network::asset; -use white_whale::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; #[test] fn aggregate_fees() { diff --git a/contracts/liquidity_hub/fee_distributor/src/tests/robot.rs b/contracts/liquidity_hub/fee_distributor/src/tests/robot.rs index 4381803e..430fefe5 100644 --- a/contracts/liquidity_hub/fee_distributor/src/tests/robot.rs +++ b/contracts/liquidity_hub/fee_distributor/src/tests/robot.rs @@ -3,12 +3,12 @@ use cosmwasm_std::testing::{mock_info, MockApi, MockQuerier, MockStorage}; use cosmwasm_std::{ from_json, Addr, Empty, Env, MessageInfo, OwnedDeps, Response, StdResult, Uint64, }; -use white_whale::epoch_manager::epoch_manager::EpochConfig; +use white_whale_std::epoch_manager::epoch_manager::EpochConfig; -use white_whale::fee_distributor::{ +use white_whale_std::fee_distributor::{ ClaimableEpochsResponse, Config, Epoch, EpochResponse, ExecuteMsg, InstantiateMsg, QueryMsg, }; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; use crate::contract::{execute, instantiate, query}; use crate::state::{get_expiring_epoch, EPOCHS, LAST_CLAIMED_EPOCH}; diff --git a/contracts/liquidity_hub/fee_distributor/src/tests/test_helpers.rs b/contracts/liquidity_hub/fee_distributor/src/tests/test_helpers.rs index 7db82698..ebf3625c 100644 --- a/contracts/liquidity_hub/fee_distributor/src/tests/test_helpers.rs +++ b/contracts/liquidity_hub/fee_distributor/src/tests/test_helpers.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{Timestamp, Uint128, Uint64}; -use white_whale::fee_distributor::Epoch; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::whale_lair::GlobalIndex; +use white_whale_std::fee_distributor::Epoch; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::whale_lair::GlobalIndex; pub(crate) fn get_epochs() -> Vec<Epoch> { vec![ diff --git a/contracts/liquidity_hub/fee_distributor/src/tests/testing.rs b/contracts/liquidity_hub/fee_distributor/src/tests/testing.rs index 7764e816..7bf8da40 100644 --- a/contracts/liquidity_hub/fee_distributor/src/tests/testing.rs +++ b/contracts/liquidity_hub/fee_distributor/src/tests/testing.rs @@ -1,12 +1,12 @@ use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info}; use cosmwasm_std::{Addr, Uint64}; -use white_whale::fee_distributor::Config; +use white_whale_std::fee_distributor::Config; use crate::tests::robot::TestingRobot; use crate::ContractError; -use white_whale::epoch_manager::epoch_manager::EpochConfig; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::epoch_manager::epoch_manager::EpochConfig; +use white_whale_std::pool_network::asset::AssetInfo; #[test] fn instantiate_successfully() { diff --git a/contracts/liquidity_hub/pool-network/frontend_helper/Cargo.toml b/contracts/liquidity_hub/pool-network/frontend_helper/Cargo.toml index 7c50a416..c8dfb70c 100644 --- a/contracts/liquidity_hub/pool-network/frontend_helper/Cargo.toml +++ b/contracts/liquidity_hub/pool-network/frontend_helper/Cargo.toml @@ -8,9 +8,9 @@ license.workspace = true publish.workspace = true exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -19,10 +19,10 @@ exclude = [ crate-type = ["cdylib", "rlib"] [features] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] @@ -36,7 +36,7 @@ cw20.workspace = true cw2.workspace = true thiserror.workspace = true semver.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true cosmwasm-schema.workspace = true [dev-dependencies] diff --git a/contracts/liquidity_hub/pool-network/frontend_helper/examples/schema.rs b/contracts/liquidity_hub/pool-network/frontend_helper/examples/schema.rs index 39fcae78..ced137c7 100644 --- a/contracts/liquidity_hub/pool-network/frontend_helper/examples/schema.rs +++ b/contracts/liquidity_hub/pool-network/frontend_helper/examples/schema.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::write_api; -use white_whale::pool_network::frontend_helper::{ExecuteMsg, InstantiateMsg, MigrateMsg}; +use white_whale_std::pool_network::frontend_helper::{ExecuteMsg, InstantiateMsg, MigrateMsg}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/pool-network/frontend_helper/src/contract.rs b/contracts/liquidity_hub/pool-network/frontend_helper/src/contract.rs index 241e70e8..e1020bae 100644 --- a/contracts/liquidity_hub/pool-network/frontend_helper/src/contract.rs +++ b/contracts/liquidity_hub/pool-network/frontend_helper/src/contract.rs @@ -7,11 +7,11 @@ use cosmwasm_std::{ use cw2::{get_contract_version, set_contract_version}; use semver::Version; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::pool_network::frontend_helper::{ +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::frontend_helper::{ Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, TempState, }; -use white_whale::traits::OptionDecimal; +use white_whale_std::traits::OptionDecimal; use crate::error::ContractError; use crate::error::ContractError::MigrateInvalidVersion; @@ -133,7 +133,7 @@ pub fn execute( msg: WasmMsg::Execute { contract_addr: pair_address, msg: to_json_binary( - &white_whale::pool_network::pair::ExecuteMsg::ProvideLiquidity { + &white_whale_std::pool_network::pair::ExecuteMsg::ProvideLiquidity { assets, slippage_tolerance, receiver: None, diff --git a/contracts/liquidity_hub/pool-network/frontend_helper/src/error.rs b/contracts/liquidity_hub/pool-network/frontend_helper/src/error.rs index 33b1ad13..5682dd01 100644 --- a/contracts/liquidity_hub/pool-network/frontend_helper/src/error.rs +++ b/contracts/liquidity_hub/pool-network/frontend_helper/src/error.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{StdError, Uint128}; use semver::Version; use thiserror::Error; -use white_whale::pool_network::asset::Asset; +use white_whale_std::pool_network::asset::Asset; #[derive(Error, Debug)] pub enum ContractError { diff --git a/contracts/liquidity_hub/pool-network/frontend_helper/src/reply/deposit_pair.rs b/contracts/liquidity_hub/pool-network/frontend_helper/src/reply/deposit_pair.rs index 77e7412f..29f44973 100644 --- a/contracts/liquidity_hub/pool-network/frontend_helper/src/reply/deposit_pair.rs +++ b/contracts/liquidity_hub/pool-network/frontend_helper/src/reply/deposit_pair.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{to_json_binary, DepsMut, Env, Reply, Response, WasmMsg}; -use white_whale::pool_network::{ +use white_whale_std::pool_network::{ asset::AssetInfo, frontend_helper::TempState, incentive::QueryPosition, }; @@ -28,15 +28,15 @@ pub fn deposit_pair(deps: DepsMut, env: Env, msg: Reply) -> Result<Response, Con // now perform the incentive position creation let config = CONFIG.load(deps.storage)?; - let pair_info: white_whale::pool_network::asset::PairInfo = deps.querier.query_wasm_smart( + let pair_info: white_whale_std::pool_network::asset::PairInfo = deps.querier.query_wasm_smart( pair_addr.clone(), - &white_whale::pool_network::pair::QueryMsg::Pair {}, + &white_whale_std::pool_network::pair::QueryMsg::Pair {}, )?; - let incentive_address: white_whale::pool_network::incentive_factory::IncentiveResponse = + let incentive_address: white_whale_std::pool_network::incentive_factory::IncentiveResponse = deps.querier.query_wasm_smart( config.incentive_factory_addr, - &white_whale::pool_network::incentive_factory::QueryMsg::Incentive { + &white_whale_std::pool_network::incentive_factory::QueryMsg::Incentive { lp_asset: pair_info.liquidity_token.clone(), }, )?; @@ -88,10 +88,10 @@ pub fn deposit_pair(deps: DepsMut, env: Env, msg: Reply) -> Result<Response, Con }; // find out if the user has an open position with that unbonding_duration - let positions: white_whale::pool_network::incentive::PositionsResponse = + let positions: white_whale_std::pool_network::incentive::PositionsResponse = deps.querier.query_wasm_smart( incentive_address.clone(), - &white_whale::pool_network::incentive::QueryMsg::Positions { + &white_whale_std::pool_network::incentive::QueryMsg::Positions { address: receiver.clone().into_string(), }, )?; @@ -115,12 +115,12 @@ pub fn deposit_pair(deps: DepsMut, env: Env, msg: Reply) -> Result<Response, Con .add_message(WasmMsg::Execute { contract_addr: incentive_address.into_string(), msg: to_json_binary(&match has_existing_position { - true => white_whale::pool_network::incentive::ExecuteMsg::ExpandPosition { + true => white_whale_std::pool_network::incentive::ExecuteMsg::ExpandPosition { amount: lp_amount, unbonding_duration, receiver: Some(receiver.into_string()), }, - false => white_whale::pool_network::incentive::ExecuteMsg::OpenPosition { + false => white_whale_std::pool_network::incentive::ExecuteMsg::OpenPosition { amount: lp_amount, unbonding_duration, receiver: Some(receiver.into_string()), diff --git a/contracts/liquidity_hub/pool-network/frontend_helper/src/state.rs b/contracts/liquidity_hub/pool-network/frontend_helper/src/state.rs index 1814947b..539157cb 100644 --- a/contracts/liquidity_hub/pool-network/frontend_helper/src/state.rs +++ b/contracts/liquidity_hub/pool-network/frontend_helper/src/state.rs @@ -1,5 +1,5 @@ use cw_storage_plus::Item; -use white_whale::pool_network::frontend_helper::{Config, TempState}; +use white_whale_std::pool_network::frontend_helper::{Config, TempState}; pub const CONFIG: Item<Config> = Item::new("config"); diff --git a/contracts/liquidity_hub/pool-network/frontend_helper/src/testing.rs b/contracts/liquidity_hub/pool-network/frontend_helper/src/testing.rs index d9cfb155..b25873a7 100644 --- a/contracts/liquidity_hub/pool-network/frontend_helper/src/testing.rs +++ b/contracts/liquidity_hub/pool-network/frontend_helper/src/testing.rs @@ -3,10 +3,10 @@ mod tests { use crate::error::ContractError; use cosmwasm_std::{coin, coins, to_json_binary, Addr, Uint128, WasmMsg}; use cw_multi_test::Executor; - use white_whale::pool_network::asset::{Asset, AssetInfo}; - use white_whale::pool_network::frontend_helper::ConfigResponse; - use white_whale::pool_network::incentive::{PositionsResponse, QueryPosition}; - use white_whale::pool_network::incentive_factory::IncentiveResponse; + use white_whale_std::pool_network::asset::{Asset, AssetInfo}; + use white_whale_std::pool_network::frontend_helper::ConfigResponse; + use white_whale_std::pool_network::incentive::{PositionsResponse, QueryPosition}; + use white_whale_std::pool_network::incentive_factory::IncentiveResponse; use crate::tests::mock_app::mock_app; use crate::tests::mock_info::{mock_admin, mock_alice, mock_creator}; @@ -44,7 +44,7 @@ mod tests { app.execute_contract( mock_creator().sender, frontend_helper, - &white_whale::pool_network::frontend_helper::ExecuteMsg::Deposit { + &white_whale_std::pool_network::frontend_helper::ExecuteMsg::Deposit { pair_address: pair_address.into_string(), assets: [ Asset { @@ -67,7 +67,7 @@ mod tests { .wrap() .query_wasm_smart( incentive_factory, - &white_whale::pool_network::incentive_factory::QueryMsg::Incentive { + &white_whale_std::pool_network::incentive_factory::QueryMsg::Incentive { lp_asset: lp_token, }, ) @@ -77,7 +77,7 @@ mod tests { .wrap() .query_wasm_smart( incentive_addr.unwrap(), - &white_whale::pool_network::incentive::QueryMsg::Positions { + &white_whale_std::pool_network::incentive::QueryMsg::Positions { address: mock_creator().sender.to_string(), }, ) @@ -141,7 +141,7 @@ mod tests { WasmMsg::Execute { contract_addr: frontend_helper.into_string(), msg: to_json_binary( - &white_whale::pool_network::frontend_helper::ExecuteMsg::Deposit { + &white_whale_std::pool_network::frontend_helper::ExecuteMsg::Deposit { pair_address: pair_address.into_string(), assets: [ Asset { @@ -169,7 +169,7 @@ mod tests { .wrap() .query_wasm_smart( incentive_factory, - &white_whale::pool_network::incentive_factory::QueryMsg::Incentive { + &white_whale_std::pool_network::incentive_factory::QueryMsg::Incentive { lp_asset: lp_token, }, ) @@ -179,7 +179,7 @@ mod tests { .wrap() .query_wasm_smart( incentive_addr.unwrap(), - &white_whale::pool_network::incentive::QueryMsg::Positions { + &white_whale_std::pool_network::incentive::QueryMsg::Positions { address: mock_creator().sender.to_string(), }, ) @@ -222,7 +222,7 @@ mod tests { .wrap() .query_wasm_smart( frontend_helper.clone(), - &white_whale::pool_network::frontend_helper::QueryMsg::Config {}, + &white_whale_std::pool_network::frontend_helper::QueryMsg::Config {}, ) .unwrap(); @@ -232,7 +232,7 @@ mod tests { let result = app.execute_contract( mock_alice().sender, frontend_helper.clone(), - &white_whale::pool_network::frontend_helper::ExecuteMsg::UpdateConfig { + &white_whale_std::pool_network::frontend_helper::ExecuteMsg::UpdateConfig { incentive_factory_addr: Some("new_factory".to_string()), owner: Some("new_owner".to_string()), }, @@ -249,7 +249,7 @@ mod tests { app.execute_contract( mock_admin().sender, frontend_helper.clone(), - &white_whale::pool_network::frontend_helper::ExecuteMsg::UpdateConfig { + &white_whale_std::pool_network::frontend_helper::ExecuteMsg::UpdateConfig { incentive_factory_addr: Some("new_factory".to_string()), owner: Some("new_owner".to_string()), }, @@ -261,7 +261,7 @@ mod tests { .wrap() .query_wasm_smart( frontend_helper, - &white_whale::pool_network::frontend_helper::QueryMsg::Config {}, + &white_whale_std::pool_network::frontend_helper::QueryMsg::Config {}, ) .unwrap(); diff --git a/contracts/liquidity_hub/pool-network/frontend_helper/src/tests/mock_instantiate.rs b/contracts/liquidity_hub/pool-network/frontend_helper/src/tests/mock_instantiate.rs index f3976c01..395b7d8f 100644 --- a/contracts/liquidity_hub/pool-network/frontend_helper/src/tests/mock_instantiate.rs +++ b/contracts/liquidity_hub/pool-network/frontend_helper/src/tests/mock_instantiate.rs @@ -2,7 +2,7 @@ use cosmwasm_std::{to_json_binary, Addr, Decimal, Uint128, WasmMsg}; use cw20::Cw20Coin; use cw_multi_test::{App, Executor}; -use white_whale::{ +use white_whale_std::{ fee::Fee, pool_network::asset::{Asset, AssetInfo, PairType}, }; @@ -72,7 +72,7 @@ pub fn app_mock_instantiate(app: &mut App, pool_assets: [AssetInfo; 2]) -> AppIn .unwrap(); #[cfg(not(feature = "osmosis"))] - let pool_fee = white_whale::pool_network::pair::PoolFee { + let pool_fee = white_whale_std::pool_network::pair::PoolFee { burn_fee: Fee { share: Decimal::zero(), }, @@ -85,7 +85,7 @@ pub fn app_mock_instantiate(app: &mut App, pool_assets: [AssetInfo; 2]) -> AppIn }; #[cfg(feature = "osmosis")] - let pool_fee = white_whale::pool_network::pair::PoolFee { + let pool_fee = white_whale_std::pool_network::pair::PoolFee { burn_fee: Fee { share: Decimal::zero(), }, @@ -100,7 +100,7 @@ pub fn app_mock_instantiate(app: &mut App, pool_assets: [AssetInfo; 2]) -> AppIn }, }; - let instantiate_msg = white_whale::pool_network::pair::InstantiateMsg { + let instantiate_msg = white_whale_std::pool_network::pair::InstantiateMsg { token_factory_lp: false, token_code_id: token_id, pool_fees: pool_fee.clone(), @@ -125,9 +125,9 @@ pub fn app_mock_instantiate(app: &mut App, pool_assets: [AssetInfo; 2]) -> AppIn // get the LP token let lp_token = app .wrap() - .query_wasm_smart::<white_whale::pool_network::asset::PairInfo>( + .query_wasm_smart::<white_whale_std::pool_network::asset::PairInfo>( pair.clone(), - &white_whale::pool_network::pair::QueryMsg::Pair {}, + &white_whale_std::pool_network::pair::QueryMsg::Pair {}, ) .unwrap() .liquidity_token; @@ -148,7 +148,7 @@ pub fn app_mock_instantiate(app: &mut App, pool_assets: [AssetInfo; 2]) -> AppIn .instantiate_contract( factory_id, mock_admin().sender, - &white_whale::pool_network::incentive_factory::InstantiateMsg { + &white_whale_std::pool_network::incentive_factory::InstantiateMsg { create_flow_fee: Asset { amount: Uint128::zero(), info: AssetInfo::NativeToken { @@ -174,7 +174,7 @@ pub fn app_mock_instantiate(app: &mut App, pool_assets: [AssetInfo; 2]) -> AppIn WasmMsg::Execute { contract_addr: incentive_factory.to_string(), msg: to_json_binary( - &white_whale::pool_network::incentive_factory::ExecuteMsg::CreateIncentive { + &white_whale_std::pool_network::incentive_factory::ExecuteMsg::CreateIncentive { lp_asset: lp_token.clone(), }, ) @@ -189,7 +189,7 @@ pub fn app_mock_instantiate(app: &mut App, pool_assets: [AssetInfo; 2]) -> AppIn .instantiate_contract( frontend_helper_id, mock_admin().sender, - &white_whale::pool_network::frontend_helper::InstantiateMsg { + &white_whale_std::pool_network::frontend_helper::InstantiateMsg { incentive_factory: incentive_factory.clone().into_string(), }, &[], diff --git a/contracts/liquidity_hub/pool-network/incentive/Cargo.toml b/contracts/liquidity_hub/pool-network/incentive/Cargo.toml index 600860f6..cc141385 100644 --- a/contracts/liquidity_hub/pool-network/incentive/Cargo.toml +++ b/contracts/liquidity_hub/pool-network/incentive/Cargo.toml @@ -8,9 +8,9 @@ license.workspace = true publish.workspace = true exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -19,10 +19,10 @@ exclude = [ crate-type = ["cdylib", "rlib"] [features] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] @@ -37,7 +37,7 @@ cw20.workspace = true cw2.workspace = true thiserror.workspace = true semver.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true cosmwasm-schema.workspace = true cw-utils.workspace = true diff --git a/contracts/liquidity_hub/pool-network/incentive/examples/schema.rs b/contracts/liquidity_hub/pool-network/incentive/examples/schema.rs index 729610bf..58e9f990 100644 --- a/contracts/liquidity_hub/pool-network/incentive/examples/schema.rs +++ b/contracts/liquidity_hub/pool-network/incentive/examples/schema.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::write_api; -use white_whale::pool_network::incentive::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use white_whale_std::pool_network::incentive::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/pool-network/incentive/src/claim.rs b/contracts/liquidity_hub/pool-network/incentive/src/claim.rs index 6a510954..2c207e2b 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/claim.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/claim.rs @@ -3,7 +3,7 @@ use cosmwasm_std::{ Uint256, WasmMsg, }; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; use crate::helpers::{get_flow_asset_amount_at_epoch, get_flow_current_end_epoch}; use crate::state::{EpochId, ADDRESS_WEIGHT_HISTORY, GLOBAL_WEIGHT_SNAPSHOT, LAST_CLAIMED_EPOCH}; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/contract.rs b/contracts/liquidity_hub/pool-network/incentive/src/contract.rs index 9506d1e8..80bb192d 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/contract.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/contract.rs @@ -4,13 +4,13 @@ use cosmwasm_std::{ to_json_binary, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Response, Uint128, WasmMsg, }; use cw2::{get_contract_version, set_contract_version}; -use white_whale::pool_network::incentive::{ +use white_whale_std::pool_network::incentive::{ Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, }; use semver::Version; -use white_whale::migrate_guards::check_contract_name; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::migrate_guards::check_contract_name; +use white_whale_std::pool_network::asset::AssetInfo; use crate::error::ContractError; use crate::error::ContractError::MigrateInvalidVersion; @@ -58,7 +58,7 @@ pub fn instantiate( ("lp_asset", config.lp_asset.to_string()), ]) .set_data(to_json_binary( - &white_whale::pool_network::incentive::InstantiateReplyCallback { + &white_whale_std::pool_network::incentive::InstantiateReplyCallback { lp_asset: msg.lp_asset, }, )?) diff --git a/contracts/liquidity_hub/pool-network/incentive/src/error.rs b/contracts/liquidity_hub/pool-network/incentive/src/error.rs index f25cbed4..e470bd32 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/error.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/error.rs @@ -5,7 +5,7 @@ use cosmwasm_std::{ use cw_utils::PaymentError; use semver::Version; use thiserror::Error; -use white_whale::pool_network::incentive::FlowIdentifier; +use white_whale_std::pool_network::incentive::FlowIdentifier; #[derive(Error, Debug)] pub enum ContractError { diff --git a/contracts/liquidity_hub/pool-network/incentive/src/execute/close_flow.rs b/contracts/liquidity_hub/pool-network/incentive/src/execute/close_flow.rs index 0645f6aa..217fefbb 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/execute/close_flow.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/execute/close_flow.rs @@ -3,8 +3,8 @@ use cosmwasm_std::{ WasmMsg, }; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::pool_network::incentive::{Flow, FlowIdentifier}; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::incentive::{Flow, FlowIdentifier}; use crate::{ error::ContractError, @@ -19,10 +19,10 @@ pub fn close_flow( ) -> Result<Response, ContractError> { // validate that user is allowed to close the flow let config = CONFIG.load(deps.storage)?; - let factory_config: white_whale::pool_network::incentive_factory::ConfigResponse = + let factory_config: white_whale_std::pool_network::incentive_factory::ConfigResponse = deps.querier.query_wasm_smart( config.factory_address.into_string(), - &white_whale::pool_network::incentive_factory::QueryMsg::Config {}, + &white_whale_std::pool_network::incentive_factory::QueryMsg::Config {}, )?; let flow = FLOWS diff --git a/contracts/liquidity_hub/pool-network/incentive/src/execute/close_position.rs b/contracts/liquidity_hub/pool-network/incentive/src/execute/close_position.rs index b85f9a36..4aa82bb9 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/execute/close_position.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/execute/close_position.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{DepsMut, Env, MessageInfo, Response, StdError}; -use white_whale::pool_network::incentive::{ClosedPosition, OpenPosition}; +use white_whale_std::pool_network::incentive::{ClosedPosition, OpenPosition}; use crate::queries::get_rewards; use crate::state::ADDRESS_WEIGHT_HISTORY; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/execute/expand_flow.rs b/contracts/liquidity_hub/pool-network/incentive/src/execute/expand_flow.rs index 1b0ec559..601a7c70 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/execute/expand_flow.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/execute/expand_flow.rs @@ -3,8 +3,8 @@ use cosmwasm_std::{ Response, StdResult, Uint128, WasmMsg, }; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::pool_network::incentive::{Flow, FlowIdentifier}; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::incentive::{Flow, FlowIdentifier}; use crate::error::ContractError; use crate::execute::open_flow::DEFAULT_FLOW_DURATION; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/execute/open_flow.rs b/contracts/liquidity_hub/pool-network/incentive/src/execute/open_flow.rs index 965e594f..8f0a315a 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/execute/open_flow.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/execute/open_flow.rs @@ -6,8 +6,8 @@ use cosmwasm_std::{ StdResult, Uint128, WasmMsg, }; -use white_whale::pool_network::incentive::Flow; -use white_whale::pool_network::{ +use white_whale_std::pool_network::incentive::Flow; +use white_whale_std::pool_network::{ asset::{Asset, AssetInfo}, incentive::Curve, }; @@ -42,10 +42,10 @@ pub fn open_flow( let config = CONFIG.load(deps.storage)?; - let incentive_factory_config: white_whale::pool_network::incentive_factory::ConfigResponse = + let incentive_factory_config: white_whale_std::pool_network::incentive_factory::ConfigResponse = deps.querier.query_wasm_smart( config.factory_address.into_string(), - &white_whale::pool_network::incentive_factory::QueryMsg::Config {}, + &white_whale_std::pool_network::incentive_factory::QueryMsg::Config {}, )?; let mut messages: Vec<CosmosMsg> = vec![]; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/execute/open_position.rs b/contracts/liquidity_hub/pool-network/incentive/src/execute/open_position.rs index a1bef25d..8e06a23c 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/execute/open_position.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/execute/open_position.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{CosmosMsg, DepsMut, Env, MessageInfo, Response, StdError, Uint128}; -use white_whale::pool_network::incentive::OpenPosition; +use white_whale_std::pool_network::incentive::OpenPosition; use crate::state::ADDRESS_WEIGHT_HISTORY; use crate::{ @@ -23,10 +23,10 @@ pub fn open_position( let config = CONFIG.load(deps.storage)?; // validate unbonding duration - let incentive_factory_config: white_whale::pool_network::incentive_factory::ConfigResponse = + let incentive_factory_config: white_whale_std::pool_network::incentive_factory::ConfigResponse = deps.querier.query_wasm_smart( config.factory_address.into_string(), - &white_whale::pool_network::incentive_factory::QueryMsg::Config {}, + &white_whale_std::pool_network::incentive_factory::QueryMsg::Config {}, )?; if unbonding_duration < incentive_factory_config.min_unbonding_duration diff --git a/contracts/liquidity_hub/pool-network/incentive/src/execute/withdraw.rs b/contracts/liquidity_hub/pool-network/incentive/src/execute/withdraw.rs index 68045344..4e3f9c8d 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/execute/withdraw.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/execute/withdraw.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{DepsMut, Env, MessageInfo, Response, Uint128}; -use white_whale::pool_network::asset::Asset; +use white_whale_std::pool_network::asset::Asset; use crate::{ error::ContractError, diff --git a/contracts/liquidity_hub/pool-network/incentive/src/funds_validation.rs b/contracts/liquidity_hub/pool-network/incentive/src/funds_validation.rs index 8c057268..13b335cf 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/funds_validation.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/funds_validation.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{to_json_binary, Deps, Env, MessageInfo, Uint128, WasmMsg}; use cw_utils::PaymentError; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; use crate::error::ContractError; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/helpers.rs b/contracts/liquidity_hub/pool-network/incentive/src/helpers.rs index 297185e7..9109504c 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/helpers.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/helpers.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{Addr, Deps, DepsMut, Order, StdError, StdResult, Uint128}; -use white_whale::pool_network::incentive::Flow; +use white_whale_std::pool_network::incentive::Flow; use crate::error::ContractError; use crate::state::{EpochId, ADDRESS_WEIGHT_HISTORY, CONFIG, FLOWS}; @@ -8,10 +8,10 @@ use crate::state::{EpochId, ADDRESS_WEIGHT_HISTORY, CONFIG, FLOWS}; /// Gets the current epoch from the fee distributor contract. pub fn get_current_epoch(deps: Deps) -> Result<u64, ContractError> { let config = CONFIG.load(deps.storage)?; - let epoch_response: white_whale::fee_distributor::EpochResponse = + let epoch_response: white_whale_std::fee_distributor::EpochResponse = deps.querier.query_wasm_smart( config.fee_distributor_address.into_string(), - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, )?; Ok(epoch_response.epoch.id.u64()) diff --git a/contracts/liquidity_hub/pool-network/incentive/src/migrations.rs b/contracts/liquidity_hub/pool-network/incentive/src/migrations.rs index a65fb86c..ccb1a889 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/migrations.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/migrations.rs @@ -8,8 +8,8 @@ use cosmwasm_schema::cw_serde; use cosmwasm_std::{Addr, DepsMut, Order, StdError, StdResult, Uint128}; use cw_storage_plus::Map; -use white_whale::pool_network::asset::Asset; -use white_whale::pool_network::incentive::{Curve, Flow}; +use white_whale_std::pool_network::asset::Asset; +use white_whale_std::pool_network::incentive::{Curve, Flow}; use crate::state::{EpochId, FlowId, FLOWS}; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_config.rs b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_config.rs index f72a9b34..013a1cc0 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_config.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_config.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{Deps, StdError}; -use white_whale::pool_network::incentive::ConfigResponse; +use white_whale_std::pool_network::incentive::ConfigResponse; use crate::state::CONFIG; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_flow.rs b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_flow.rs index b36c0d05..3b2d695a 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_flow.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_flow.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{Deps, Order, StdError, StdResult}; -use white_whale::pool_network::incentive::{Flow, FlowIdentifier, FlowResponse}; +use white_whale_std::pool_network::incentive::{Flow, FlowIdentifier, FlowResponse}; use crate::helpers::get_filtered_flow; use crate::state::FLOWS; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_flows.rs b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_flows.rs index bf05d81f..4a207321 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_flows.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_flows.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{Deps, Order, StdError, StdResult}; -use white_whale::pool_network::incentive::Flow; +use white_whale_std::pool_network::incentive::Flow; use crate::helpers::get_filtered_flow; use crate::state::FLOWS; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_global_weight.rs b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_global_weight.rs index 96bd3723..23ee8c61 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_global_weight.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_global_weight.rs @@ -1,6 +1,6 @@ use cosmwasm_std::Deps; -use white_whale::pool_network::incentive::GlobalWeightResponse; +use white_whale_std::pool_network::incentive::GlobalWeightResponse; use crate::error::ContractError; use crate::state::GLOBAL_WEIGHT_SNAPSHOT; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_positions.rs b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_positions.rs index d212dfe3..459ddb5f 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_positions.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_positions.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{Deps, Env}; -use white_whale::pool_network::incentive::{PositionsResponse, QueryPosition}; +use white_whale_std::pool_network::incentive::{PositionsResponse, QueryPosition}; use crate::{ error::ContractError, @@ -51,7 +51,7 @@ mod tests { testing::{mock_dependencies, mock_env}, Addr, Uint128, }; - use white_whale::pool_network::incentive::{ClosedPosition, OpenPosition, QueryPosition}; + use white_whale_std::pool_network::incentive::{ClosedPosition, OpenPosition, QueryPosition}; use crate::{ state::{CLOSED_POSITIONS, OPEN_POSITIONS}, diff --git a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_rewards.rs b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_rewards.rs index 62a457a0..90d0e78a 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_rewards.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_rewards.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{Decimal256, Deps, Uint128, Uint256}; -use white_whale::pool_network::{asset::Asset, incentive::RewardsResponse}; +use white_whale_std::pool_network::{asset::Asset, incentive::RewardsResponse}; use crate::error::ContractError; use crate::helpers; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_rewards_share.rs b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_rewards_share.rs index 8da83d09..d95373f3 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/queries/get_rewards_share.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/queries/get_rewards_share.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{Addr, Decimal256, Deps, Uint128}; -use white_whale::pool_network::incentive::RewardsShareResponse; +use white_whale_std::pool_network::incentive::RewardsShareResponse; use crate::error::ContractError; use crate::helpers; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/state.rs b/contracts/liquidity_hub/pool-network/incentive/src/state.rs index b2230885..85e9f393 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/state.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/state.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{Addr, Uint128}; use cw_storage_plus::{Item, Map}; -use white_whale::pool_network::incentive::{ClosedPosition, Config, Flow, OpenPosition}; +use white_whale_std::pool_network::incentive::{ClosedPosition, Config, Flow, OpenPosition}; /// The configuration for the incentive contract. pub const CONFIG: Item<Config> = Item::new("config"); diff --git a/contracts/liquidity_hub/pool-network/incentive/src/tests/helpers.rs b/contracts/liquidity_hub/pool-network/incentive/src/tests/helpers.rs index b6ef9f2c..14f6adb0 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/tests/helpers.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/tests/helpers.rs @@ -2,8 +2,8 @@ use std::collections::{BTreeMap, HashMap}; use cosmwasm_std::{Addr, Uint128}; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::pool_network::incentive::{Curve, Flow}; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::incentive::{Curve, Flow}; use crate::helpers::{get_filtered_flow, get_flow_asset_amount_at_epoch}; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/tests/integration.rs b/contracts/liquidity_hub/pool-network/incentive/src/tests/integration.rs index 6e2aa1aa..9cdb78a2 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/tests/integration.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/tests/integration.rs @@ -3,10 +3,10 @@ use std::collections::{BTreeMap, HashMap}; use cosmwasm_std::{coin, coins, Addr, Decimal256, Timestamp, Uint128}; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::pool_network::incentive; -use white_whale::pool_network::incentive::{Curve, Flow, FlowIdentifier, RewardsShareResponse}; -use white_whale::pool_network::incentive_factory::IncentivesContract; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::incentive; +use white_whale_std::pool_network::incentive::{Curve, Flow, FlowIdentifier, RewardsShareResponse}; +use white_whale_std::pool_network::incentive_factory::IncentivesContract; use crate::error::ContractError; use crate::tests::suite::TestingSuite; diff --git a/contracts/liquidity_hub/pool-network/incentive/src/tests/mock_execute.rs b/contracts/liquidity_hub/pool-network/incentive/src/tests/mock_execute.rs index 22dc3ca3..99aea10d 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/tests/mock_execute.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/tests/mock_execute.rs @@ -8,7 +8,7 @@ use crate::{contract::execute, error::ContractError}; use super::{mock_creator, mock_instantiate::mock_instantiate}; pub fn mock_execute( - msg: white_whale::pool_network::incentive::ExecuteMsg, + msg: white_whale_std::pool_network::incentive::ExecuteMsg, ) -> ( Result<Response, ContractError>, OwnedDeps<MockStorage, MockApi, MockQuerier>, diff --git a/contracts/liquidity_hub/pool-network/incentive/src/tests/mock_instantiate.rs b/contracts/liquidity_hub/pool-network/incentive/src/tests/mock_instantiate.rs index 3cc8e797..765ab4f5 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/tests/mock_instantiate.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/tests/mock_instantiate.rs @@ -4,8 +4,8 @@ use cosmwasm_std::{ }; use cw20::Cw20Coin; use cw_multi_test::{App, Executor}; -use white_whale::epoch_manager::epoch_manager::EpochConfig; -use white_whale::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::epoch_manager::epoch_manager::EpochConfig; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; use crate::contract::instantiate; @@ -27,7 +27,7 @@ pub fn mock_instantiate() -> (OwnedDeps<MockStorage, MockApi, MockQuerier>, Env) deps.as_mut(), env.clone(), creator, - white_whale::pool_network::incentive::InstantiateMsg { + white_whale_std::pool_network::incentive::InstantiateMsg { lp_asset: AssetInfo::NativeToken { denom: "lp_addr".to_string(), }, @@ -81,7 +81,7 @@ pub fn app_mock_instantiate(app: &mut App, lp_balance: Uint128) -> AppInstantiat .instantiate_contract( fee_distributor_id, mock_admin().sender, - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: "bonding_contract_addr".to_string(), fee_collector_addr: "fee_collector_addr".to_string(), grace_period: Uint64::one(), @@ -103,7 +103,7 @@ pub fn app_mock_instantiate(app: &mut App, lp_balance: Uint128) -> AppInstantiat .instantiate_contract( factory_id, mock_admin().sender, - &white_whale::pool_network::incentive_factory::InstantiateMsg { + &white_whale_std::pool_network::incentive_factory::InstantiateMsg { create_flow_fee: Asset { amount: Uint128::zero(), info: AssetInfo::NativeToken { @@ -129,7 +129,7 @@ pub fn app_mock_instantiate(app: &mut App, lp_balance: Uint128) -> AppInstantiat WasmMsg::Execute { contract_addr: incentive_factory.to_string(), msg: to_json_binary( - &white_whale::pool_network::incentive_factory::ExecuteMsg::CreateIncentive { + &white_whale_std::pool_network::incentive_factory::ExecuteMsg::CreateIncentive { lp_asset: AssetInfo::Token { contract_addr: lp_addr.to_string(), }, @@ -142,11 +142,11 @@ pub fn app_mock_instantiate(app: &mut App, lp_balance: Uint128) -> AppInstantiat ) .unwrap(); - let incentive_addr: white_whale::pool_network::incentive_factory::IncentiveResponse = app + let incentive_addr: white_whale_std::pool_network::incentive_factory::IncentiveResponse = app .wrap() .query_wasm_smart( incentive_factory, - &white_whale::pool_network::incentive_factory::QueryMsg::Incentive { + &white_whale_std::pool_network::incentive_factory::QueryMsg::Incentive { lp_asset: lp_addr_token, }, ) diff --git a/contracts/liquidity_hub/pool-network/incentive/src/tests/suite.rs b/contracts/liquidity_hub/pool-network/incentive/src/tests/suite.rs index 77ef069a..5e94865a 100644 --- a/contracts/liquidity_hub/pool-network/incentive/src/tests/suite.rs +++ b/contracts/liquidity_hub/pool-network/incentive/src/tests/suite.rs @@ -2,13 +2,13 @@ use cosmwasm_std::{Addr, Coin, StdResult, Timestamp, Uint128}; use cw20::{BalanceResponse, Cw20Coin, MinterResponse}; use cw_multi_test::{App, AppBuilder, AppResponse, BankKeeper, Executor}; -use white_whale::fee_distributor::EpochResponse; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::pool_network::incentive::{ +use white_whale_std::fee_distributor::EpochResponse; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::incentive::{ Curve, Flow, FlowIdentifier, FlowResponse, GlobalWeightResponse, PositionsResponse, RewardsResponse, RewardsShareResponse, }; -use white_whale::pool_network::incentive_factory::{ +use white_whale_std::pool_network::incentive_factory::{ IncentiveResponse, IncentivesResponse, InstantiateMsg, }; @@ -343,7 +343,7 @@ impl TestingSuite { lp_address: AssetInfo, result: impl Fn(Result<AppResponse, anyhow::Error>), ) -> &mut Self { - let msg = white_whale::pool_network::incentive_factory::ExecuteMsg::CreateIncentive { + let msg = white_whale_std::pool_network::incentive_factory::ExecuteMsg::CreateIncentive { lp_asset: lp_address, }; @@ -369,7 +369,7 @@ impl TestingSuite { funds: &Vec<Coin>, result: impl Fn(Result<AppResponse, anyhow::Error>), ) -> &mut Self { - let msg = white_whale::pool_network::incentive::ExecuteMsg::OpenFlow { + let msg = white_whale_std::pool_network::incentive::ExecuteMsg::OpenFlow { start_epoch, end_epoch, curve, @@ -392,7 +392,8 @@ impl TestingSuite { flow_identifier: FlowIdentifier, result: impl Fn(Result<AppResponse, anyhow::Error>), ) -> &mut Self { - let msg = white_whale::pool_network::incentive::ExecuteMsg::CloseFlow { flow_identifier }; + let msg = + white_whale_std::pool_network::incentive::ExecuteMsg::CloseFlow { flow_identifier }; result( self.app @@ -412,7 +413,7 @@ impl TestingSuite { funds: Vec<Coin>, result: impl Fn(Result<AppResponse, anyhow::Error>), ) -> &mut Self { - let msg = white_whale::pool_network::incentive::ExecuteMsg::OpenPosition { + let msg = white_whale_std::pool_network::incentive::ExecuteMsg::OpenPosition { amount, unbonding_duration, receiver, @@ -433,8 +434,9 @@ impl TestingSuite { unbonding_duration: u64, result: impl Fn(Result<AppResponse, anyhow::Error>), ) -> &mut Self { - let msg = - white_whale::pool_network::incentive::ExecuteMsg::ClosePosition { unbonding_duration }; + let msg = white_whale_std::pool_network::incentive::ExecuteMsg::ClosePosition { + unbonding_duration, + }; result( self.app @@ -454,7 +456,7 @@ impl TestingSuite { funds: Vec<Coin>, result: impl Fn(Result<AppResponse, anyhow::Error>), ) -> &mut Self { - let msg = white_whale::pool_network::incentive::ExecuteMsg::ExpandPosition { + let msg = white_whale_std::pool_network::incentive::ExecuteMsg::ExpandPosition { amount, unbonding_duration, receiver, @@ -474,7 +476,7 @@ impl TestingSuite { sender: Addr, result: impl Fn(Result<AppResponse, anyhow::Error>), ) -> &mut Self { - let msg = white_whale::pool_network::incentive::ExecuteMsg::Claim {}; + let msg = white_whale_std::pool_network::incentive::ExecuteMsg::Claim {}; println!("-------------- claiming {}", sender); result( self.app @@ -490,7 +492,7 @@ impl TestingSuite { sender: Addr, result: impl Fn(Result<AppResponse, anyhow::Error>), ) -> &mut Self { - let msg = white_whale::pool_network::incentive::ExecuteMsg::Withdraw {}; + let msg = white_whale_std::pool_network::incentive::ExecuteMsg::Withdraw {}; result( self.app .execute_contract(sender, incentive_addr, &msg, &vec![]), @@ -504,7 +506,7 @@ impl TestingSuite { epoch_amount: u64, incentive_addresses_to_snapshot_global_weight_for: Vec<Addr>, ) -> &mut Self { - let msg = white_whale::fee_distributor::ExecuteMsg::NewEpoch {}; + let msg = white_whale_std::fee_distributor::ExecuteMsg::NewEpoch {}; for _ in 0..epoch_amount { self.app @@ -532,7 +534,7 @@ impl TestingSuite { &mut self, epoch_amount: u64, ) -> &mut Self { - let msg = white_whale::fee_distributor::ExecuteMsg::NewEpoch {}; + let msg = white_whale_std::fee_distributor::ExecuteMsg::NewEpoch {}; for _ in 0..epoch_amount { self.app @@ -553,7 +555,7 @@ impl TestingSuite { incentive_addr: Addr, result: impl Fn(Result<AppResponse, anyhow::Error>), ) -> &mut Self { - let msg = white_whale::pool_network::incentive::ExecuteMsg::TakeGlobalWeightSnapshot {}; + let msg = white_whale_std::pool_network::incentive::ExecuteMsg::TakeGlobalWeightSnapshot {}; result(self.app.execute_contract( self.senders[0].clone(), @@ -575,7 +577,7 @@ impl TestingSuite { funds: Vec<Coin>, result: impl Fn(Result<AppResponse, anyhow::Error>), ) -> &mut Self { - let msg = white_whale::pool_network::incentive::ExecuteMsg::ExpandFlow { + let msg = white_whale_std::pool_network::incentive::ExecuteMsg::ExpandFlow { flow_identifier, end_epoch, flow_asset, @@ -598,7 +600,7 @@ impl TestingSuite { ) -> &mut Self { let current_epoch_response: StdResult<EpochResponse> = self.app.wrap().query_wasm_smart( &self.fee_distributor_addr, - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, ); result(current_epoch_response); @@ -613,7 +615,7 @@ impl TestingSuite { ) -> &mut Self { let incentive_response: StdResult<IncentiveResponse> = self.app.wrap().query_wasm_smart( &self.incentive_factory_addr, - &white_whale::pool_network::incentive_factory::QueryMsg::Incentive { + &white_whale_std::pool_network::incentive_factory::QueryMsg::Incentive { lp_asset: lp_address, }, ); @@ -631,7 +633,7 @@ impl TestingSuite { ) -> &mut Self { let incentive_response: StdResult<IncentivesResponse> = self.app.wrap().query_wasm_smart( &self.incentive_factory_addr, - &white_whale::pool_network::incentive_factory::QueryMsg::Incentives { + &white_whale_std::pool_network::incentive_factory::QueryMsg::Incentives { start_after, limit, }, @@ -651,7 +653,7 @@ impl TestingSuite { let global_weight_response: StdResult<GlobalWeightResponse> = self.app.wrap().query_wasm_smart( &incentive_addr, - &white_whale::pool_network::incentive::QueryMsg::GlobalWeight { epoch_id }, + &white_whale_std::pool_network::incentive::QueryMsg::GlobalWeight { epoch_id }, ); result(global_weight_response); @@ -668,7 +670,7 @@ impl TestingSuite { let current_epoch_rewards_share: StdResult<RewardsShareResponse> = self.app.wrap().query_wasm_smart( &incentive_addr, - &white_whale::pool_network::incentive::QueryMsg::CurrentEpochRewardsShare { + &white_whale_std::pool_network::incentive::QueryMsg::CurrentEpochRewardsShare { address: address.to_string(), }, ); @@ -686,7 +688,7 @@ impl TestingSuite { ) -> &mut Self { let flow_response: StdResult<Option<FlowResponse>> = self.app.wrap().query_wasm_smart( incentive_addr, - &white_whale::pool_network::incentive::QueryMsg::Flow { + &white_whale_std::pool_network::incentive::QueryMsg::Flow { flow_identifier, start_epoch: None, end_epoch: None, @@ -707,7 +709,7 @@ impl TestingSuite { ) -> &mut Self { let flows_response: StdResult<Vec<Flow>> = self.app.wrap().query_wasm_smart( incentive_addr, - &white_whale::pool_network::incentive::QueryMsg::Flows { + &white_whale_std::pool_network::incentive::QueryMsg::Flows { start_epoch, end_epoch, }, @@ -726,7 +728,7 @@ impl TestingSuite { ) -> &mut Self { let positions_response: StdResult<PositionsResponse> = self.app.wrap().query_wasm_smart( incentive_addr, - &white_whale::pool_network::incentive::QueryMsg::Positions { + &white_whale_std::pool_network::incentive::QueryMsg::Positions { address: address.to_string(), }, ); @@ -744,7 +746,7 @@ impl TestingSuite { ) -> &mut Self { let rewards_response: StdResult<RewardsResponse> = self.app.wrap().query_wasm_smart( incentive_addr, - &white_whale::pool_network::incentive::QueryMsg::Rewards { + &white_whale_std::pool_network::incentive::QueryMsg::Rewards { address: address.to_string(), }, ); @@ -756,13 +758,13 @@ impl TestingSuite { pub(crate) fn query_incentive_factory_config( &mut self, - result: impl Fn(StdResult<white_whale::pool_network::incentive_factory::ConfigResponse>), + result: impl Fn(StdResult<white_whale_std::pool_network::incentive_factory::ConfigResponse>), ) -> &mut Self { let config_response: StdResult< - white_whale::pool_network::incentive_factory::ConfigResponse, + white_whale_std::pool_network::incentive_factory::ConfigResponse, > = self.app.wrap().query_wasm_smart( self.incentive_factory_addr.clone(), - &white_whale::pool_network::incentive_factory::QueryMsg::Config {}, + &white_whale_std::pool_network::incentive_factory::QueryMsg::Config {}, ); result(config_response); @@ -772,12 +774,12 @@ impl TestingSuite { pub(crate) fn query_incentive_config( &mut self, incentive: Addr, - result: impl Fn(StdResult<white_whale::pool_network::incentive::ConfigResponse>), + result: impl Fn(StdResult<white_whale_std::pool_network::incentive::ConfigResponse>), ) -> &mut Self { - let config_response: StdResult<white_whale::pool_network::incentive::ConfigResponse> = + let config_response: StdResult<white_whale_std::pool_network::incentive::ConfigResponse> = self.app.wrap().query_wasm_smart( incentive, - &white_whale::pool_network::incentive::QueryMsg::Config {}, + &white_whale_std::pool_network::incentive::QueryMsg::Config {}, ); result(config_response); @@ -873,7 +875,7 @@ fn instantiate_contract( ) } InstatiateContract::FeeCollector => { - let msg = white_whale::fee_collector::InstantiateMsg {}; + let msg = white_whale_std::fee_collector::InstantiateMsg {}; let fee_collector_id = suite.app.store_code(fee_collector_contract()); @@ -893,7 +895,7 @@ fn instantiate_contract( initial_balances, mint, } => { - let msg = white_whale::pool_network::token::InstantiateMsg { + let msg = white_whale_std::pool_network::token::InstantiateMsg { name, symbol, decimals, diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/Cargo.toml b/contracts/liquidity_hub/pool-network/incentive_factory/Cargo.toml index 284f4d0c..1904d485 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/Cargo.toml +++ b/contracts/liquidity_hub/pool-network/incentive_factory/Cargo.toml @@ -8,9 +8,9 @@ license.workspace = true publish.workspace = true exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -19,10 +19,10 @@ exclude = [ crate-type = ["cdylib", "rlib"] [features] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] @@ -37,5 +37,5 @@ cw20.workspace = true cw2.workspace = true thiserror.workspace = true semver.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true cosmwasm-schema.workspace = true diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/examples/schema.rs b/contracts/liquidity_hub/pool-network/incentive_factory/examples/schema.rs index 0cd7d3e9..3dcbc5dd 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/examples/schema.rs +++ b/contracts/liquidity_hub/pool-network/incentive_factory/examples/schema.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::write_api; -use white_whale::pool_network::incentive_factory::{ +use white_whale_std::pool_network::incentive_factory::{ ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, }; diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/src/contract.rs b/contracts/liquidity_hub/pool-network/incentive_factory/src/contract.rs index 3dd768ff..95f3c0ba 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/src/contract.rs +++ b/contracts/liquidity_hub/pool-network/incentive_factory/src/contract.rs @@ -6,7 +6,7 @@ use cosmwasm_std::{ use cw2::{get_contract_version, set_contract_version}; use semver::Version; -use white_whale::pool_network::incentive_factory::{ +use white_whale_std::pool_network::incentive_factory::{ Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, }; diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/src/error.rs b/contracts/liquidity_hub/pool-network/incentive_factory/src/error.rs index 0116b98d..f3bddeda 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/src/error.rs +++ b/contracts/liquidity_hub/pool-network/incentive_factory/src/error.rs @@ -1,7 +1,7 @@ use cosmwasm_std::StdError; use semver::Version; use thiserror::Error; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; #[derive(Error, Debug)] pub enum ContractError { diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/create_incentive.rs b/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/create_incentive.rs index 4ca11e8b..4448212a 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/create_incentive.rs +++ b/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/create_incentive.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{to_json_binary, DepsMut, Env, ReplyOn, Response, SubMsg, WasmMsg}; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; use crate::{ error::ContractError, @@ -39,7 +39,7 @@ pub fn create_incentive( msg: WasmMsg::Instantiate { admin: Some(env.contract.address.into_string()), code_id: config.incentive_code_id, - msg: to_json_binary(&white_whale::pool_network::incentive::InstantiateMsg { + msg: to_json_binary(&white_whale_std::pool_network::incentive::InstantiateMsg { lp_asset: lp_asset.clone(), fee_distributor_address: config.fee_distributor_addr.into_string(), })?, diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/migrate_incentive.rs b/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/migrate_incentive.rs index 640681e4..915a7584 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/migrate_incentive.rs +++ b/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/migrate_incentive.rs @@ -48,7 +48,7 @@ fn migrate_incentive_msg(incentive_address: Addr, new_code_id: u64) -> StdResult Ok(CosmosMsg::Wasm(WasmMsg::Migrate { contract_addr: incentive_address.to_string(), new_code_id, - msg: to_json_binary(&white_whale::pool_network::incentive::MigrateMsg {})?, + msg: to_json_binary(&white_whale_std::pool_network::incentive::MigrateMsg {})?, })) } @@ -59,9 +59,9 @@ mod tests { use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info}; use cosmwasm_std::{attr, Addr, Uint128}; - use white_whale::pool_network::asset::{Asset, AssetInfo}; - use white_whale::pool_network::incentive_factory::ExecuteMsg::MigrateIncentives; - use white_whale::pool_network::incentive_factory::InstantiateMsg; + use white_whale_std::pool_network::asset::{Asset, AssetInfo}; + use white_whale_std::pool_network::incentive_factory::ExecuteMsg::MigrateIncentives; + use white_whale_std::pool_network::incentive_factory::InstantiateMsg; use crate::contract::{execute, instantiate}; use crate::state::INCENTIVE_MAPPINGS; diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/update_config.rs b/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/update_config.rs index 1e6b6bd3..bef5b717 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/update_config.rs +++ b/contracts/liquidity_hub/pool-network/incentive_factory/src/execute/update_config.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{DepsMut, Response}; -use white_whale::pool_network::asset::Asset; +use white_whale_std::pool_network::asset::Asset; use crate::{error::ContractError, state::CONFIG}; @@ -111,9 +111,9 @@ mod tests { use crate::error::ContractError; use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info}; use cosmwasm_std::{from_json, Addr, Uint128}; - use white_whale::pool_network::asset::{Asset, AssetInfo}; - use white_whale::pool_network::incentive_factory::ExecuteMsg::UpdateConfig; - use white_whale::pool_network::incentive_factory::{Config, InstantiateMsg, QueryMsg}; + use white_whale_std::pool_network::asset::{Asset, AssetInfo}; + use white_whale_std::pool_network::incentive_factory::ExecuteMsg::UpdateConfig; + use white_whale_std::pool_network::incentive_factory::{Config, InstantiateMsg, QueryMsg}; #[test] fn update_config_successfully() { diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_config.rs b/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_config.rs index 586d057d..2d78f0df 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_config.rs +++ b/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_config.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{Deps, StdError}; -use white_whale::pool_network::incentive_factory::ConfigResponse; +use white_whale_std::pool_network::incentive_factory::ConfigResponse; use crate::state::CONFIG; diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_incentive.rs b/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_incentive.rs index dfead7b9..9e409e2f 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_incentive.rs +++ b/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_incentive.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{Addr, Deps, StdError}; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; use crate::state::INCENTIVE_MAPPINGS; diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_incentives.rs b/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_incentives.rs index bfe6f755..fbc09a09 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_incentives.rs +++ b/contracts/liquidity_hub/pool-network/incentive_factory/src/queries/get_incentives.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{Deps, Order, StdResult, Storage}; use cw_storage_plus::Bound; -use white_whale::pool_network::{ +use white_whale_std::pool_network::{ asset::{AssetInfo, AssetInfoRaw}, incentive_factory::{IncentivesContract, IncentivesResponse}, }; @@ -61,7 +61,7 @@ mod tests { SubMsgResult, }; use protobuf::{Message, SpecialFields}; - use white_whale::pool_network::{asset::AssetInfo, incentive_factory::IncentivesContract}; + use white_whale_std::pool_network::{asset::AssetInfo, incentive_factory::IncentivesContract}; use crate::{ reply::create_incentive_reply::{create_incentive_reply, CREATE_INCENTIVE_REPLY_ID}, @@ -81,7 +81,7 @@ mod tests { Message::write_to_bytes(&MsgInstantiateContractResponse { address: format!("incentive{id}"), data: to_json_binary( - &white_whale::pool_network::incentive::InstantiateReplyCallback { + &white_whale_std::pool_network::incentive::InstantiateReplyCallback { lp_asset: get_lp_asset(id), }, ) diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/src/reply/create_incentive_reply.rs b/contracts/liquidity_hub/pool-network/incentive_factory/src/reply/create_incentive_reply.rs index 1ce283a0..8504ffe3 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/src/reply/create_incentive_reply.rs +++ b/contracts/liquidity_hub/pool-network/incentive_factory/src/reply/create_incentive_reply.rs @@ -28,7 +28,7 @@ pub fn create_incentive_reply(deps: DepsMut, msg: Reply) -> Result<Response, Con let incentive_address = deps.api.addr_validate(&res.address)?; - let incentive_data: white_whale::pool_network::incentive::InstantiateReplyCallback = + let incentive_data: white_whale_std::pool_network::incentive::InstantiateReplyCallback = from_json(&res.data)?; INCENTIVE_MAPPINGS.save( diff --git a/contracts/liquidity_hub/pool-network/incentive_factory/src/state.rs b/contracts/liquidity_hub/pool-network/incentive_factory/src/state.rs index 3af2b6f5..6f2b6e54 100644 --- a/contracts/liquidity_hub/pool-network/incentive_factory/src/state.rs +++ b/contracts/liquidity_hub/pool-network/incentive_factory/src/state.rs @@ -1,6 +1,6 @@ use cosmwasm_std::Addr; use cw_storage_plus::{Item, Map}; -use white_whale::pool_network::incentive_factory::Config; +use white_whale_std::pool_network::incentive_factory::Config; pub const CONFIG: Item<Config> = Item::new("config"); diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/Cargo.toml b/contracts/liquidity_hub/pool-network/stableswap_3pool/Cargo.toml index e18ff0ab..e34a3d56 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/Cargo.toml +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/Cargo.toml @@ -1,9 +1,7 @@ [package] name = "stableswap-3pool" version = "1.2.2" -authors = [ - "Adam J. Weigold <adam@irulast.com>", -] +authors = ["Adam J. Weigold <adam@irulast.com>"] edition.workspace = true license.workspace = true repository.workspace = true @@ -12,9 +10,9 @@ documentation.workspace = true publish.workspace = true exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -23,10 +21,10 @@ exclude = [ crate-type = ["cdylib", "rlib"] [features] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] @@ -43,7 +41,7 @@ serde.workspace = true semver.workspace = true thiserror.workspace = true protobuf.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true cosmwasm-schema.workspace = true [dev-dependencies] diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/sim/Cargo.toml b/contracts/liquidity_hub/pool-network/stableswap_3pool/sim/Cargo.toml index 5e77a38e..e01fbc98 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/sim/Cargo.toml +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/sim/Cargo.toml @@ -10,4 +10,3 @@ name = "sim" [dependencies] pyo3 = { version = "0.17.3", features = ["auto-initialize"] } - diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/bin/3pool_schema.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/bin/3pool_schema.rs index d4e5df2b..9aa446cd 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/bin/3pool_schema.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/bin/3pool_schema.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::write_api; -use white_whale::pool_network::trio::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use white_whale_std::pool_network::trio::{ExecuteMsg, InstantiateMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/commands.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/commands.rs index 7d5d6afe..60d5ee91 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/commands.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/commands.rs @@ -16,18 +16,18 @@ use cosmwasm_std::coins; feature = "osmosis_token_factory", feature = "injective" ))] -use white_whale::pool_network::asset::is_factory_token; -use white_whale::pool_network::asset::{ +use white_whale_std::pool_network::asset::is_factory_token; +use white_whale_std::pool_network::asset::{ Asset, AssetInfo, AssetInfoRaw, TrioInfoRaw, MINIMUM_LIQUIDITY_AMOUNT, }; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::{Coin, MsgBurn, MsgMint}; +use white_whale_std::pool_network::denom::{Coin, MsgBurn, MsgMint}; #[cfg(feature = "injective")] -use white_whale::pool_network::denom_injective::{Coin, MsgBurn, MsgMint}; +use white_whale_std::pool_network::denom_injective::{Coin, MsgBurn, MsgMint}; #[cfg(feature = "osmosis_token_factory")] -use white_whale::pool_network::denom_osmosis::{Coin, MsgBurn, MsgMint}; -use white_whale::pool_network::swap; -use white_whale::pool_network::trio::{Config, Cw20HookMsg, FeatureToggle, PoolFee, RampAmp}; +use white_whale_std::pool_network::denom_osmosis::{Coin, MsgBurn, MsgMint}; +use white_whale_std::pool_network::swap; +use white_whale_std::pool_network::trio::{Config, Cw20HookMsg, FeatureToggle, PoolFee, RampAmp}; use crate::error::ContractError; use crate::helpers; diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/contract.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/contract.rs index 1eb82ea9..0fbe7930 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/contract.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/contract.rs @@ -8,8 +8,8 @@ use cw2::{get_contract_version, set_contract_version}; use protobuf::Message; use semver::Version; -use white_whale::pool_network::asset::{AssetInfoRaw, TrioInfoRaw}; -use white_whale::pool_network::trio::{ +use white_whale_std::pool_network::asset::{AssetInfoRaw, TrioInfoRaw}; +use white_whale_std::pool_network::trio::{ Config, ExecuteMsg, FeatureToggle, InstantiateMsg, MigrateMsg, QueryMsg, }; @@ -281,7 +281,7 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> Result<Binary, ContractErro #[cfg(not(tarpaulin_include))] #[cfg_attr(not(feature = "library"), entry_point)] pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> { - use white_whale::migrate_guards::check_contract_name; + use white_whale_std::migrate_guards::check_contract_name; check_contract_name(deps.storage, CONTRACT_NAME.to_string())?; diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/helpers.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/helpers.rs index 8fe0dcf3..7e1455d4 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/helpers.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/helpers.rs @@ -12,16 +12,16 @@ use cw_storage_plus::Item; feature = "injective" ))] use cosmwasm_std::CosmosMsg; -use white_whale::pool_network::asset::{is_factory_token, Asset, AssetInfo, AssetInfoRaw}; +use white_whale_std::pool_network::asset::{is_factory_token, Asset, AssetInfo, AssetInfoRaw}; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::MsgCreateDenom; +use white_whale_std::pool_network::denom::MsgCreateDenom; #[cfg(feature = "injective")] -use white_whale::pool_network::denom_injective::MsgCreateDenom; +use white_whale_std::pool_network::denom_injective::MsgCreateDenom; #[cfg(feature = "osmosis_token_factory")] -use white_whale::pool_network::denom_osmosis::MsgCreateDenom; -use white_whale::pool_network::querier::query_token_info; -use white_whale::pool_network::token::InstantiateMsg as TokenInstantiateMsg; -use white_whale::pool_network::trio::{InstantiateMsg, PoolFee}; +use white_whale_std::pool_network::denom_osmosis::MsgCreateDenom; +use white_whale_std::pool_network::querier::query_token_info; +use white_whale_std::pool_network::token::InstantiateMsg as TokenInstantiateMsg; +use white_whale_std::pool_network::trio::{InstantiateMsg, PoolFee}; use crate::contract::INSTANTIATE_REPLY_ID; use crate::error::ContractError; diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/queries.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/queries.rs index 67388422..43d15f7f 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/queries.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/queries.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{Deps, StdResult}; use cw_storage_plus::Item; -use white_whale::pool_network::asset::{Asset, AssetInfoRaw, TrioInfo, TrioInfoRaw}; -use white_whale::pool_network::trio::{ +use white_whale_std::pool_network::asset::{Asset, AssetInfoRaw, TrioInfo, TrioInfoRaw}; +use white_whale_std::pool_network::trio::{ ConfigResponse, PoolResponse, ProtocolFeesResponse, ReverseSimulationResponse, SimulationResponse, }; diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/state.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/state.rs index ae5e7dd1..99ebf50c 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/state.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/state.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{StdError, StdResult, Storage, Uint128}; use cw_storage_plus::Item; -use white_whale::pool_network::asset::{Asset, TrioInfoRaw}; -use white_whale::pool_network::trio::Config; +use white_whale_std::pool_network::asset::{Asset, TrioInfoRaw}; +use white_whale_std::pool_network::trio::Config; pub const LP_SYMBOL: &str = "uLP"; diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/feature_toggle.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/feature_toggle.rs index a69fc22d..9483fe4d 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/feature_toggle.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/feature_toggle.rs @@ -3,11 +3,11 @@ use crate::error::ContractError; use cosmwasm_std::testing::{mock_env, mock_info, MOCK_CONTRACT_ADDR}; use cosmwasm_std::{to_json_binary, Coin, Decimal, Uint128}; use cw20::Cw20ReceiveMsg; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::trio::ExecuteMsg::UpdateConfig; -use white_whale::pool_network::trio::{ +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::trio::ExecuteMsg::UpdateConfig; +use white_whale_std::pool_network::trio::{ Cw20HookMsg, ExecuteMsg, FeatureToggle, InstantiateMsg, PoolFee, }; diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/protocol_fees.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/protocol_fees.rs index cf550a96..43f7c41d 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/protocol_fees.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/protocol_fees.rs @@ -7,10 +7,10 @@ use cosmwasm_std::{ SubMsgResult, Uint128, WasmMsg, }; use cw20::{Cw20ExecuteMsg, Cw20ReceiveMsg}; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::trio::{Cw20HookMsg, ExecuteMsg, InstantiateMsg, PoolFee}; +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::trio::{Cw20HookMsg, ExecuteMsg, InstantiateMsg, PoolFee}; #[cfg(not(feature = "osmosis"))] #[test] diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/provide_liquidity.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/provide_liquidity.rs index 00c9a222..a2499b8f 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/provide_liquidity.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/provide_liquidity.rs @@ -10,12 +10,12 @@ use cosmwasm_std::{ SubMsgResult, Uint128, WasmMsg, }; use cw20::Cw20ExecuteMsg; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{Asset, AssetInfo, MINIMUM_LIQUIDITY_AMOUNT}; +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, MINIMUM_LIQUIDITY_AMOUNT}; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::MsgMint; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::trio::{ExecuteMsg, InstantiateMsg, PoolFee}; +use white_whale_std::pool_network::denom::MsgMint; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::trio::{ExecuteMsg, InstantiateMsg, PoolFee}; #[cfg(not(feature = "osmosis"))] #[test] @@ -661,7 +661,7 @@ fn provide_liquidity_token_factory_lp() { let mint_initial_lp_msg_expected = <MsgMint as Into<CosmosMsg>>::into(MsgMint { sender: MOCK_CONTRACT_ADDR.to_string(), - amount: Some(white_whale::pool_network::denom::Coin { + amount: Some(white_whale_std::pool_network::denom::Coin { denom: lp_denom.clone(), amount: (MINIMUM_LIQUIDITY_AMOUNT * Uint128::from(3u8)).to_string(), }), @@ -669,7 +669,7 @@ fn provide_liquidity_token_factory_lp() { let mint_msg_expected = <MsgMint as Into<CosmosMsg>>::into(MsgMint { sender: MOCK_CONTRACT_ADDR.to_string(), - amount: Some(white_whale::pool_network::denom::Coin { + amount: Some(white_whale_std::pool_network::denom::Coin { denom: lp_denom.clone(), amount: "6000".to_string(), }), diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/queries.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/queries.rs index 161d2214..e332e1d2 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/queries.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/queries.rs @@ -3,10 +3,10 @@ use crate::error::ContractError; use crate::queries::query_pool; use cosmwasm_std::testing::{mock_env, mock_info, MOCK_CONTRACT_ADDR}; use cosmwasm_std::{Coin, Decimal, Reply, SubMsgResponse, SubMsgResult, Uint128}; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::trio::{InstantiateMsg, PoolFee, PoolResponse, QueryMsg}; +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::trio::{InstantiateMsg, PoolFee, PoolResponse, QueryMsg}; #[cfg(not(feature = "osmosis"))] #[test] diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/swap.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/swap.rs index 75f6d582..70ae6071 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/swap.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/swap.rs @@ -12,10 +12,10 @@ use cosmwasm_std::{ SubMsg, SubMsgResponse, SubMsgResult, Uint128, WasmMsg, }; use cw20::{Cw20ExecuteMsg, Cw20ReceiveMsg}; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::trio::{ +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::trio::{ Cw20HookMsg, ExecuteMsg, InstantiateMsg, PoolFee, QueryMsg, ReverseSimulationResponse, SimulationResponse, }; diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/testing.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/testing.rs index dc8a84d5..9e2f66f1 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/testing.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/testing.rs @@ -9,15 +9,15 @@ use cw20::MinterResponse; use crate::state::LP_SYMBOL; #[cfg(feature = "token_factory")] use cosmwasm_std::CosmosMsg; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{Asset, AssetInfo, TrioInfo}; +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, TrioInfo}; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::MsgCreateDenom; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::swap::assert_max_spread; -use white_whale::pool_network::token::InstantiateMsg as TokenInstantiateMsg; -use white_whale::pool_network::trio::ExecuteMsg::UpdateConfig; -use white_whale::pool_network::trio::{Config, InstantiateMsg, MigrateMsg, PoolFee, QueryMsg}; +use white_whale_std::pool_network::denom::MsgCreateDenom; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::swap::assert_max_spread; +use white_whale_std::pool_network::token::InstantiateMsg as TokenInstantiateMsg; +use white_whale_std::pool_network::trio::ExecuteMsg::UpdateConfig; +use white_whale_std::pool_network::trio::{Config, InstantiateMsg, MigrateMsg, PoolFee, QueryMsg}; use crate::contract::{execute, instantiate, migrate, query, reply}; use crate::error::ContractError; diff --git a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/withdrawals.rs b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/withdrawals.rs index 7577bd9d..b99653d4 100644 --- a/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/withdrawals.rs +++ b/contracts/liquidity_hub/pool-network/stableswap_3pool/src/tests/withdrawals.rs @@ -11,12 +11,12 @@ use cosmwasm_std::{ SubMsgResult, Uint128, WasmMsg, }; use cw20::{Cw20ExecuteMsg, Cw20ReceiveMsg}; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::AssetInfo; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::MsgBurn; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::trio::{Cw20HookMsg, ExecuteMsg, InstantiateMsg, PoolFee}; +use white_whale_std::pool_network::denom::MsgBurn; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::trio::{Cw20HookMsg, ExecuteMsg, InstantiateMsg, PoolFee}; #[cfg(not(feature = "osmosis"))] #[test] @@ -313,7 +313,7 @@ fn withdraw_liquidity_token_factory_lp() { }); let msg_burn_liquidity_expected = <MsgBurn as Into<CosmosMsg>>::into(MsgBurn { sender: MOCK_CONTRACT_ADDR.to_string(), - amount: Some(white_whale::pool_network::denom::Coin { + amount: Some(white_whale_std::pool_network::denom::Coin { denom: lp_denom.clone(), amount: "6000".to_string(), }), diff --git a/contracts/liquidity_hub/pool-network/terraswap_factory/Cargo.toml b/contracts/liquidity_hub/pool-network/terraswap_factory/Cargo.toml index 5d9b2854..849e4e34 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_factory/Cargo.toml +++ b/contracts/liquidity_hub/pool-network/terraswap_factory/Cargo.toml @@ -2,9 +2,9 @@ name = "terraswap-factory" version = "1.2.1" authors = [ - "Terraform Labs, PTE.", - "DELIGHT LABS", - "Kerber0x <kerber0x@protonmail.com>", + "Terraform Labs, PTE.", + "DELIGHT LABS", + "Kerber0x <kerber0x@protonmail.com>", ] edition.workspace = true description = "A Terraswap factory contract - auto pair contract generator and also directory for all pairs" @@ -13,9 +13,9 @@ publish.workspace = true documentation.workspace = true exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -24,10 +24,10 @@ exclude = [ crate-type = ["cdylib", "rlib"] [features] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] @@ -42,5 +42,5 @@ cw20.workspace = true cw2.workspace = true thiserror.workspace = true semver.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true cosmwasm-schema.workspace = true diff --git a/contracts/liquidity_hub/pool-network/terraswap_factory/src/bin/factory_schema.rs b/contracts/liquidity_hub/pool-network/terraswap_factory/src/bin/factory_schema.rs index 0f42b302..809576b9 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_factory/src/bin/factory_schema.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_factory/src/bin/factory_schema.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::write_api; -use white_whale::pool_network::factory::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use white_whale_std::pool_network::factory::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/pool-network/terraswap_factory/src/commands.rs b/contracts/liquidity_hub/pool-network/terraswap_factory/src/commands.rs index f39ede1d..d05c3033 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_factory/src/commands.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_factory/src/commands.rs @@ -3,16 +3,16 @@ use cosmwasm_std::{ WasmMsg, }; -use white_whale::pool_network; -use white_whale::pool_network::asset::{AssetInfo, PairType}; -use white_whale::pool_network::pair::{ +use white_whale_std::pool_network; +use white_whale_std::pool_network::asset::{AssetInfo, PairType}; +use white_whale_std::pool_network::pair::{ FeatureToggle, InstantiateMsg as PairInstantiateMsg, MigrateMsg as PairMigrateMsg, PoolFee, }; -use white_whale::pool_network::trio::{ +use white_whale_std::pool_network::trio::{ FeatureToggle as TrioFeatureToggle, InstantiateMsg as TrioInstantiateMsg, MigrateMsg as TrioMigrateMsg, PoolFee as TrioPoolFee, RampAmp, }; -use white_whale::pool_network::{pair, trio}; +use white_whale_std::pool_network::{pair, trio}; use crate::contract::{CREATE_PAIR_RESPONSE, CREATE_TRIO_RESPONSE}; use crate::error::ContractError; diff --git a/contracts/liquidity_hub/pool-network/terraswap_factory/src/contract.rs b/contracts/liquidity_hub/pool-network/terraswap_factory/src/contract.rs index c0991572..2f7bc200 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_factory/src/contract.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_factory/src/contract.rs @@ -7,9 +7,11 @@ use cw2::{get_contract_version, set_contract_version}; use protobuf::Message; use semver::Version; -use white_whale::pool_network::asset::{PairInfoRaw, TrioInfoRaw}; -use white_whale::pool_network::factory::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; -use white_whale::pool_network::querier::{query_pair_info_from_pair, query_trio_info_from_trio}; +use white_whale_std::pool_network::asset::{PairInfoRaw, TrioInfoRaw}; +use white_whale_std::pool_network::factory::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use white_whale_std::pool_network::querier::{ + query_pair_info_from_pair, query_trio_info_from_trio, +}; use crate::error::ContractError; use crate::error::ContractError::MigrateInvalidVersion; @@ -242,7 +244,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> { #[cfg(not(tarpaulin_include))] #[cfg_attr(not(feature = "library"), entry_point)] pub fn migrate(mut deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> { - use white_whale::migrate_guards::check_contract_name; + use white_whale_std::migrate_guards::check_contract_name; use crate::migrations; diff --git a/contracts/liquidity_hub/pool-network/terraswap_factory/src/migrations.rs b/contracts/liquidity_hub/pool-network/terraswap_factory/src/migrations.rs index 55978735..5ff57a19 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_factory/src/migrations.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_factory/src/migrations.rs @@ -4,7 +4,7 @@ use cosmwasm_std::{Addr, CanonicalAddr, DepsMut, Order, StdError, Uint128}; use cw_storage_plus::{Item, Map}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use white_whale::pool_network::asset::{AssetInfo, AssetInfoRaw, PairType}; +use white_whale_std::pool_network::asset::{AssetInfo, AssetInfoRaw, PairType}; #[cfg(not(feature = "osmosis"))] /// Migrate state of the factory from PascalCase to snake_case for the following items: diff --git a/contracts/liquidity_hub/pool-network/terraswap_factory/src/queries.rs b/contracts/liquidity_hub/pool-network/terraswap_factory/src/queries.rs index 4e2c6d04..69db24d5 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_factory/src/queries.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_factory/src/queries.rs @@ -2,8 +2,10 @@ use crate::state::{ pair_key, read_pairs, read_trios, trio_key, Config, ALLOW_NATIVE_TOKENS, CONFIG, PAIRS, TRIOS, }; use cosmwasm_std::{Deps, StdResult}; -use white_whale::pool_network::asset::{AssetInfo, PairInfo, PairInfoRaw, TrioInfo, TrioInfoRaw}; -use white_whale::pool_network::factory::{ +use white_whale_std::pool_network::asset::{ + AssetInfo, PairInfo, PairInfoRaw, TrioInfo, TrioInfoRaw, +}; +use white_whale_std::pool_network::factory::{ ConfigResponse, NativeTokenDecimalsResponse, PairsResponse, TriosResponse, }; diff --git a/contracts/liquidity_hub/pool-network/terraswap_factory/src/state.rs b/contracts/liquidity_hub/pool-network/terraswap_factory/src/state.rs index 55e2ce24..e7872f46 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_factory/src/state.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_factory/src/state.rs @@ -1,7 +1,7 @@ use cosmwasm_schema::cw_serde; use cosmwasm_std::{Addr, Api, CanonicalAddr, Order, StdResult, Storage}; use cw_storage_plus::{Bound, Item, Map}; -use white_whale::pool_network::asset::{ +use white_whale_std::pool_network::asset::{ AssetInfoRaw, PairInfo, PairInfoRaw, PairType, TrioInfo, TrioInfoRaw, }; @@ -144,7 +144,7 @@ pub fn add_allow_native_token( #[cfg(test)] mod allow_native_token { - use white_whale::pool_network::mock_querier::mock_dependencies; + use white_whale_std::pool_network::mock_querier::mock_dependencies; use super::*; diff --git a/contracts/liquidity_hub/pool-network/terraswap_factory/src/testing.rs b/contracts/liquidity_hub/pool-network/terraswap_factory/src/testing.rs index f9734b4e..373d7ee0 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_factory/src/testing.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_factory/src/testing.rs @@ -6,19 +6,21 @@ use cosmwasm_std::{ Reply, ReplyOn, Response, SubMsg, SubMsgResponse, SubMsgResult, Uint128, WasmMsg, }; -use white_whale::fee::Fee; -use white_whale::pool_network; -use white_whale::pool_network::asset::{AssetInfo, AssetInfoRaw, PairInfo, PairInfoRaw, PairType}; -use white_whale::pool_network::factory::{ +use white_whale_std::fee::Fee; +use white_whale_std::pool_network; +use white_whale_std::pool_network::asset::{ + AssetInfo, AssetInfoRaw, PairInfo, PairInfoRaw, PairType, +}; +use white_whale_std::pool_network::factory::{ ConfigResponse, ExecuteMsg, InstantiateMsg, MigrateMsg, NativeTokenDecimalsResponse, QueryMsg, }; -use white_whale::pool_network::mock_querier::{ +use white_whale_std::pool_network::mock_querier::{ mock_dependencies, mock_dependencies_trio, WasmMockQuerier, WasmMockTrioQuerier, }; -use white_whale::pool_network::pair::{ +use white_whale_std::pool_network::pair::{ InstantiateMsg as PairInstantiateMsg, MigrateMsg as PairMigrateMsg, PoolFee, }; -use white_whale::pool_network::trio::{ +use white_whale_std::pool_network::trio::{ InstantiateMsg as TrioInstantiateMsg, MigrateMsg as TrioMigrateMsg, PoolFee as TrioPoolFee, }; diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/Cargo.toml b/contracts/liquidity_hub/pool-network/terraswap_pair/Cargo.toml index 63e7168d..79e7ecf9 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/Cargo.toml +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/Cargo.toml @@ -2,10 +2,10 @@ name = "terraswap-pair" version = "1.3.3" authors = [ - "Terraform Labs, PTE.", - "DELIGHT LABS", - "Kerber0x <kerber0x@protonmail.com>", - "kaimen-sano <kaimen_sano@protonmail.com>", + "Terraform Labs, PTE.", + "DELIGHT LABS", + "Kerber0x <kerber0x@protonmail.com>", + "kaimen-sano <kaimen_sano@protonmail.com>", ] edition.workspace = true description = "A Terraswap pair contract" @@ -14,9 +14,9 @@ publish.workspace = true documentation.workspace = true exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -28,10 +28,10 @@ crate-type = ["cdylib", "rlib"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] [dependencies] cw2.workspace = true @@ -44,10 +44,10 @@ serde.workspace = true semver.workspace = true thiserror.workspace = true protobuf.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true cosmwasm-schema.workspace = true anybuf.workspace = true [dev-dependencies] cw-multi-test.workspace = true -cw20-base.workspace = true \ No newline at end of file +cw20-base.workspace = true diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/rustfmt.toml b/contracts/liquidity_hub/pool-network/terraswap_pair/rustfmt.toml index 11a85e6a..6918e223 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/rustfmt.toml +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/rustfmt.toml @@ -12,4 +12,3 @@ tab_spaces = 4 #struct_field_align_threshold = 20 #struct_lit_single_line = true #report_todo = "Always" - diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/bin/pair_schema.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/bin/pair_schema.rs index 328f88f1..bf40709a 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/bin/pair_schema.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/bin/pair_schema.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::write_api; -use white_whale::pool_network::pair::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use white_whale_std::pool_network::pair::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/commands.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/commands.rs index c0f98223..ea441663 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/commands.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/commands.rs @@ -17,19 +17,19 @@ use cw20::{Cw20ExecuteMsg, Cw20ReceiveMsg}; feature = "osmosis_token_factory", feature = "injective" ))] -use white_whale::pool_network::asset::is_factory_token; -use white_whale::pool_network::asset::{ +use white_whale_std::pool_network::asset::is_factory_token; +use white_whale_std::pool_network::asset::{ get_total_share, has_factory_token, Asset, AssetInfo, AssetInfoRaw, PairInfoRaw, MINIMUM_LIQUIDITY_AMOUNT, }; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::{Coin, MsgBurn, MsgMint}; +use white_whale_std::pool_network::denom::{Coin, MsgBurn, MsgMint}; #[cfg(feature = "injective")] -use white_whale::pool_network::denom_injective::{Coin, MsgBurn, MsgMint}; +use white_whale_std::pool_network::denom_injective::{Coin, MsgBurn, MsgMint}; #[cfg(feature = "osmosis_token_factory")] -use white_whale::pool_network::denom_osmosis::{Coin, MsgBurn, MsgMint}; -use white_whale::pool_network::pair::{Config, Cw20HookMsg, FeatureToggle, PoolFee}; -use white_whale::pool_network::{swap, U256}; +use white_whale_std::pool_network::denom_osmosis::{Coin, MsgBurn, MsgMint}; +use white_whale_std::pool_network::pair::{Config, Cw20HookMsg, FeatureToggle, PoolFee}; +use white_whale_std::pool_network::{swap, U256}; use crate::error::ContractError; use crate::helpers; diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/contract.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/contract.rs index dc267f91..865437bd 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/contract.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/contract.rs @@ -8,8 +8,8 @@ use cw2::{get_contract_version, set_contract_version}; use protobuf::Message; use semver::Version; -use white_whale::pool_network::asset::{has_factory_token, AssetInfoRaw, PairInfoRaw}; -use white_whale::pool_network::pair::{ +use white_whale_std::pool_network::asset::{has_factory_token, AssetInfoRaw, PairInfoRaw}; +use white_whale_std::pool_network::pair::{ Config, ExecuteMsg, FeatureToggle, InstantiateMsg, MigrateMsg, QueryMsg, }; @@ -233,7 +233,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> Result<Binary, ContractErr #[cfg(not(tarpaulin_include))] #[cfg_attr(not(feature = "library"), entry_point)] pub fn migrate(mut deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> { - use white_whale::migrate_guards::check_contract_name; + use white_whale_std::migrate_guards::check_contract_name; #[cfg(not(feature = "osmosis"))] use crate::migrations; diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/helpers.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/helpers.rs index 0a191801..13b32709 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/helpers.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/helpers.rs @@ -14,15 +14,15 @@ use cosmwasm_std::{ use cw20::MinterResponse; use cw_storage_plus::Item; -use white_whale::pool_network::asset::{Asset, AssetInfo, AssetInfoRaw, PairType}; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, AssetInfoRaw, PairType}; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::MsgCreateDenom; +use white_whale_std::pool_network::denom::MsgCreateDenom; #[cfg(feature = "injective")] -use white_whale::pool_network::denom_injective::MsgCreateDenom; +use white_whale_std::pool_network::denom_injective::MsgCreateDenom; #[cfg(feature = "osmosis_token_factory")] -use white_whale::pool_network::denom_osmosis::MsgCreateDenom; -use white_whale::pool_network::pair::{InstantiateMsg, PoolFee}; -use white_whale::pool_network::token::InstantiateMsg as TokenInstantiateMsg; +use white_whale_std::pool_network::denom_osmosis::MsgCreateDenom; +use white_whale_std::pool_network::pair::{InstantiateMsg, PoolFee}; +use white_whale_std::pool_network::token::InstantiateMsg as TokenInstantiateMsg; use crate::contract::INSTANTIATE_REPLY_ID; use crate::error::ContractError; diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/migrations.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/migrations.rs index a2e9f73d..c1653bec 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/migrations.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/migrations.rs @@ -9,10 +9,10 @@ use schemars::JsonSchema; #[cfg(not(feature = "injective"))] use serde::{Deserialize, Serialize}; -use white_whale::fee::Fee; -use white_whale::pool_network; -use white_whale::pool_network::asset::{AssetInfo, AssetInfoRaw, PairType}; -use white_whale::pool_network::pair::{Config, FeatureToggle}; +use white_whale_std::fee::Fee; +use white_whale_std::pool_network; +use white_whale_std::pool_network::asset::{AssetInfo, AssetInfoRaw, PairType}; +use white_whale_std::pool_network::pair::{Config, FeatureToggle}; use crate::helpers::instantiate_fees; #[cfg(not(feature = "injective"))] diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/queries.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/queries.rs index 6f2fc265..cd61b04a 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/queries.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/queries.rs @@ -3,10 +3,10 @@ use std::cmp::Ordering; use cosmwasm_std::{Decimal256, Deps, Fraction, StdResult, Uint128}; use cw_storage_plus::Item; -use white_whale::pool_network::asset::{ +use white_whale_std::pool_network::asset::{ get_total_share, Asset, AssetInfoRaw, PairInfo, PairInfoRaw, PairType, }; -use white_whale::pool_network::pair::{ +use white_whale_std::pool_network::pair::{ ConfigResponse, PoolResponse, ProtocolFeesResponse, ReverseSimulationResponse, SimulationResponse, }; diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/state.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/state.rs index 0e75831c..c61afc2c 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/state.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/state.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{StdError, StdResult, Storage, Uint128}; use cw_storage_plus::Item; -use white_whale::pool_network::asset::{Asset, PairInfoRaw}; -use white_whale::pool_network::pair::Config; +use white_whale_std::pool_network::asset::{Asset, PairInfoRaw}; +use white_whale_std::pool_network::pair::Config; pub const LP_SYMBOL: &str = "uLP"; diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/feature_toggle.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/feature_toggle.rs index 4ffad952..82c1d5bf 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/feature_toggle.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/feature_toggle.rs @@ -3,11 +3,11 @@ use crate::error::ContractError; use cosmwasm_std::testing::{mock_env, mock_info, MOCK_CONTRACT_ADDR}; use cosmwasm_std::{to_json_binary, Coin, Decimal, Uint128}; use cw20::Cw20ReceiveMsg; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{Asset, AssetInfo, PairType}; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::pair::ExecuteMsg::UpdateConfig; -use white_whale::pool_network::pair::{ +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, PairType}; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::pair::ExecuteMsg::UpdateConfig; +use white_whale_std::pool_network::pair::{ Cw20HookMsg, ExecuteMsg, FeatureToggle, InstantiateMsg, PoolFee, }; diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/mock_instantiate.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/mock_instantiate.rs index 464f6bee..e13480a4 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/mock_instantiate.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/mock_instantiate.rs @@ -2,9 +2,9 @@ use cosmwasm_std::testing::mock_info; use cosmwasm_std::{Addr, MessageInfo}; use cw_multi_test::{App, Executor}; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{AssetInfo, PairType}; -use white_whale::pool_network::pair::PoolFee; +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{AssetInfo, PairType}; +use white_whale_std::pool_network::pair::PoolFee; use crate::tests::store_code::{store_cw20_token_code, store_pool}; @@ -26,7 +26,7 @@ pub fn app_mock_instantiate( app.instantiate_contract( pool_id, creator.clone(), - &white_whale::pool_network::pair::InstantiateMsg { + &white_whale_std::pool_network::pair::InstantiateMsg { asset_infos, token_code_id: token_id, asset_decimals, diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/protocol_fees.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/protocol_fees.rs index f3459fc7..a8d7a56d 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/protocol_fees.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/protocol_fees.rs @@ -7,10 +7,10 @@ use cosmwasm_std::{ SubMsgResult, Uint128, WasmMsg, }; use cw20::{Cw20ExecuteMsg, Cw20ReceiveMsg}; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{Asset, AssetInfo, PairType}; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::pair::{Cw20HookMsg, ExecuteMsg, InstantiateMsg, PoolFee}; +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, PairType}; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::pair::{Cw20HookMsg, ExecuteMsg, InstantiateMsg, PoolFee}; #[cfg(not(feature = "osmosis"))] #[test] diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/provide_liquidity.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/provide_liquidity.rs index e26f6f17..25d48e4a 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/provide_liquidity.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/provide_liquidity.rs @@ -7,14 +7,14 @@ use cosmwasm_std::{ }; use cw20::Cw20ExecuteMsg; -use white_whale::fee::Fee; +use white_whale_std::fee::Fee; #[cfg(feature = "token_factory")] -use white_whale::pool_network; -use white_whale::pool_network::asset::{Asset, AssetInfo, PairType, MINIMUM_LIQUIDITY_AMOUNT}; +use white_whale_std::pool_network; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, PairType, MINIMUM_LIQUIDITY_AMOUNT}; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::MsgMint; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::pair::{ExecuteMsg, InstantiateMsg, PoolFee}; +use white_whale_std::pool_network::denom::MsgMint; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::pair::{ExecuteMsg, InstantiateMsg, PoolFee}; use crate::contract::{execute, instantiate, reply}; use crate::error::ContractError; diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/queries.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/queries.rs index e2375687..e9428cf6 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/queries.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/queries.rs @@ -3,10 +3,10 @@ use crate::error::ContractError; use crate::queries::query_pool; use cosmwasm_std::testing::{mock_env, mock_info, MOCK_CONTRACT_ADDR}; use cosmwasm_std::{Coin, Decimal, Reply, SubMsgResponse, SubMsgResult, Uint128}; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{Asset, AssetInfo, PairType}; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::pair::{InstantiateMsg, PoolFee, PoolResponse, QueryMsg}; +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, PairType}; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::pair::{InstantiateMsg, PoolFee, PoolResponse, QueryMsg}; #[cfg(not(feature = "osmosis"))] #[test] diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/stableswap.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/stableswap.rs index e5a5b3b6..9157b759 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/stableswap.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/stableswap.rs @@ -1,8 +1,8 @@ #[cfg(test)] mod tests { use cosmwasm_std::{Decimal, Decimal256, Uint128}; - use white_whale::fee::Fee; - use white_whale::pool_network::{asset::PairType, pair::PoolFee}; + use white_whale_std::fee::Fee; + use white_whale_std::pool_network::{asset::PairType, pair::PoolFee}; use crate::{ helpers::{calculate_stableswap_y, compute_swap, StableSwapDirection, SwapComputation}, diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/swap.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/swap.rs index ec3e77e1..bab59863 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/swap.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/swap.rs @@ -6,10 +6,10 @@ use cosmwasm_std::{ }; use cw20::{Cw20ExecuteMsg, Cw20ReceiveMsg}; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{Asset, AssetInfo, PairType}; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::pair::{ +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, PairType}; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::pair::{ Cw20HookMsg, ExecuteMsg, InstantiateMsg, PoolFee, QueryMsg, ReverseSimulationResponse, SimulationResponse, }; diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/testing.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/testing.rs index d57eba05..68a3d7c3 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/testing.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/testing.rs @@ -7,15 +7,15 @@ use cosmwasm_std::{ }; use cw20::MinterResponse; -use white_whale::fee::Fee; -use white_whale::pool_network::asset::{Asset, AssetInfo, PairInfo, PairType}; +use white_whale_std::fee::Fee; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, PairInfo, PairType}; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::MsgCreateDenom; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::pair::ExecuteMsg::UpdateConfig; -use white_whale::pool_network::pair::{Config, InstantiateMsg, PoolFee, QueryMsg}; -use white_whale::pool_network::swap::assert_max_spread; -use white_whale::pool_network::token::InstantiateMsg as TokenInstantiateMsg; +use white_whale_std::pool_network::denom::MsgCreateDenom; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::pair::ExecuteMsg::UpdateConfig; +use white_whale_std::pool_network::pair::{Config, InstantiateMsg, PoolFee, QueryMsg}; +use white_whale_std::pool_network::swap::assert_max_spread; +use white_whale_std::pool_network::token::InstantiateMsg as TokenInstantiateMsg; use crate::contract::{execute, instantiate, query, reply}; use crate::error::ContractError; diff --git a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/withdrawals.rs b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/withdrawals.rs index b03642a7..0c9a2680 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/withdrawals.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_pair/src/tests/withdrawals.rs @@ -9,14 +9,14 @@ use cw20::{Cw20ExecuteMsg, Cw20ReceiveMsg}; use crate::state::LP_SYMBOL; #[cfg(feature = "token_factory")] use cosmwasm_std::coin; -use white_whale::fee::Fee; +use white_whale_std::fee::Fee; #[cfg(feature = "token_factory")] -use white_whale::pool_network; -use white_whale::pool_network::asset::{AssetInfo, PairType}; +use white_whale_std::pool_network; +use white_whale_std::pool_network::asset::{AssetInfo, PairType}; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::MsgBurn; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::pair::{Cw20HookMsg, ExecuteMsg, InstantiateMsg, PoolFee}; +use white_whale_std::pool_network::denom::MsgBurn; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::pair::{Cw20HookMsg, ExecuteMsg, InstantiateMsg, PoolFee}; use crate::contract::{execute, instantiate, reply}; use crate::error::ContractError; diff --git a/contracts/liquidity_hub/pool-network/terraswap_router/Cargo.toml b/contracts/liquidity_hub/pool-network/terraswap_router/Cargo.toml index f4e8c54c..94a65682 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_router/Cargo.toml +++ b/contracts/liquidity_hub/pool-network/terraswap_router/Cargo.toml @@ -2,9 +2,9 @@ name = "terraswap-router" version = "1.1.1" authors = [ - "Terraform Labs, PTE.", - "DELIGHT LABS", - "Kerber0x <kerber0x@protonmail.com>", + "Terraform Labs, PTE.", + "DELIGHT LABS", + "Kerber0x <kerber0x@protonmail.com>", ] edition.workspace = true description = "A Terraswap router contract - provides multi-step operations to facilitate single sign operation" @@ -13,9 +13,9 @@ publish.workspace = true documentation.workspace = true exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -27,16 +27,16 @@ crate-type = ["cdylib", "rlib"] # for quicker tests, cargo test --lib # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] [dependencies] cw2.workspace = true cw20.workspace = true cosmwasm-std.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true cw-storage-plus.workspace = true integer-sqrt = "0.1.5" schemars.workspace = true diff --git a/contracts/liquidity_hub/pool-network/terraswap_router/rustfmt.toml b/contracts/liquidity_hub/pool-network/terraswap_router/rustfmt.toml index 11a85e6a..6918e223 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_router/rustfmt.toml +++ b/contracts/liquidity_hub/pool-network/terraswap_router/rustfmt.toml @@ -12,4 +12,3 @@ tab_spaces = 4 #struct_field_align_threshold = 20 #struct_lit_single_line = true #report_todo = "Always" - diff --git a/contracts/liquidity_hub/pool-network/terraswap_router/src/bin/router_schema.rs b/contracts/liquidity_hub/pool-network/terraswap_router/src/bin/router_schema.rs index f7ace836..76ebda9a 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_router/src/bin/router_schema.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_router/src/bin/router_schema.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::write_api; -use white_whale::pool_network::router::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use white_whale_std::pool_network::router::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/pool-network/terraswap_router/src/contract.rs b/contracts/liquidity_hub/pool-network/terraswap_router/src/contract.rs index 0c27ff42..c30bbdd6 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_router/src/contract.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_router/src/contract.rs @@ -10,10 +10,10 @@ use cw2::{get_contract_version, set_contract_version}; use cw20::Cw20ReceiveMsg; use semver::Version; -use white_whale::pool_network::asset::{Asset, AssetInfo, PairInfo}; -use white_whale::pool_network::pair::SimulationResponse; -use white_whale::pool_network::querier::{query_pair_info, reverse_simulate, simulate}; -use white_whale::pool_network::router::{ +use white_whale_std::pool_network::asset::{Asset, AssetInfo, PairInfo}; +use white_whale_std::pool_network::pair::SimulationResponse; +use white_whale_std::pool_network::querier::{query_pair_info, reverse_simulate, simulate}; +use white_whale_std::pool_network::router::{ ConfigResponse, Cw20HookMsg, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SimulateSwapOperationsResponse, SwapOperation, SwapRoute, SwapRouteResponse, }; @@ -544,7 +544,7 @@ fn test_invalid_operations() { #[cfg(not(tarpaulin_include))] #[cfg_attr(not(feature = "library"), entry_point)] pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> { - use white_whale::migrate_guards::check_contract_name; + use white_whale_std::migrate_guards::check_contract_name; check_contract_name(deps.storage, CONTRACT_NAME.to_string())?; diff --git a/contracts/liquidity_hub/pool-network/terraswap_router/src/error.rs b/contracts/liquidity_hub/pool-network/terraswap_router/src/error.rs index bd15980c..4799fa40 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_router/src/error.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_router/src/error.rs @@ -2,7 +2,7 @@ use cosmwasm_std::{OverflowError, StdError, Uint128}; use semver::Version; use thiserror::Error; -use white_whale::pool_network::router::SwapRoute; +use white_whale_std::pool_network::router::SwapRoute; #[derive(Error, Debug)] pub enum ContractError { diff --git a/contracts/liquidity_hub/pool-network/terraswap_router/src/operations.rs b/contracts/liquidity_hub/pool-network/terraswap_router/src/operations.rs index dd96e810..77fd85e9 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_router/src/operations.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_router/src/operations.rs @@ -7,11 +7,11 @@ use crate::state::{Config, CONFIG}; use crate::error::ContractError; use cw20::Cw20ExecuteMsg; -use white_whale::pool_network; -use white_whale::pool_network::asset::{Asset, AssetInfo, PairInfo}; -use white_whale::pool_network::pair::ExecuteMsg as PairExecuteMsg; -use white_whale::pool_network::querier::{query_balance, query_pair_info, query_token_balance}; -use white_whale::pool_network::router::SwapOperation; +use white_whale_std::pool_network; +use white_whale_std::pool_network::asset::{Asset, AssetInfo, PairInfo}; +use white_whale_std::pool_network::pair::ExecuteMsg as PairExecuteMsg; +use white_whale_std::pool_network::querier::{query_balance, query_pair_info, query_token_balance}; +use white_whale_std::pool_network::router::SwapOperation; /// Execute swap operation /// swap all offer asset to ask asset diff --git a/contracts/liquidity_hub/pool-network/terraswap_router/src/state.rs b/contracts/liquidity_hub/pool-network/terraswap_router/src/state.rs index 30c931ce..6aa6e506 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_router/src/state.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_router/src/state.rs @@ -1,7 +1,7 @@ use cosmwasm_schema::cw_serde; use cosmwasm_std::CanonicalAddr; use cw_storage_plus::{Item, Map}; -use white_whale::pool_network::router::SwapOperation; +use white_whale_std::pool_network::router::SwapOperation; #[cw_serde] pub struct Config { diff --git a/contracts/liquidity_hub/pool-network/terraswap_router/src/testing/tests.rs b/contracts/liquidity_hub/pool-network/terraswap_router/src/testing/tests.rs index ab1e0986..95571700 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_router/src/testing/tests.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_router/src/testing/tests.rs @@ -4,12 +4,12 @@ use cosmwasm_std::{ WasmMsg, }; use cw20::{Cw20ExecuteMsg, Cw20ReceiveMsg}; -use white_whale::pool_network; +use white_whale_std::pool_network; -use white_whale::pool_network::asset::{Asset, AssetInfo, PairInfo, PairType}; -use white_whale::pool_network::mock_querier::mock_dependencies; -use white_whale::pool_network::pair::ExecuteMsg as PairExecuteMsg; -use white_whale::pool_network::router::{ +use white_whale_std::pool_network::asset::{Asset, AssetInfo, PairInfo, PairType}; +use white_whale_std::pool_network::mock_querier::mock_dependencies; +use white_whale_std::pool_network::pair::ExecuteMsg as PairExecuteMsg; +use white_whale_std::pool_network::router::{ ConfigResponse, Cw20HookMsg, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SimulateSwapOperationsResponse, SwapOperation, SwapRoute, SwapRouteResponse, }; diff --git a/contracts/liquidity_hub/pool-network/terraswap_token/Cargo.toml b/contracts/liquidity_hub/pool-network/terraswap_token/Cargo.toml index 87f4e792..7e73d272 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_token/Cargo.toml +++ b/contracts/liquidity_hub/pool-network/terraswap_token/Cargo.toml @@ -13,10 +13,10 @@ documentation = "https://docs.cosmwasm.com" crate-type = ["cdylib", "rlib"] [features] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] backtraces = ["cosmwasm-std/backtraces"] # use library feature to disable all init/handle/query exports library = [] @@ -31,7 +31,7 @@ cosmwasm-std.workspace = true schemars.workspace = true serde.workspace = true thiserror.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true [dev-dependencies] cosmwasm-schema = "1.1.4" diff --git a/contracts/liquidity_hub/pool-network/terraswap_token/src/contract.rs b/contracts/liquidity_hub/pool-network/terraswap_token/src/contract.rs index 56c9dab6..c6a76abe 100644 --- a/contracts/liquidity_hub/pool-network/terraswap_token/src/contract.rs +++ b/contracts/liquidity_hub/pool-network/terraswap_token/src/contract.rs @@ -7,7 +7,7 @@ use cw20_base::msg::{ExecuteMsg, QueryMsg}; use cw20_base::state::{MinterData, TokenInfo, TOKEN_INFO}; use cw20_base::ContractError; -use white_whale::pool_network::token::InstantiateMsg; +use white_whale_std::pool_network::token::InstantiateMsg; // version info for migration info const CONTRACT_NAME: &str = "white_whale-cw20_token"; diff --git a/contracts/liquidity_hub/vault-network/vault/Cargo.toml b/contracts/liquidity_hub/vault-network/vault/Cargo.toml index 65ba9897..f49989fb 100644 --- a/contracts/liquidity_hub/vault-network/vault/Cargo.toml +++ b/contracts/liquidity_hub/vault-network/vault/Cargo.toml @@ -14,10 +14,10 @@ publish.workspace = true crate-type = ["cdylib", "rlib"] [features] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] backtraces = ["cosmwasm-std/backtraces"] [dependencies] @@ -32,7 +32,7 @@ schemars.workspace = true semver.workspace = true serde.workspace = true thiserror.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true [dev-dependencies] cosmwasm-schema.workspace = true diff --git a/contracts/liquidity_hub/vault-network/vault/src/bin/vault_schema.rs b/contracts/liquidity_hub/vault-network/vault/src/bin/vault_schema.rs index 384f9566..4084c843 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/bin/vault_schema.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/bin/vault_schema.rs @@ -1,5 +1,5 @@ use cosmwasm_schema::write_api; -use white_whale::vault_network::vault::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use white_whale_std::vault_network::vault::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/vault-network/vault/src/contract.rs b/contracts/liquidity_hub/vault-network/vault/src/contract.rs index 7f9e9682..0b4fa767 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/contract.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/contract.rs @@ -7,9 +7,9 @@ use cw20::MinterResponse; use semver::Version; #[cfg(feature = "injective")] -use white_whale::pool_network::asset::PEGGY_PREFIX; -use white_whale::pool_network::asset::{has_factory_token, AssetInfo, IBC_PREFIX}; -use white_whale::vault_network::vault::{ +use white_whale_std::pool_network::asset::PEGGY_PREFIX; +use white_whale_std::pool_network::asset::{has_factory_token, AssetInfo, IBC_PREFIX}; +use white_whale_std::vault_network::vault::{ Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, INSTANTIATE_LP_TOKEN_REPLY_ID, }; @@ -30,11 +30,11 @@ use crate::execute::receive::withdraw::withdraw; ))] use cosmwasm_std::CosmosMsg; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::MsgCreateDenom; +use white_whale_std::pool_network::denom::MsgCreateDenom; #[cfg(feature = "injective")] -use white_whale::pool_network::denom_injective::MsgCreateDenom; +use white_whale_std::pool_network::denom_injective::MsgCreateDenom; #[cfg(feature = "osmosis_token_factory")] -use white_whale::pool_network::denom_osmosis::MsgCreateDenom; +use white_whale_std::pool_network::denom_osmosis::MsgCreateDenom; const CONTRACT_NAME: &str = "white_whale-vault"; const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); @@ -153,7 +153,7 @@ pub fn instantiate( msg: WasmMsg::Instantiate { admin: None, code_id: msg.token_id, - msg: to_json_binary(&white_whale::pool_network::token::InstantiateMsg { + msg: to_json_binary(&white_whale_std::pool_network::token::InstantiateMsg { name: lp_label.clone(), symbol: lp_symbol, decimals: 6, @@ -209,7 +209,7 @@ pub fn execute( pub fn migrate(mut deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, VaultError> { // initialize the loan counter - use white_whale::migrate_guards::check_contract_name; + use white_whale_std::migrate_guards::check_contract_name; LOAN_COUNTER.save(deps.storage, &0)?; check_contract_name(deps.storage, CONTRACT_NAME.to_string())?; diff --git a/contracts/liquidity_hub/vault-network/vault/src/execute/callback/after_trade.rs b/contracts/liquidity_hub/vault-network/vault/src/execute/callback/after_trade.rs index 3094f292..13770747 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/execute/callback/after_trade.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/execute/callback/after_trade.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{DepsMut, Env, Response, StdError, Uint128, Uint256}; use cw20::{BalanceResponse, Cw20QueryMsg}; -use white_whale::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; use crate::state::{store_fee, ALL_TIME_BURNED_FEES}; use crate::{ @@ -102,9 +102,9 @@ mod test { }; use cw20::Cw20ExecuteMsg; - use white_whale::fee::{Fee, VaultFee}; - use white_whale::pool_network::asset::{Asset, AssetInfo}; - use white_whale::vault_network::vault::Config; + use white_whale_std::fee::{Fee, VaultFee}; + use white_whale_std::pool_network::asset::{Asset, AssetInfo}; + use white_whale_std::vault_network::vault::Config; use crate::state::ALL_TIME_BURNED_FEES; use crate::{ @@ -130,7 +130,7 @@ mod test { deps.as_mut(), env.clone(), mock_creator(), - white_whale::vault_network::vault::InstantiateMsg { + white_whale_std::vault_network::vault::InstantiateMsg { owner: mock_creator().sender.into_string(), token_id: 5, asset_info: AssetInfo::NativeToken { @@ -157,8 +157,8 @@ mod test { deps.as_mut(), env.clone(), mock_info(&env.contract.address.into_string(), &[]), - white_whale::vault_network::vault::ExecuteMsg::Callback( - white_whale::vault_network::vault::CallbackMsg::AfterTrade { + white_whale_std::vault_network::vault::ExecuteMsg::Callback( + white_whale_std::vault_network::vault::CallbackMsg::AfterTrade { old_balance: Uint128::new(5_000), loan_amount: Uint128::new(1_000), }, @@ -296,8 +296,8 @@ mod test { deps.as_mut(), env.clone(), mock_info(&env.contract.address.into_string(), &[]), - white_whale::vault_network::vault::ExecuteMsg::Callback( - white_whale::vault_network::vault::CallbackMsg::AfterTrade { + white_whale_std::vault_network::vault::ExecuteMsg::Callback( + white_whale_std::vault_network::vault::CallbackMsg::AfterTrade { old_balance: Uint128::new(5_000), loan_amount: Uint128::new(1_000), }, @@ -381,7 +381,7 @@ mod test { deps.as_mut(), env.clone(), mock_creator(), - white_whale::vault_network::vault::InstantiateMsg { + white_whale_std::vault_network::vault::InstantiateMsg { owner: mock_creator().sender.into_string(), token_id: 5, asset_info: AssetInfo::NativeToken { @@ -398,8 +398,8 @@ mod test { deps.as_mut(), env.clone(), mock_info(&env.contract.address.into_string(), &[]), - white_whale::vault_network::vault::ExecuteMsg::Callback( - white_whale::vault_network::vault::CallbackMsg::AfterTrade { + white_whale_std::vault_network::vault::ExecuteMsg::Callback( + white_whale_std::vault_network::vault::CallbackMsg::AfterTrade { old_balance: Uint128::new(5_000), loan_amount: Uint128::new(1_000), }, @@ -454,8 +454,8 @@ mod test { deps.as_mut(), env.clone(), mock_info(&env.contract.address.into_string(), &[]), - white_whale::vault_network::vault::ExecuteMsg::Callback( - white_whale::vault_network::vault::CallbackMsg::AfterTrade { + white_whale_std::vault_network::vault::ExecuteMsg::Callback( + white_whale_std::vault_network::vault::CallbackMsg::AfterTrade { old_balance: Uint128::new(5_000), loan_amount: Uint128::new(1_000), }, @@ -537,8 +537,8 @@ mod test { deps.as_mut(), env.clone(), mock_info(&env.contract.address.into_string(), &[]), - white_whale::vault_network::vault::ExecuteMsg::Callback( - white_whale::vault_network::vault::CallbackMsg::AfterTrade { + white_whale_std::vault_network::vault::ExecuteMsg::Callback( + white_whale_std::vault_network::vault::CallbackMsg::AfterTrade { old_balance: Uint128::new(5_000), loan_amount: Uint128::new(1_000), }, diff --git a/contracts/liquidity_hub/vault-network/vault/src/execute/callback/mod.rs b/contracts/liquidity_hub/vault-network/vault/src/execute/callback/mod.rs index 57631c9f..47a36849 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/execute/callback/mod.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/execute/callback/mod.rs @@ -3,7 +3,7 @@ mod after_trade; pub use after_trade::after_trade; use cosmwasm_std::{DepsMut, Env, MessageInfo, Response}; -use white_whale::vault_network::vault::CallbackMsg; +use white_whale_std::vault_network::vault::CallbackMsg; use crate::error::VaultError; @@ -30,7 +30,7 @@ pub fn callback( mod test { use cosmwasm_std::{coins, Uint128}; use cw_multi_test::Executor; - use white_whale::pool_network::asset::AssetInfo; + use white_whale_std::pool_network::asset::AssetInfo; use crate::{ error::VaultError, @@ -50,8 +50,8 @@ mod test { denom: "uluna".to_string(), }, false, - white_whale::vault_network::vault::ExecuteMsg::Callback( - white_whale::vault_network::vault::CallbackMsg::AfterTrade { + white_whale_std::vault_network::vault::ExecuteMsg::Callback( + white_whale_std::vault_network::vault::CallbackMsg::AfterTrade { old_balance: Uint128::new(5_000), loan_amount: Uint128::new(2_500), }, @@ -73,7 +73,7 @@ mod test { .instantiate_contract( vault_id, mock_creator().sender, - &white_whale::vault_network::vault::InstantiateMsg { + &white_whale_std::vault_network::vault::InstantiateMsg { owner: mock_creator().sender.into_string(), token_id, asset_info: AssetInfo::NativeToken { @@ -93,8 +93,8 @@ mod test { app.execute_contract( vault_addr.clone(), vault_addr, - &white_whale::vault_network::vault::ExecuteMsg::Callback( - white_whale::vault_network::vault::CallbackMsg::AfterTrade { + &white_whale_std::vault_network::vault::ExecuteMsg::Callback( + white_whale_std::vault_network::vault::CallbackMsg::AfterTrade { old_balance: Uint128::new(0), loan_amount: Uint128::new(1_000), }, diff --git a/contracts/liquidity_hub/vault-network/vault/src/execute/collect_protocol_fee.rs b/contracts/liquidity_hub/vault-network/vault/src/execute/collect_protocol_fee.rs index bb95991f..d9b09486 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/execute/collect_protocol_fee.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/execute/collect_protocol_fee.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{attr, CosmosMsg, DepsMut, Response, Uint128}; -use white_whale::pool_network::asset::Asset; +use white_whale_std::pool_network::asset::Asset; use crate::{ error::VaultError, @@ -38,8 +38,8 @@ pub fn collect_protocol_fees(deps: DepsMut) -> Result<Response, VaultError> { #[cfg(test)] mod test { use cosmwasm_std::{attr, coins, BankMsg, Response, StdError, Uint128}; - use white_whale::pool_network::asset::{Asset, AssetInfo}; - use white_whale::vault_network::vault::ExecuteMsg; + use white_whale_std::pool_network::asset::{Asset, AssetInfo}; + use white_whale_std::vault_network::vault::ExecuteMsg; use crate::{ contract::execute, diff --git a/contracts/liquidity_hub/vault-network/vault/src/execute/deposit.rs b/contracts/liquidity_hub/vault-network/vault/src/execute/deposit.rs index f0ec8dc2..16553fad 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/execute/deposit.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/execute/deposit.rs @@ -14,15 +14,15 @@ use cw20::{AllowanceResponse, Cw20ExecuteMsg}; feature = "osmosis_token_factory", feature = "injective" ))] -use white_whale::pool_network::asset::is_factory_token; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::pool_network::asset::{get_total_share, MINIMUM_LIQUIDITY_AMOUNT}; +use white_whale_std::pool_network::asset::is_factory_token; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::{get_total_share, MINIMUM_LIQUIDITY_AMOUNT}; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::{Coin, MsgMint}; +use white_whale_std::pool_network::denom::{Coin, MsgMint}; #[cfg(feature = "injective")] -use white_whale::pool_network::denom_injective::{Coin, MsgMint}; +use white_whale_std::pool_network::denom_injective::{Coin, MsgMint}; #[cfg(feature = "osmosis_token_factory")] -use white_whale::pool_network::denom_osmosis::{Coin, MsgMint}; +use white_whale_std::pool_network::denom_osmosis::{Coin, MsgMint}; use crate::{ error::VaultError, @@ -219,8 +219,8 @@ mod test { use cw20::Cw20ExecuteMsg; use cw_multi_test::Executor; - use white_whale::pool_network::asset::AssetInfo; - use white_whale::vault_network::vault::Config; + use white_whale_std::pool_network::asset::AssetInfo; + use white_whale_std::vault_network::vault::Config; use crate::tests::mock_app::mock_app_with_balance; use crate::tests::mock_instantiate::app_mock_instantiate; @@ -272,7 +272,7 @@ mod test { deps.as_mut(), env.clone(), mock_info("creator", &coins(5_000, "uluna")), - white_whale::vault_network::vault::ExecuteMsg::Deposit { + white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(5_000), }, ); @@ -348,7 +348,7 @@ mod test { deps.as_mut(), env.clone(), mock_creator(), - white_whale::vault_network::vault::ExecuteMsg::Deposit { + white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(5_000), }, ); @@ -398,7 +398,7 @@ mod test { denom: "uluna".to_string(), }, false, - white_whale::vault_network::vault::ExecuteMsg::Deposit { + white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(5_000), }, ); @@ -445,7 +445,7 @@ mod test { deps.as_mut(), env, mock_creator(), - white_whale::vault_network::vault::ExecuteMsg::Deposit { + white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(5_000), }, ); @@ -489,7 +489,7 @@ mod test { deps.as_mut(), env, mock_creator(), - white_whale::vault_network::vault::ExecuteMsg::Deposit { + white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(5_000), }, ); @@ -529,7 +529,7 @@ mod test { deps.as_mut(), mock_env(), mock_creator(), - white_whale::vault_network::vault::ExecuteMsg::Deposit { + white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(5_000), }, ); @@ -563,7 +563,7 @@ mod test { app.execute_contract( mock_creator().sender, vault_addr.clone(), - &white_whale::vault_network::vault::ExecuteMsg::Deposit { + &white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(10_000), }, &coins(10_000, "uluna"), @@ -575,7 +575,7 @@ mod test { .wrap() .query_wasm_smart( vault_addr.clone(), - &white_whale::vault_network::vault::QueryMsg::Config {}, + &white_whale_std::vault_network::vault::QueryMsg::Config {}, ) .unwrap(); @@ -622,7 +622,7 @@ mod test { app.execute_contract( second_depositor.clone(), vault_addr.clone(), - &white_whale::vault_network::vault::ExecuteMsg::Deposit { + &white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(5_000), }, &coins(5_000, "uluna"), @@ -646,7 +646,7 @@ mod test { app.execute_contract( third_depositor.clone(), vault_addr.clone(), - &white_whale::vault_network::vault::ExecuteMsg::Deposit { + &white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(8_000), }, &coins(8_000, "uluna"), @@ -702,7 +702,7 @@ mod test { app.execute_contract( mock_creator().sender, vault_addr.clone(), - &white_whale::vault_network::vault::ExecuteMsg::Deposit { + &white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(1_000_000_000_000000000000000000), }, &coins(1_000_000_000_000000000000000000, "inj"), @@ -713,7 +713,7 @@ mod test { app.execute_contract( second_depositor.clone(), vault_addr.clone(), - &white_whale::vault_network::vault::ExecuteMsg::Deposit { + &white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(1_000_000_000_000000000000000000), }, &coins(1_000_000_000_000000000000000000, "inj"), diff --git a/contracts/liquidity_hub/vault-network/vault/src/execute/flash_loan.rs b/contracts/liquidity_hub/vault-network/vault/src/execute/flash_loan.rs index 9ea8da16..8060ad05 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/execute/flash_loan.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/execute/flash_loan.rs @@ -3,8 +3,8 @@ use cosmwasm_std::{ StdError, Uint128, WasmMsg, }; use cw20::{BalanceResponse, Cw20ExecuteMsg, Cw20QueryMsg}; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::vault_network::vault::{CallbackMsg, ExecuteMsg}; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::vault_network::vault::{CallbackMsg, ExecuteMsg}; use crate::{ error::VaultError, @@ -106,8 +106,8 @@ mod test { testing::{mock_dependencies, mock_dependencies_with_balance, mock_env}, to_json_binary, Addr, BankMsg, Response, Uint128, WasmMsg, }; - use white_whale::pool_network::asset::AssetInfo; - use white_whale::vault_network::vault::Config; + use white_whale_std::pool_network::asset::AssetInfo; + use white_whale_std::vault_network::vault::Config; use crate::{ contract::{execute, instantiate}, @@ -145,7 +145,7 @@ mod test { deps.as_mut(), env, mock_creator(), - white_whale::vault_network::vault::ExecuteMsg::FlashLoan { + white_whale_std::vault_network::vault::ExecuteMsg::FlashLoan { amount: Uint128::new(5_000), msg: to_json_binary(&BankMsg::Burn { amount: vec![] }).unwrap(), }, @@ -165,7 +165,7 @@ mod test { deps.as_mut(), env.clone(), mock_creator(), - white_whale::vault_network::vault::InstantiateMsg { + white_whale_std::vault_network::vault::InstantiateMsg { owner: mock_creator().sender.into_string(), token_id: 2, asset_info: AssetInfo::NativeToken { @@ -185,7 +185,7 @@ mod test { deps.as_mut(), env, mock_creator(), - white_whale::vault_network::vault::ExecuteMsg::FlashLoan { + white_whale_std::vault_network::vault::ExecuteMsg::FlashLoan { amount: Uint128::new(5_000), msg: callback_msg, }, @@ -207,7 +207,7 @@ mod test { deps.as_mut(), env.clone(), mock_creator(), - white_whale::vault_network::vault::InstantiateMsg { + white_whale_std::vault_network::vault::InstantiateMsg { owner: mock_creator().sender.into_string(), token_id: 2, asset_info: AssetInfo::NativeToken { @@ -224,7 +224,7 @@ mod test { deps.as_mut(), env.clone(), mock_creator(), - white_whale::vault_network::vault::ExecuteMsg::FlashLoan { + white_whale_std::vault_network::vault::ExecuteMsg::FlashLoan { amount: Uint128::new(5_000), msg: callback_msg.clone(), }, @@ -245,8 +245,8 @@ mod test { contract_addr: env.contract.address.into_string(), funds: vec![], msg: to_json_binary( - &white_whale::vault_network::vault::ExecuteMsg::Callback( - white_whale::vault_network::vault::CallbackMsg::AfterTrade { + &white_whale_std::vault_network::vault::ExecuteMsg::Callback( + white_whale_std::vault_network::vault::CallbackMsg::AfterTrade { old_balance: Uint128::new(10_000), loan_amount: Uint128::new(5_000) } @@ -300,7 +300,7 @@ mod test { deps.as_mut(), env.clone(), mock_creator(), - white_whale::vault_network::vault::ExecuteMsg::FlashLoan { + white_whale_std::vault_network::vault::ExecuteMsg::FlashLoan { amount: Uint128::new(5_000), msg: callback_msg.clone(), }, @@ -330,8 +330,8 @@ mod test { contract_addr: env.contract.address.into_string(), funds: vec![], msg: to_json_binary( - &white_whale::vault_network::vault::ExecuteMsg::Callback( - white_whale::vault_network::vault::CallbackMsg::AfterTrade { + &white_whale_std::vault_network::vault::ExecuteMsg::Callback( + white_whale_std::vault_network::vault::CallbackMsg::AfterTrade { old_balance: Uint128::new(10_000), loan_amount: Uint128::new(5_000) } diff --git a/contracts/liquidity_hub/vault-network/vault/src/execute/receive/mod.rs b/contracts/liquidity_hub/vault-network/vault/src/execute/receive/mod.rs index b0b0d5b0..19e3a019 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/execute/receive/mod.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/execute/receive/mod.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{from_json, DepsMut, Env, MessageInfo, Response}; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::vault_network::vault::{Cw20HookMsg, Cw20ReceiveMsg}; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::vault_network::vault::{Cw20HookMsg, Cw20ReceiveMsg}; use withdraw::withdraw; use crate::{error::VaultError, state::CONFIG}; @@ -43,8 +43,8 @@ mod test { ))] use cosmwasm_std::testing::mock_info; - use white_whale::pool_network::asset::AssetInfo; - use white_whale::vault_network::vault::Config; + use white_whale_std::pool_network::asset::AssetInfo; + use white_whale_std::vault_network::vault::Config; use crate::state::CONFIG; use crate::tests::get_fees; @@ -86,11 +86,13 @@ mod test { deps.as_mut(), env, mock_creator(), - white_whale::vault_network::vault::Cw20ReceiveMsg { + white_whale_std::vault_network::vault::Cw20ReceiveMsg { sender: mock_creator().sender.into_string(), amount: Uint128::new(5_000), - msg: to_json_binary(&white_whale::vault_network::vault::Cw20HookMsg::Withdraw {}) - .unwrap(), + msg: to_json_binary( + &white_whale_std::vault_network::vault::Cw20HookMsg::Withdraw {}, + ) + .unwrap(), }, ); @@ -133,11 +135,13 @@ mod test { deps.as_mut(), env, mock_info("lp_token_2", &[]), //wrong cw20 LP token - white_whale::vault_network::vault::Cw20ReceiveMsg { + white_whale_std::vault_network::vault::Cw20ReceiveMsg { sender: mock_creator().sender.into_string(), amount: Uint128::new(5_000), - msg: to_json_binary(&white_whale::vault_network::vault::Cw20HookMsg::Withdraw {}) - .unwrap(), + msg: to_json_binary( + &white_whale_std::vault_network::vault::Cw20HookMsg::Withdraw {}, + ) + .unwrap(), }, ); diff --git a/contracts/liquidity_hub/vault-network/vault/src/execute/receive/withdraw.rs b/contracts/liquidity_hub/vault-network/vault/src/execute/receive/withdraw.rs index 82afb514..3da8e5d0 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/execute/receive/withdraw.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/execute/receive/withdraw.rs @@ -8,14 +8,14 @@ use cw20::{BalanceResponse, Cw20ExecuteMsg, Cw20QueryMsg}; feature = "osmosis_token_factory", feature = "injective" ))] -use white_whale::pool_network::asset::is_factory_token; -use white_whale::pool_network::asset::{get_total_share, AssetInfo}; +use white_whale_std::pool_network::asset::is_factory_token; +use white_whale_std::pool_network::asset::{get_total_share, AssetInfo}; #[cfg(feature = "token_factory")] -use white_whale::pool_network::denom::{Coin, MsgBurn}; +use white_whale_std::pool_network::denom::{Coin, MsgBurn}; #[cfg(feature = "injective")] -use white_whale::pool_network::denom_injective::{Coin, MsgBurn}; +use white_whale_std::pool_network::denom_injective::{Coin, MsgBurn}; #[cfg(feature = "osmosis_token_factory")] -use white_whale::pool_network::denom_osmosis::{Coin, MsgBurn}; +use white_whale_std::pool_network::denom_osmosis::{Coin, MsgBurn}; use crate::state::COLLECTED_PROTOCOL_FEES; use crate::{error::VaultError, state::CONFIG}; @@ -142,8 +142,8 @@ mod tests { use cw20::Cw20ExecuteMsg; use cw_multi_test::Executor; - use white_whale::pool_network::asset::{Asset, AssetInfo}; - use white_whale::vault_network::vault::{Config, UpdateConfigParams}; + use white_whale_std::pool_network::asset::{Asset, AssetInfo}; + use white_whale_std::vault_network::vault::{Config, UpdateConfigParams}; use crate::state::COLLECTED_PROTOCOL_FEES; use crate::{ @@ -167,12 +167,12 @@ mod tests { denom: "uluna".to_string(), }, false, - white_whale::vault_network::vault::ExecuteMsg::Receive( - white_whale::vault_network::vault::Cw20ReceiveMsg { + white_whale_std::vault_network::vault::ExecuteMsg::Receive( + white_whale_std::vault_network::vault::Cw20ReceiveMsg { sender: mock_creator().sender.into_string(), amount: Uint128::new(5_000), msg: to_json_binary( - &white_whale::vault_network::vault::Cw20HookMsg::Withdraw {}, + &white_whale_std::vault_network::vault::Cw20HookMsg::Withdraw {}, ) .unwrap(), }, @@ -189,12 +189,12 @@ mod tests { denom: "uluna".to_string(), }, false, - white_whale::vault_network::vault::ExecuteMsg::Receive( - white_whale::vault_network::vault::Cw20ReceiveMsg { + white_whale_std::vault_network::vault::ExecuteMsg::Receive( + white_whale_std::vault_network::vault::Cw20ReceiveMsg { sender: mock_creator().sender.into_string(), amount: Uint128::new(5_000), msg: to_json_binary( - &white_whale::vault_network::vault::Cw20HookMsg::Withdraw {}, + &white_whale_std::vault_network::vault::Cw20HookMsg::Withdraw {}, ) .unwrap(), }, @@ -211,7 +211,7 @@ mod tests { denom: "uluna".to_string(), }, false, - white_whale::vault_network::vault::ExecuteMsg::UpdateConfig(UpdateConfigParams { + white_whale_std::vault_network::vault::ExecuteMsg::UpdateConfig(UpdateConfigParams { flash_loan_enabled: None, deposit_enabled: None, withdraw_enabled: Some(false), @@ -248,12 +248,12 @@ mod tests { deps.as_mut(), mock_env(), mock_info("lp_token", &[]), - white_whale::vault_network::vault::ExecuteMsg::Receive( - white_whale::vault_network::vault::Cw20ReceiveMsg { + white_whale_std::vault_network::vault::ExecuteMsg::Receive( + white_whale_std::vault_network::vault::Cw20ReceiveMsg { amount: Uint128::new(2_000), sender: mock_creator().sender.into_string(), msg: to_json_binary( - &white_whale::vault_network::vault::Cw20HookMsg::Withdraw {}, + &white_whale_std::vault_network::vault::Cw20HookMsg::Withdraw {}, ) .unwrap(), }, @@ -280,7 +280,7 @@ mod tests { .wrap() .query_wasm_smart( vault_addr.clone(), - &white_whale::vault_network::vault::QueryMsg::Config {}, + &white_whale_std::vault_network::vault::QueryMsg::Config {}, ) .unwrap(); @@ -292,7 +292,7 @@ mod tests { app.execute_contract( mock_creator().sender, vault_addr.clone(), - &white_whale::vault_network::vault::ExecuteMsg::Deposit { + &white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(10_000), }, &coins(10_000, "uluna"), @@ -307,8 +307,10 @@ mod tests { &Cw20ExecuteMsg::Send { contract: vault_addr.to_string(), amount: Uint128::new(4_500), - msg: to_json_binary(&white_whale::vault_network::vault::Cw20HookMsg::Withdraw {}) - .unwrap(), + msg: to_json_binary( + &white_whale_std::vault_network::vault::Cw20HookMsg::Withdraw {}, + ) + .unwrap(), }, &[], ) @@ -374,7 +376,7 @@ mod tests { .wrap() .query_wasm_smart( vault_addr.clone(), - &white_whale::vault_network::vault::QueryMsg::Config {}, + &white_whale_std::vault_network::vault::QueryMsg::Config {}, ) .unwrap(); @@ -400,7 +402,7 @@ mod tests { app.execute_contract( mock_creator().sender, vault_addr.clone(), - &white_whale::vault_network::vault::ExecuteMsg::Deposit { + &white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(10_000), }, &[], @@ -415,8 +417,10 @@ mod tests { &Cw20ExecuteMsg::Send { contract: vault_addr.to_string(), amount: Uint128::new(4_500), - msg: to_json_binary(&white_whale::vault_network::vault::Cw20HookMsg::Withdraw {}) - .unwrap(), + msg: to_json_binary( + &white_whale_std::vault_network::vault::Cw20HookMsg::Withdraw {}, + ) + .unwrap(), }, &[], ) @@ -509,12 +513,12 @@ mod tests { deps.as_mut(), env, mock_info("lp_token", &[]), - white_whale::vault_network::vault::ExecuteMsg::Receive( - white_whale::vault_network::vault::Cw20ReceiveMsg { + white_whale_std::vault_network::vault::ExecuteMsg::Receive( + white_whale_std::vault_network::vault::Cw20ReceiveMsg { amount: Uint128::new(5_000), sender: mock_creator().sender.into_string(), msg: to_json_binary( - &white_whale::vault_network::vault::Cw20HookMsg::Withdraw {}, + &white_whale_std::vault_network::vault::Cw20HookMsg::Withdraw {}, ) .unwrap(), }, @@ -621,12 +625,12 @@ mod tests { deps.as_mut(), env, mock_info("lp_token", &[]), - white_whale::vault_network::vault::ExecuteMsg::Receive( - white_whale::vault_network::vault::Cw20ReceiveMsg { + white_whale_std::vault_network::vault::ExecuteMsg::Receive( + white_whale_std::vault_network::vault::Cw20ReceiveMsg { amount: Uint128::new(5_000), sender: mock_creator().sender.into_string(), msg: to_json_binary( - &white_whale::vault_network::vault::Cw20HookMsg::Withdraw {}, + &white_whale_std::vault_network::vault::Cw20HookMsg::Withdraw {}, ) .unwrap(), }, diff --git a/contracts/liquidity_hub/vault-network/vault/src/execute/update_config.rs b/contracts/liquidity_hub/vault-network/vault/src/execute/update_config.rs index 80f42931..be8ce368 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/execute/update_config.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/execute/update_config.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{Decimal, DepsMut, MessageInfo, Response}; -use white_whale::pool_network::asset::has_factory_token; -use white_whale::vault_network::vault::UpdateConfigParams; +use white_whale_std::pool_network::asset::has_factory_token; +use white_whale_std::vault_network::vault::UpdateConfigParams; use crate::{error::VaultError, state::CONFIG}; @@ -75,9 +75,9 @@ mod test { Addr, Decimal, Response, StdError, Uint128, }; - use white_whale::fee::{Fee, VaultFee}; - use white_whale::pool_network::asset::AssetInfo; - use white_whale::vault_network::vault::{Config, UpdateConfigParams}; + use white_whale_std::fee::{Fee, VaultFee}; + use white_whale_std::pool_network::asset::AssetInfo; + use white_whale_std::vault_network::vault::{Config, UpdateConfigParams}; use crate::{ contract::execute, @@ -100,7 +100,7 @@ mod test { deps.as_mut(), env, mock_info("unauthorized", &[]), - white_whale::vault_network::vault::ExecuteMsg::UpdateConfig(UpdateConfigParams { + white_whale_std::vault_network::vault::ExecuteMsg::UpdateConfig(UpdateConfigParams { flash_loan_enabled: None, deposit_enabled: None, withdraw_enabled: None, @@ -139,7 +139,7 @@ mod test { deps.as_mut(), env, mock_creator(), - white_whale::vault_network::vault::ExecuteMsg::UpdateConfig(UpdateConfigParams { + white_whale_std::vault_network::vault::ExecuteMsg::UpdateConfig(UpdateConfigParams { flash_loan_enabled: None, deposit_enabled: None, withdraw_enabled: None, @@ -193,7 +193,7 @@ mod test { deps.as_mut(), env, mock_creator(), - white_whale::vault_network::vault::ExecuteMsg::UpdateConfig(UpdateConfigParams { + white_whale_std::vault_network::vault::ExecuteMsg::UpdateConfig(UpdateConfigParams { flash_loan_enabled: None, deposit_enabled: None, withdraw_enabled: None, @@ -258,7 +258,7 @@ mod test { deps.as_mut(), env, mock_creator(), - white_whale::vault_network::vault::ExecuteMsg::UpdateConfig(UpdateConfigParams { + white_whale_std::vault_network::vault::ExecuteMsg::UpdateConfig(UpdateConfigParams { flash_loan_enabled: Some(true), deposit_enabled: Some(true), withdraw_enabled: Some(true), diff --git a/contracts/liquidity_hub/vault-network/vault/src/migrations.rs b/contracts/liquidity_hub/vault-network/vault/src/migrations.rs index 1d82a9a0..c1bbb00d 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/migrations.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/migrations.rs @@ -4,9 +4,9 @@ use cosmwasm_schema::cw_serde; use cosmwasm_std::{Addr, Decimal, DepsMut, StdError}; use cw_storage_plus::Item; -use white_whale::fee::{Fee, VaultFee}; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::vault_network::vault::Config; +use white_whale_std::fee::{Fee, VaultFee}; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::vault_network::vault::Config; use crate::state::{initialize_fee, ALL_TIME_BURNED_FEES, CONFIG}; diff --git a/contracts/liquidity_hub/vault-network/vault/src/queries/get_config.rs b/contracts/liquidity_hub/vault-network/vault/src/queries/get_config.rs index c1f4efbe..a0a01982 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/queries/get_config.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/queries/get_config.rs @@ -14,8 +14,8 @@ mod test { testing::{mock_dependencies, mock_env}, Addr, }; - use white_whale::pool_network::asset::AssetInfo; - use white_whale::vault_network::vault::Config; + use white_whale_std::pool_network::asset::AssetInfo; + use white_whale_std::vault_network::vault::Config; use crate::{ contract::query, @@ -49,7 +49,7 @@ mod test { &query( deps.as_ref(), env, - white_whale::vault_network::vault::QueryMsg::Config {}, + white_whale_std::vault_network::vault::QueryMsg::Config {}, ) .unwrap(), ) diff --git a/contracts/liquidity_hub/vault-network/vault/src/queries/get_payback_amount.rs b/contracts/liquidity_hub/vault-network/vault/src/queries/get_payback_amount.rs index f695a04d..010674f1 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/queries/get_payback_amount.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/queries/get_payback_amount.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{to_json_binary, Binary, Deps, Uint128, Uint256}; -use white_whale::vault_network::vault::PaybackAmountResponse; +use white_whale_std::vault_network::vault::PaybackAmountResponse; use crate::error::VaultError; use crate::state::CONFIG; @@ -33,9 +33,9 @@ mod test { use crate::tests::mock_creator; use cosmwasm_std::testing::{mock_dependencies, mock_env}; use cosmwasm_std::{from_json, Addr, Decimal, Uint128}; - use white_whale::fee::{Fee, VaultFee}; - use white_whale::pool_network::asset::AssetInfo; - use white_whale::vault_network::vault::{Config, PaybackAmountResponse, QueryMsg}; + use white_whale_std::fee::{Fee, VaultFee}; + use white_whale_std::pool_network::asset::AssetInfo; + use white_whale_std::vault_network::vault::{Config, PaybackAmountResponse, QueryMsg}; #[test] fn returns_payback_amount() { diff --git a/contracts/liquidity_hub/vault-network/vault/src/queries/get_protocol_fees.rs b/contracts/liquidity_hub/vault-network/vault/src/queries/get_protocol_fees.rs index 9c05f6ff..3d1a38c3 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/queries/get_protocol_fees.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/queries/get_protocol_fees.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{to_json_binary, Binary, Deps, StdError}; use cw_storage_plus::Item; -use white_whale::pool_network::asset::Asset; -use white_whale::vault_network::vault::ProtocolFeesResponse; +use white_whale_std::pool_network::asset::Asset; +use white_whale_std::vault_network::vault::ProtocolFeesResponse; use crate::error::VaultError; @@ -32,8 +32,8 @@ mod test { Uint128, }; - use white_whale::pool_network::asset::{Asset, AssetInfo}; - use white_whale::vault_network::vault::{ProtocolFeesResponse, QueryMsg}; + use white_whale_std::pool_network::asset::{Asset, AssetInfo}; + use white_whale_std::vault_network::vault::{ProtocolFeesResponse, QueryMsg}; use crate::state::ALL_TIME_BURNED_FEES; use crate::{ diff --git a/contracts/liquidity_hub/vault-network/vault/src/queries/get_share.rs b/contracts/liquidity_hub/vault-network/vault/src/queries/get_share.rs index 504d898d..9c157164 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/queries/get_share.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/queries/get_share.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{to_json_binary, Binary, Decimal, Deps, Env, Uint128}; use cw20::{BalanceResponse, Cw20QueryMsg}; -use white_whale::pool_network::asset::{get_total_share, AssetInfo}; +use white_whale_std::pool_network::asset::{get_total_share, AssetInfo}; use crate::error::VaultError; use crate::state::COLLECTED_PROTOCOL_FEES; @@ -47,8 +47,8 @@ pub fn get_share(deps: Deps, env: Env, amount: Uint128) -> Result<Binary, VaultE mod test { use cosmwasm_std::{coins, from_json, testing::mock_env, Addr, Uint128}; - use white_whale::pool_network::asset::{Asset, AssetInfo}; - use white_whale::vault_network::vault::Config; + use white_whale_std::pool_network::asset::{Asset, AssetInfo}; + use white_whale_std::vault_network::vault::Config; use crate::state::COLLECTED_PROTOCOL_FEES; use crate::{ @@ -116,7 +116,7 @@ mod test { &query( deps.as_ref(), env, - white_whale::vault_network::vault::QueryMsg::Share { + white_whale_std::vault_network::vault::QueryMsg::Share { amount: Uint128::new(15_000), }, ) @@ -187,7 +187,7 @@ mod test { &query( deps.as_ref(), env, - white_whale::vault_network::vault::QueryMsg::Share { + white_whale_std::vault_network::vault::QueryMsg::Share { amount: Uint128::new(15_000), }, ) diff --git a/contracts/liquidity_hub/vault-network/vault/src/reply/lp_instantiate.rs b/contracts/liquidity_hub/vault-network/vault/src/reply/lp_instantiate.rs index 23a89796..483da3e8 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/reply/lp_instantiate.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/reply/lp_instantiate.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{DepsMut, Reply, Response, StdError, StdResult}; use protobuf::Message; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; use crate::{response::MsgInstantiateContractResponse, state::CONFIG}; diff --git a/contracts/liquidity_hub/vault-network/vault/src/reply/mod.rs b/contracts/liquidity_hub/vault-network/vault/src/reply/mod.rs index ce0ec232..1fb3fe70 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/reply/mod.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/reply/mod.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{entry_point, DepsMut, Env, Reply, Response, StdError, StdResult}; -use white_whale::vault_network::vault::INSTANTIATE_LP_TOKEN_REPLY_ID; +use white_whale_std::vault_network::vault::INSTANTIATE_LP_TOKEN_REPLY_ID; mod lp_instantiate; diff --git a/contracts/liquidity_hub/vault-network/vault/src/state.rs b/contracts/liquidity_hub/vault-network/vault/src/state.rs index 8bc20545..b34c03c7 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/state.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/state.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{StdError, StdResult, Storage, Uint128}; use cw_storage_plus::Item; -use white_whale::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; -use white_whale::vault_network::vault::Config; +use white_whale_std::vault_network::vault::Config; pub const CONFIG: Item<Config> = Item::new("config"); diff --git a/contracts/liquidity_hub/vault-network/vault/src/tests/get_fees.rs b/contracts/liquidity_hub/vault-network/vault/src/tests/get_fees.rs index fdd8f406..c6e60a54 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/tests/get_fees.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/tests/get_fees.rs @@ -1,5 +1,5 @@ use cosmwasm_std::Decimal; -use white_whale::fee::{Fee, VaultFee}; +use white_whale_std::fee::{Fee, VaultFee}; pub fn get_fees() -> VaultFee { VaultFee { diff --git a/contracts/liquidity_hub/vault-network/vault/src/tests/mock_execute.rs b/contracts/liquidity_hub/vault-network/vault/src/tests/mock_execute.rs index 9d88e6c0..f1cb8695 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/tests/mock_execute.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/tests/mock_execute.rs @@ -2,7 +2,7 @@ use cosmwasm_std::{ testing::{MockApi, MockQuerier, MockStorage}, Env, OwnedDeps, Response, }; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; use crate::contract::execute; use crate::error::VaultError; @@ -13,7 +13,7 @@ pub fn mock_execute( token_id: u64, asset_info: AssetInfo, token_factory_lp: bool, - msg: white_whale::vault_network::vault::ExecuteMsg, + msg: white_whale_std::vault_network::vault::ExecuteMsg, ) -> ( Result<Response, VaultError>, OwnedDeps<MockStorage, MockApi, MockQuerier>, diff --git a/contracts/liquidity_hub/vault-network/vault/src/tests/mock_instantiate.rs b/contracts/liquidity_hub/vault-network/vault/src/tests/mock_instantiate.rs index 34afd584..0ea5aea3 100644 --- a/contracts/liquidity_hub/vault-network/vault/src/tests/mock_instantiate.rs +++ b/contracts/liquidity_hub/vault-network/vault/src/tests/mock_instantiate.rs @@ -3,7 +3,7 @@ use cosmwasm_std::{ Addr, Env, OwnedDeps, }; use cw_multi_test::{App, Executor}; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; use crate::contract::instantiate; @@ -29,7 +29,7 @@ pub fn mock_instantiate( deps.as_mut(), env.clone(), creator.clone(), - white_whale::vault_network::vault::InstantiateMsg { + white_whale_std::vault_network::vault::InstantiateMsg { owner: creator.sender.to_string(), token_id, asset_info, @@ -54,7 +54,7 @@ pub fn app_mock_instantiate(app: &mut App, asset_info: AssetInfo) -> Addr { .instantiate_contract( fee_collector_id, mock_creator().sender, - &white_whale::fee_collector::InstantiateMsg {}, + &white_whale_std::fee_collector::InstantiateMsg {}, &[], "mock fee collector", None, @@ -64,7 +64,7 @@ pub fn app_mock_instantiate(app: &mut App, asset_info: AssetInfo) -> Addr { app.instantiate_contract( vault_id, creator.clone().sender, - &white_whale::vault_network::vault::InstantiateMsg { + &white_whale_std::vault_network::vault::InstantiateMsg { owner: creator.sender.into_string(), token_id, asset_info, diff --git a/contracts/liquidity_hub/vault-network/vault_factory/Cargo.toml b/contracts/liquidity_hub/vault-network/vault_factory/Cargo.toml index 10095398..0a049514 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/Cargo.toml +++ b/contracts/liquidity_hub/vault-network/vault_factory/Cargo.toml @@ -2,7 +2,7 @@ name = "vault_factory" version = "1.1.3" authors = [ - "kaimen-sano <kaimen_sano@protonmail.com>, Kerber0x <kerber0x@protonmail.com>", + "kaimen-sano <kaimen_sano@protonmail.com>, Kerber0x <kerber0x@protonmail.com>", ] edition.workspace = true description = "Contract to facilitate the vault network" @@ -16,10 +16,10 @@ publish.workspace = true crate-type = ["cdylib", "rlib"] [features] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] backtraces = ["cosmwasm-std/backtraces"] [dependencies] @@ -32,7 +32,7 @@ schemars.workspace = true semver.workspace = true serde.workspace = true thiserror.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true cosmwasm-schema.workspace = true [dev-dependencies] diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/asset.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/asset.rs index 1d4530d0..45747fdc 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/asset.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/asset.rs @@ -1,4 +1,4 @@ -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; pub trait AssetReference { fn get_reference(&self) -> &[u8]; diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/bin/vault_factory_schema.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/bin/vault_factory_schema.rs index 164d4414..755b07b4 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/bin/vault_factory_schema.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/bin/vault_factory_schema.rs @@ -1,6 +1,8 @@ use cosmwasm_schema::write_api; -use white_whale::vault_network::vault_factory::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use white_whale_std::vault_network::vault_factory::{ + ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, +}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/contract.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/contract.rs index 9a3e439d..02776912 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/contract.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/contract.rs @@ -2,7 +2,7 @@ use cosmwasm_std::{entry_point, Binary, Deps, DepsMut, Env, MessageInfo, Respons use cw2::{get_contract_version, set_contract_version}; use semver::Version; -use white_whale::vault_network::vault_factory::{ +use white_whale_std::vault_network::vault_factory::{ Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, }; @@ -71,7 +71,7 @@ pub fn execute(deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg) -> S #[cfg(not(tarpaulin_include))] #[cfg_attr(not(feature = "library"), entry_point)] pub fn migrate(mut deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult<Response> { - use white_whale::migrate_guards::check_contract_name; + use white_whale_std::migrate_guards::check_contract_name; check_contract_name(deps.storage, CONTRACT_NAME.to_string())?; @@ -95,7 +95,7 @@ pub fn migrate(mut deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult<Resp #[cfg(test)] mod test { - use white_whale::vault_network::vault_factory::MigrateMsg; + use white_whale_std::vault_network::vault_factory::MigrateMsg; use crate::err::VaultFactoryError; use crate::tests::mock_instantiate::mock_instantiate; diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/execute/create_vault.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/execute/create_vault.rs index fd6cecad..09fcc107 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/execute/create_vault.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/execute/create_vault.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{to_json_binary, DepsMut, Env, MessageInfo, ReplyOn, Response, SubMsg, WasmMsg}; -use white_whale::fee::VaultFee; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::vault_network::vault::InstantiateMsg; -use white_whale::vault_network::vault_factory::INSTANTIATE_VAULT_REPLY_ID; +use white_whale_std::fee::VaultFee; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::vault_network::vault::InstantiateMsg; +use white_whale_std::vault_network::vault_factory::INSTANTIATE_VAULT_REPLY_ID; use crate::{ asset::AssetReference, @@ -74,9 +74,9 @@ mod tests { WasmMsg, }; use cw_multi_test::Executor; - use white_whale::fee::{Fee, VaultFee}; - use white_whale::pool_network::asset::AssetInfo; - use white_whale::vault_network::vault_factory::INSTANTIATE_VAULT_REPLY_ID; + use white_whale_std::fee::{Fee, VaultFee}; + use white_whale_std::pool_network::asset::AssetInfo; + use white_whale_std::vault_network::vault_factory::INSTANTIATE_VAULT_REPLY_ID; use crate::{ contract::execute, @@ -97,7 +97,7 @@ mod tests { let (res, _, env) = mock_execute( 5, 6, - white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: asset_info.clone(), fees: get_fees(), token_factory_lp: false, @@ -115,14 +115,16 @@ mod tests { msg: WasmMsg::Instantiate { admin: Some(env.contract.address.to_string()), code_id: 5, - msg: to_json_binary(&white_whale::vault_network::vault::InstantiateMsg { - owner: env.contract.address.to_string(), - asset_info, - token_id: 6, - vault_fees: get_fees(), - fee_collector_addr: "fee_collector".to_string(), - token_factory_lp: false, - }) + msg: to_json_binary( + &white_whale_std::vault_network::vault::InstantiateMsg { + owner: env.contract.address.to_string(), + asset_info, + token_id: 6, + vault_fees: get_fees(), + fee_collector_addr: "fee_collector".to_string(), + token_factory_lp: false, + } + ) .unwrap(), funds: vec![], label: "White Whale uluna Vault".to_string() @@ -142,7 +144,7 @@ mod tests { let (res, _, env) = mock_execute( 5, 6, - white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: asset_info.clone(), fees: get_fees(), token_factory_lp: true, @@ -160,14 +162,16 @@ mod tests { msg: WasmMsg::Instantiate { admin: Some(env.contract.address.to_string()), code_id: 5, - msg: to_json_binary(&white_whale::vault_network::vault::InstantiateMsg { - owner: env.contract.address.to_string(), - asset_info, - token_id: 6, - vault_fees: get_fees(), - fee_collector_addr: "fee_collector".to_string(), - token_factory_lp: true, - }) + msg: to_json_binary( + &white_whale_std::vault_network::vault::InstantiateMsg { + owner: env.contract.address.to_string(), + asset_info, + token_id: 6, + vault_fees: get_fees(), + fee_collector_addr: "fee_collector".to_string(), + token_factory_lp: true, + } + ) .unwrap(), funds: vec![], label: "White Whale uluna Vault".to_string() @@ -192,7 +196,7 @@ mod tests { deps.as_mut(), env, bad_actor, - white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info, fees: get_fees(), token_factory_lp: false, @@ -218,7 +222,7 @@ mod tests { app.execute_contract( creator.sender.clone(), factory_addr.clone(), - &white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + &white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: asset_info.clone(), fees: get_fees(), token_factory_lp: false, @@ -232,7 +236,7 @@ mod tests { .wrap() .query_wasm_smart( factory_addr.clone(), - &white_whale::vault_network::vault_factory::QueryMsg::Vault { + &white_whale_std::vault_network::vault_factory::QueryMsg::Vault { asset_info: asset_info.clone(), }, ) @@ -242,7 +246,7 @@ mod tests { let res = app.execute_contract( creator.sender, factory_addr, - &white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + &white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info, fees: get_fees(), token_factory_lp: false, @@ -270,7 +274,7 @@ mod tests { deps.as_mut(), env.clone(), mock_creator(), - white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: AssetInfo::NativeToken { denom: "uluna".to_string(), }, @@ -300,7 +304,7 @@ mod tests { deps.as_mut(), env, mock_creator(), - white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: AssetInfo::NativeToken { denom: "uluna".to_string(), }, @@ -337,7 +341,7 @@ mod tests { let (res, _, env) = mock_execute( 5, 6, - white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: asset_info.clone(), fees: get_fees(), token_factory_lp: false, @@ -355,14 +359,16 @@ mod tests { msg: WasmMsg::Instantiate { admin: Some(env.contract.address.to_string()), code_id: 5, - msg: to_json_binary(&white_whale::vault_network::vault::InstantiateMsg { - owner: env.contract.address.to_string(), - asset_info, - token_id: 6, - vault_fees: get_fees(), - fee_collector_addr: "fee_collector".to_string(), - token_factory_lp: false, - }) + msg: to_json_binary( + &white_whale_std::vault_network::vault::InstantiateMsg { + owner: env.contract.address.to_string(), + asset_info, + token_id: 6, + vault_fees: get_fees(), + fee_collector_addr: "fee_collector".to_string(), + token_factory_lp: false, + } + ) .unwrap(), funds: vec![], label: "White Whale ibc/4CD5...3D04 Vault".to_string() @@ -383,7 +389,7 @@ mod tests { let (res, _, env) = mock_execute( 5, 6, - white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: asset_info.clone(), fees: get_fees(), token_factory_lp: false, @@ -401,14 +407,16 @@ mod tests { msg: WasmMsg::Instantiate { admin: Some(env.contract.address.to_string()), code_id: 5, - msg: to_json_binary(&white_whale::vault_network::vault::InstantiateMsg { - owner: env.contract.address.to_string(), - asset_info, - token_id: 6, - vault_fees: get_fees(), - fee_collector_addr: "fee_collector".to_string(), - token_factory_lp: false, - }) + msg: to_json_binary( + &white_whale_std::vault_network::vault::InstantiateMsg { + owner: env.contract.address.to_string(), + asset_info, + token_id: 6, + vault_fees: get_fees(), + fee_collector_addr: "fee_collector".to_string(), + token_factory_lp: false, + } + ) .unwrap(), funds: vec![], label: "White Whale peggy0x87a...1B5 Vault".to_string() diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/execute/migrate_vaults.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/execute/migrate_vaults.rs index bbd7770f..98b08cdb 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/execute/migrate_vaults.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/execute/migrate_vaults.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{to_json_binary, Addr, CosmosMsg, DepsMut, Response, WasmMsg}; -use white_whale::vault_network::vault::MigrateMsg; +use white_whale_std::vault_network::vault::MigrateMsg; use crate::err::StdResult; use crate::state::read_vaults; @@ -67,7 +67,7 @@ mod tests { deps.as_mut(), env, bad_actor, - white_whale::vault_network::vault_factory::ExecuteMsg::MigrateVaults { + white_whale_std::vault_network::vault_factory::ExecuteMsg::MigrateVaults { vault_addr: None, vault_code_id: 7, }, @@ -87,7 +87,7 @@ mod tests { deps.as_mut(), env, info, - white_whale::vault_network::vault_factory::ExecuteMsg::MigrateVaults { + white_whale_std::vault_network::vault_factory::ExecuteMsg::MigrateVaults { vault_addr: Some("outdated_vault".to_string()), vault_code_id: 7, }, diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/execute/remove_vault.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/execute/remove_vault.rs index 9c8b4aca..63b7e9c5 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/execute/remove_vault.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/execute/remove_vault.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{DepsMut, Response}; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; use crate::asset::AssetReference; use crate::err::{StdResult, VaultFactoryError}; @@ -38,14 +38,14 @@ mod tests { let factory_addr = app_mock_instantiate(&mut app); // create vault - let asset_info_1 = white_whale::pool_network::asset::AssetInfo::NativeToken { + let asset_info_1 = white_whale_std::pool_network::asset::AssetInfo::NativeToken { denom: "uluna".to_string(), }; app.execute_contract( creator.sender.clone(), factory_addr.clone(), - &white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + &white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: asset_info_1.clone(), fees: get_fees(), token_factory_lp: false, @@ -59,7 +59,7 @@ mod tests { .execute_contract( creator.sender, factory_addr.clone(), - &white_whale::vault_network::vault_factory::ExecuteMsg::RemoveVault { + &white_whale_std::vault_network::vault_factory::ExecuteMsg::RemoveVault { asset_info: asset_info_1, }, &[], @@ -88,7 +88,7 @@ mod tests { #[test] fn cannot_remove_vault_unauthorized() { - let asset_info = white_whale::pool_network::asset::AssetInfo::NativeToken { + let asset_info = white_whale_std::pool_network::asset::AssetInfo::NativeToken { denom: "uluna".to_string(), }; let (mut deps, env) = mock_instantiate(5, 6); @@ -100,7 +100,7 @@ mod tests { deps.as_mut(), env, bad_actor, - white_whale::vault_network::vault_factory::ExecuteMsg::RemoveVault { asset_info }, + white_whale_std::vault_network::vault_factory::ExecuteMsg::RemoveVault { asset_info }, ); assert_eq!(res.unwrap_err(), VaultFactoryError::Unauthorized {}) @@ -108,7 +108,7 @@ mod tests { #[test] fn cannot_remove_vault_non_existent() { - let asset_info = white_whale::pool_network::asset::AssetInfo::NativeToken { + let asset_info = white_whale_std::pool_network::asset::AssetInfo::NativeToken { denom: "uluna".to_string(), }; let (mut deps, env) = mock_instantiate(5, 6); @@ -119,7 +119,7 @@ mod tests { deps.as_mut(), env, creator, - white_whale::vault_network::vault_factory::ExecuteMsg::RemoveVault { asset_info }, + white_whale_std::vault_network::vault_factory::ExecuteMsg::RemoveVault { asset_info }, ); assert_eq!(res.unwrap_err(), VaultFactoryError::NonExistentVault {}) diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/execute/update_config.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/execute/update_config.rs index 2febb1cd..deddb7b4 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/execute/update_config.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/execute/update_config.rs @@ -47,7 +47,7 @@ pub fn update_config( #[cfg(test)] mod tests { use cosmwasm_std::{from_json, testing::mock_info, Addr, Response}; - use white_whale::vault_network::vault_factory::{Config, ExecuteMsg, QueryMsg}; + use white_whale_std::vault_network::vault_factory::{Config, ExecuteMsg, QueryMsg}; use crate::{ contract::{execute, query}, diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/execute/update_vault_config.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/execute/update_vault_config.rs index f537f1cb..3b5bb327 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/execute/update_vault_config.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/execute/update_vault_config.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{wasm_execute, DepsMut, Response}; -use white_whale::vault_network::vault::UpdateConfigParams; +use white_whale_std::vault_network::vault::UpdateConfigParams; use crate::err::StdResult; @@ -12,7 +12,7 @@ pub fn update_vault_config( Ok(Response::new() .add_message(wasm_execute( deps.api.addr_validate(vault_addr.as_str())?.to_string(), - &white_whale::vault_network::vault::ExecuteMsg::UpdateConfig(params), + &white_whale_std::vault_network::vault::ExecuteMsg::UpdateConfig(params), vec![], )?) .add_attribute("method", "update_vault_config")) @@ -34,7 +34,7 @@ mod tests { let factory_addr = app_mock_instantiate(&mut app); - let asset_info = white_whale::pool_network::asset::AssetInfo::NativeToken { + let asset_info = white_whale_std::pool_network::asset::AssetInfo::NativeToken { denom: "uluna".to_string(), }; @@ -44,7 +44,7 @@ mod tests { app.execute_contract( creator.sender.clone(), factory_addr.clone(), - &white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + &white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: asset_info.clone(), fees: get_fees(), token_factory_lp: false, @@ -58,15 +58,15 @@ mod tests { .wrap() .query_wasm_smart( factory_addr.clone(), - &white_whale::vault_network::vault_factory::QueryMsg::Vault { asset_info }, + &white_whale_std::vault_network::vault_factory::QueryMsg::Vault { asset_info }, ) .unwrap(); - let vault_config: white_whale::vault_network::vault::Config = app + let vault_config: white_whale_std::vault_network::vault::Config = app .wrap() .query_wasm_smart( vault_addr.clone().unwrap_or_else(|| Addr::unchecked("")), - &white_whale::vault_network::vault::QueryMsg::Config {}, + &white_whale_std::vault_network::vault::QueryMsg::Config {}, ) .unwrap(); @@ -78,12 +78,12 @@ mod tests { app.execute_contract( creator.sender, factory_addr, - &white_whale::vault_network::vault_factory::ExecuteMsg::UpdateVaultConfig { + &white_whale_std::vault_network::vault_factory::ExecuteMsg::UpdateVaultConfig { vault_addr: vault_addr .clone() .unwrap_or_else(|| Addr::unchecked("")) .to_string(), - params: white_whale::vault_network::vault::UpdateConfigParams { + params: white_whale_std::vault_network::vault::UpdateConfigParams { flash_loan_enabled: Some(false), deposit_enabled: None, withdraw_enabled: None, @@ -96,11 +96,11 @@ mod tests { ) .unwrap(); - let vault_config: white_whale::vault_network::vault::Config = app + let vault_config: white_whale_std::vault_network::vault::Config = app .wrap() .query_wasm_smart( vault_addr.unwrap_or_else(|| Addr::unchecked("")), - &white_whale::vault_network::vault::QueryMsg::Config {}, + &white_whale_std::vault_network::vault::QueryMsg::Config {}, ) .unwrap(); @@ -114,7 +114,7 @@ mod tests { let factory_addr = app_mock_instantiate(&mut app); - let asset_info = white_whale::pool_network::asset::AssetInfo::NativeToken { + let asset_info = white_whale_std::pool_network::asset::AssetInfo::NativeToken { denom: "uluna".to_string(), }; @@ -124,7 +124,7 @@ mod tests { app.execute_contract( creator.sender, factory_addr.clone(), - &white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + &white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: asset_info.clone(), fees: get_fees(), token_factory_lp: false, @@ -138,7 +138,7 @@ mod tests { .wrap() .query_wasm_smart( factory_addr.clone(), - &white_whale::vault_network::vault_factory::QueryMsg::Vault { asset_info }, + &white_whale_std::vault_network::vault_factory::QueryMsg::Vault { asset_info }, ) .unwrap(); @@ -147,11 +147,11 @@ mod tests { let res = app.execute_contract( Addr::unchecked("unauthorized"), factory_addr, - &white_whale::vault_network::vault_factory::ExecuteMsg::UpdateVaultConfig { + &white_whale_std::vault_network::vault_factory::ExecuteMsg::UpdateVaultConfig { vault_addr: vault_addr .unwrap_or_else(|| Addr::unchecked("")) .to_string(), - params: white_whale::vault_network::vault::UpdateConfigParams { + params: white_whale_std::vault_network::vault::UpdateConfigParams { flash_loan_enabled: None, deposit_enabled: None, withdraw_enabled: None, diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/migrations.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/migrations.rs index 7ad50e62..01075979 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/migrations.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/migrations.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{Addr, DepsMut, Order, StdError}; use cw_storage_plus::Map; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; use crate::state::{TMP_VAULT_ASSET, VAULTS}; diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/queries/config.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/queries/config.rs index 13b229f1..567c29eb 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/queries/config.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/queries/config.rs @@ -12,7 +12,7 @@ pub fn get_config(deps: Deps) -> StdResult<Binary> { #[cfg(test)] mod test { use cosmwasm_std::Addr; - use white_whale::vault_network::vault_factory::{Config, QueryMsg}; + use white_whale_std::vault_network::vault_factory::{Config, QueryMsg}; use crate::tests::{mock_creator, mock_query}; diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/queries/vault.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/queries/vault.rs index f924b49c..39e25689 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/queries/vault.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/queries/vault.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{to_json_binary, Binary, Deps}; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::vault_network::vault_factory::{VaultInfo, VaultsResponse}; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::vault_network::vault_factory::{VaultInfo, VaultsResponse}; use crate::state::read_vaults; use crate::{asset::AssetReference, err::StdResult, state::VAULTS}; @@ -27,9 +27,9 @@ pub fn get_vaults( #[cfg(test)] mod tests { use cw_multi_test::Executor; - use white_whale::pool_network::asset::AssetInfo; + use white_whale_std::pool_network::asset::AssetInfo; - use white_whale::vault_network::vault_factory::{ExecuteMsg, QueryMsg, VaultsResponse}; + use white_whale_std::vault_network::vault_factory::{ExecuteMsg, QueryMsg, VaultsResponse}; use crate::tests::{ get_fees, mock_app, mock_creator, mock_instantiate::app_mock_instantiate, mock_query, diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/reply/mod.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/reply/mod.rs index e53ea3dc..e3652f2d 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/reply/mod.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/reply/mod.rs @@ -2,7 +2,7 @@ mod vault_instantiate; use cosmwasm_std::{entry_point, DepsMut, Env, Reply, Response, StdError}; pub use vault_instantiate::vault_instantiate; -use white_whale::vault_network::vault_factory::INSTANTIATE_VAULT_REPLY_ID; +use white_whale_std::vault_network::vault_factory::INSTANTIATE_VAULT_REPLY_ID; use crate::err::{StdResult, VaultFactoryError}; diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/reply/vault_instantiate.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/reply/vault_instantiate.rs index 4034af67..8c194b8c 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/reply/vault_instantiate.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/reply/vault_instantiate.rs @@ -73,7 +73,7 @@ mod test { deps.as_mut(), env, creator.clone(), - white_whale::vault_network::vault_factory::InstantiateMsg { + white_whale_std::vault_network::vault_factory::InstantiateMsg { owner: creator.sender.into_string(), token_id: 5, vault_id: 6, diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/state.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/state.rs index a380cdaf..195a3cce 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/state.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/state.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{Addr, Api, Order, StdResult, Storage}; use cw_storage_plus::{Bound, Item, Map}; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; -use white_whale::vault_network::vault_factory::{Config, VaultInfo}; +use white_whale_std::vault_network::vault_factory::{Config, VaultInfo}; pub const CONFIG: Item<Config> = Item::new("config"); diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/tests/get_fee.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/tests/get_fee.rs index d29f9c1e..2cda1521 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/tests/get_fee.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/tests/get_fee.rs @@ -1,5 +1,5 @@ use cosmwasm_std::Decimal; -use white_whale::fee::{Fee, VaultFee}; +use white_whale_std::fee::{Fee, VaultFee}; pub fn get_fees() -> VaultFee { VaultFee { diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_execute.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_execute.rs index 3a38b75d..f55637c5 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_execute.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_execute.rs @@ -10,7 +10,7 @@ use super::{mock_creator, mock_instantiate::mock_instantiate}; pub fn mock_execute( vault_id: u64, token_id: u64, - msg: white_whale::vault_network::vault_factory::ExecuteMsg, + msg: white_whale_std::vault_network::vault_factory::ExecuteMsg, ) -> ( StdResult<Response>, OwnedDeps<MockStorage, MockApi, MockQuerier>, diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_instantiate.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_instantiate.rs index eb09c273..33010a7c 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_instantiate.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_instantiate.rs @@ -27,7 +27,7 @@ pub fn mock_instantiate( deps.as_mut(), env.clone(), creator.clone(), - white_whale::vault_network::vault_factory::InstantiateMsg { + white_whale_std::vault_network::vault_factory::InstantiateMsg { owner: creator.sender.to_string(), vault_id, token_id, @@ -51,7 +51,7 @@ pub fn app_mock_instantiate(app: &mut App) -> Addr { .instantiate_contract( fee_collector_id, mock_creator().sender, - &white_whale::fee_collector::InstantiateMsg {}, + &white_whale_std::fee_collector::InstantiateMsg {}, &[], "mock fee collector", None, @@ -61,7 +61,7 @@ pub fn app_mock_instantiate(app: &mut App) -> Addr { app.instantiate_contract( factory_id, creator.clone().sender, - &white_whale::vault_network::vault_factory::InstantiateMsg { + &white_whale_std::vault_network::vault_factory::InstantiateMsg { owner: creator.sender.into_string(), vault_id, token_id, diff --git a/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_query.rs b/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_query.rs index 9c31f8d2..d647d597 100644 --- a/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_query.rs +++ b/contracts/liquidity_hub/vault-network/vault_factory/src/tests/mock_query.rs @@ -4,7 +4,7 @@ use cosmwasm_std::{ Env, OwnedDeps, }; use serde::de::DeserializeOwned; -use white_whale::vault_network::vault_factory::QueryMsg; +use white_whale_std::vault_network::vault_factory::QueryMsg; use crate::contract::query; diff --git a/contracts/liquidity_hub/vault-network/vault_router/Cargo.toml b/contracts/liquidity_hub/vault-network/vault_router/Cargo.toml index 09b86d45..500d9e12 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/Cargo.toml +++ b/contracts/liquidity_hub/vault-network/vault_router/Cargo.toml @@ -2,7 +2,7 @@ name = "vault_router" version = "1.1.6" authors = [ - "kaimen-sano <kaimen_sano@protonmail.com>, Kerber0x <kerber0x@protonmail.com>", + "kaimen-sano <kaimen_sano@protonmail.com>, Kerber0x <kerber0x@protonmail.com>", ] edition.workspace = true description = "Contract to facilitate flash-loans in the vault network" @@ -16,10 +16,10 @@ publish.workspace = true crate-type = ["cdylib", "rlib"] [features] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] backtraces = ["cosmwasm-std/backtraces"] [dependencies] @@ -32,7 +32,7 @@ schemars.workspace = true semver.workspace = true serde.workspace = true thiserror.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true cosmwasm-schema.workspace = true [dev-dependencies] diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/bin/vault_router_schema.rs b/contracts/liquidity_hub/vault-network/vault_router/src/bin/vault_router_schema.rs index 40553b1e..7d7b6c98 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/bin/vault_router_schema.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/bin/vault_router_schema.rs @@ -1,6 +1,8 @@ use cosmwasm_schema::write_api; -use white_whale::vault_network::vault_router::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use white_whale_std::vault_network::vault_router::{ + ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, +}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/contract.rs b/contracts/liquidity_hub/vault-network/vault_router/src/contract.rs index de700ce4..7b6164a4 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/contract.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/contract.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{entry_point, Binary, Deps, DepsMut, Env, MessageInfo, Response}; use cw2::{get_contract_version, set_contract_version}; use semver::Version; -use white_whale::vault_network::vault_router::{ +use white_whale_std::vault_network::vault_router::{ Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, }; @@ -67,7 +67,7 @@ pub fn execute(deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg) -> S #[cfg(not(tarpaulin_include))] #[cfg_attr(not(feature = "library"), entry_point)] pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult<Response> { - use white_whale::migrate_guards::check_contract_name; + use white_whale_std::migrate_guards::check_contract_name; check_contract_name(deps.storage, CONTRACT_NAME.to_string())?; diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/err.rs b/contracts/liquidity_hub/vault-network/vault_router/src/err.rs index 991a1a14..391ef007 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/err.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/err.rs @@ -1,7 +1,7 @@ use cosmwasm_std::Uint128; use semver::Version; use thiserror::Error; -use white_whale::pool_network::asset::Asset; +use white_whale_std::pool_network::asset::Asset; pub type StdResult<T> = Result<T, VaultRouterError>; diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/execute/complete_loan.rs b/contracts/liquidity_hub/vault-network/vault_router/src/execute/complete_loan.rs index 33cf9ecd..e7915fd1 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/execute/complete_loan.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/execute/complete_loan.rs @@ -2,8 +2,8 @@ use cosmwasm_std::{ attr, coins, to_json_binary, Addr, BankMsg, CosmosMsg, DepsMut, Env, MessageInfo, Response, WasmMsg, }; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::vault_network::vault::PaybackAmountResponse; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::vault_network::vault::PaybackAmountResponse; use crate::err::{StdResult, VaultRouterError}; @@ -27,7 +27,7 @@ pub fn complete_loan( .map(|(vault, loaned_asset)| { let payback_amount: PaybackAmountResponse = deps.querier.query_wasm_smart( vault.clone(), - &white_whale::vault_network::vault::QueryMsg::GetPaybackAmount { + &white_whale_std::vault_network::vault::QueryMsg::GetPaybackAmount { amount: loaned_asset.amount, }, )?; @@ -123,8 +123,8 @@ pub fn complete_loan( mod tests { use cosmwasm_std::{coin, coins, Uint128}; use cw_multi_test::Executor; - use white_whale::pool_network::asset::{Asset, AssetInfo}; - use white_whale::vault_network::vault_router::ExecuteMsg; + use white_whale_std::pool_network::asset::{Asset, AssetInfo}; + use white_whale_std::vault_network::vault_router::ExecuteMsg; use crate::{ err::VaultRouterError, diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/execute/flash_loan.rs b/contracts/liquidity_hub/vault-network/vault_router/src/execute/flash_loan.rs index 782f118e..218ac1b7 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/execute/flash_loan.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/execute/flash_loan.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{to_json_binary, CosmosMsg, DepsMut, MessageInfo, Response, WasmMsg}; -use white_whale::pool_network::asset::Asset; -use white_whale::vault_network::vault_router::ExecuteMsg; +use white_whale_std::pool_network::asset::Asset; +use white_whale_std::vault_network::vault_router::ExecuteMsg; use crate::{ err::{StdResult, VaultRouterError}, @@ -30,7 +30,7 @@ pub fn flash_loan( // query factory for address let address: Option<String> = deps.querier.query_wasm_smart( config.vault_factory.clone(), - &white_whale::vault_network::vault_factory::QueryMsg::Vault { + &white_whale_std::vault_network::vault_factory::QueryMsg::Vault { asset_info: asset.info.clone(), }, )?; @@ -51,17 +51,19 @@ pub fn flash_loan( messages.push( WasmMsg::Execute { contract_addr: vault.to_string(), - msg: to_json_binary(&white_whale::vault_network::vault::ExecuteMsg::FlashLoan { - amount: asset.amount, - msg: to_json_binary(&ExecuteMsg::NextLoan { - initiator: info.sender, - source_vault: vault.to_string(), - source_vault_asset_info: asset.info.clone(), - to_loan: next_vaults.to_vec(), - payload: msgs, - loaned_assets: vaults, - })?, - })?, + msg: to_json_binary( + &white_whale_std::vault_network::vault::ExecuteMsg::FlashLoan { + amount: asset.amount, + msg: to_json_binary(&ExecuteMsg::NextLoan { + initiator: info.sender, + source_vault: vault.to_string(), + source_vault_asset_info: asset.info.clone(), + to_loan: next_vaults.to_vec(), + payload: msgs, + loaned_assets: vaults, + })?, + }, + )?, funds: vec![], } .into(), @@ -81,8 +83,8 @@ mod tests { }; use cw_multi_test::Executor; - use white_whale::pool_network::asset::{Asset, AssetInfo}; - use white_whale::vault_network::vault_router::ExecuteMsg; + use white_whale_std::pool_network::asset::{Asset, AssetInfo}; + use white_whale_std::vault_network::vault_router::ExecuteMsg; use crate::{ err::VaultRouterError, diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/execute/next_loan.rs b/contracts/liquidity_hub/vault-network/vault_router/src/execute/next_loan.rs index a24b72a5..89d78df7 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/execute/next_loan.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/execute/next_loan.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{to_json_binary, Addr, CosmosMsg, DepsMut, Env, MessageInfo, Response, WasmMsg}; -use white_whale::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; -use white_whale::vault_network::vault_router::ExecuteMsg; +use white_whale_std::vault_network::vault_router::ExecuteMsg; use crate::err::{StdResult, VaultRouterError}; use crate::state::CONFIG; @@ -23,7 +23,7 @@ pub fn next_loan( let Some(queried_vault) = deps.querier.query_wasm_smart::<Option<String>>( config.vault_factory, - &white_whale::vault_network::vault_factory::QueryMsg::Vault { + &white_whale_std::vault_network::vault_factory::QueryMsg::Vault { asset_info: source_vault_asset, }, )? else { @@ -44,17 +44,19 @@ pub fn next_loan( vec![WasmMsg::Execute { contract_addr: vault.clone(), funds: vec![], - msg: to_json_binary(&white_whale::vault_network::vault::ExecuteMsg::FlashLoan { - amount: asset.amount, - msg: to_json_binary(&ExecuteMsg::NextLoan { - initiator, - source_vault: vault.to_string(), - source_vault_asset_info: asset.info.clone(), - to_loan: loans.to_vec(), - payload, - loaned_assets, - })?, - })?, + msg: to_json_binary( + &white_whale_std::vault_network::vault::ExecuteMsg::FlashLoan { + amount: asset.amount, + msg: to_json_binary(&ExecuteMsg::NextLoan { + initiator, + source_vault: vault.to_string(), + source_vault_asset_info: asset.info.clone(), + to_loan: loans.to_vec(), + payload, + loaned_assets, + })?, + }, + )?, } .into()] } @@ -85,9 +87,9 @@ pub fn next_loan( mod tests { use cosmwasm_std::{coins, Addr}; use cw_multi_test::Executor; - use white_whale::pool_network::asset::AssetInfo; + use white_whale_std::pool_network::asset::AssetInfo; - use white_whale::vault_network::vault_router::ExecuteMsg; + use white_whale_std::vault_network::vault_router::ExecuteMsg; use crate::err::VaultRouterError; use crate::tests::mock_instantiate::{app_mock_instantiate, AppInstantiateResponse}; @@ -134,7 +136,7 @@ mod tests { .wrap() .query_wasm_smart( factory_addr, - &white_whale::vault_network::vault_factory::QueryMsg::Vault { + &white_whale_std::vault_network::vault_factory::QueryMsg::Vault { asset_info: AssetInfo::NativeToken { denom: "uluna".to_string(), }, diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/execute/update_config.rs b/contracts/liquidity_hub/vault-network/vault_router/src/execute/update_config.rs index 7d910909..3290c177 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/execute/update_config.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/execute/update_config.rs @@ -38,7 +38,7 @@ pub fn update_config( #[cfg(test)] mod tests { use cosmwasm_std::{testing::mock_info, Addr, Response}; - use white_whale::vault_network::vault_router::{Config, ExecuteMsg}; + use white_whale_std::vault_network::vault_router::{Config, ExecuteMsg}; use crate::{ contract::execute, diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/queries/config.rs b/contracts/liquidity_hub/vault-network/vault_router/src/queries/config.rs index 7941783d..0cc8f7bc 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/queries/config.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/queries/config.rs @@ -12,7 +12,7 @@ pub fn get_config(deps: Deps) -> StdResult<Binary> { #[cfg(test)] mod test { use cosmwasm_std::Addr; - use white_whale::vault_network::vault_router::{Config, QueryMsg}; + use white_whale_std::vault_network::vault_router::{Config, QueryMsg}; use crate::tests::{mock_creator, mock_query}; diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/state.rs b/contracts/liquidity_hub/vault-network/vault_router/src/state.rs index 1ed59c76..c9419bff 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/state.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/state.rs @@ -1,4 +1,4 @@ use cw_storage_plus::Item; -use white_whale::vault_network::vault_router::Config; +use white_whale_std::vault_network::vault_router::Config; pub const CONFIG: Item<Config> = Item::new("config"); diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/tests/get_fee.rs b/contracts/liquidity_hub/vault-network/vault_router/src/tests/get_fee.rs index d29f9c1e..2cda1521 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/tests/get_fee.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/tests/get_fee.rs @@ -1,5 +1,5 @@ use cosmwasm_std::Decimal; -use white_whale::fee::{Fee, VaultFee}; +use white_whale_std::fee::{Fee, VaultFee}; pub fn get_fees() -> VaultFee { VaultFee { diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_execute.rs b/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_execute.rs index e3c69823..0117488f 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_execute.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_execute.rs @@ -9,7 +9,7 @@ use super::{mock_creator, mock_instantiate::mock_instantiate}; pub fn mock_execute<F: Into<String>>( factory_addr: F, - msg: white_whale::vault_network::vault_router::ExecuteMsg, + msg: white_whale_std::vault_network::vault_router::ExecuteMsg, ) -> ( StdResult<Response>, OwnedDeps<MockStorage, MockApi, MockQuerier>, diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_instantiate.rs b/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_instantiate.rs index 8e01288f..70250593 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_instantiate.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_instantiate.rs @@ -4,7 +4,7 @@ use cosmwasm_std::{ Addr, Env, OwnedDeps, Uint128, }; use cw_multi_test::{App, Executor}; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; use crate::contract::instantiate; @@ -29,7 +29,7 @@ pub fn mock_instantiate<F: Into<String>>( deps.as_mut(), env.clone(), creator.clone(), - white_whale::vault_network::vault_router::InstantiateMsg { + white_whale_std::vault_network::vault_router::InstantiateMsg { owner: creator.sender.to_string(), vault_factory_addr: vault_factory_addr.into(), }, @@ -60,7 +60,7 @@ pub fn app_mock_instantiate(app: &mut App) -> AppInstantiateResponse { .instantiate_contract( fee_collector_id, mock_admin(), - &white_whale::fee_collector::InstantiateMsg {}, + &white_whale_std::fee_collector::InstantiateMsg {}, &[], "mock fee collector", None, @@ -71,7 +71,7 @@ pub fn app_mock_instantiate(app: &mut App) -> AppInstantiateResponse { .instantiate_contract( factory_id, mock_admin(), - &white_whale::vault_network::vault_factory::InstantiateMsg { + &white_whale_std::vault_network::vault_factory::InstantiateMsg { owner: mock_admin().into_string(), vault_id, token_id, @@ -87,7 +87,7 @@ pub fn app_mock_instantiate(app: &mut App) -> AppInstantiateResponse { app.execute_contract( mock_admin(), factory_addr.clone(), - &white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + &white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: AssetInfo::NativeToken { denom: "uluna".to_string(), }, @@ -102,7 +102,7 @@ pub fn app_mock_instantiate(app: &mut App) -> AppInstantiateResponse { .wrap() .query_wasm_smart( factory_addr.clone(), - &white_whale::vault_network::vault_factory::QueryMsg::Vault { + &white_whale_std::vault_network::vault_factory::QueryMsg::Vault { asset_info: AssetInfo::NativeToken { denom: "uluna".to_string(), }, @@ -142,7 +142,7 @@ pub fn app_mock_instantiate(app: &mut App) -> AppInstantiateResponse { app.execute_contract( mock_admin(), factory_addr.clone(), - &white_whale::vault_network::vault_factory::ExecuteMsg::CreateVault { + &white_whale_std::vault_network::vault_factory::ExecuteMsg::CreateVault { asset_info: AssetInfo::Token { contract_addr: token_addr.clone().into_string(), }, @@ -156,7 +156,7 @@ pub fn app_mock_instantiate(app: &mut App) -> AppInstantiateResponse { .wrap() .query_wasm_smart( factory_addr.clone(), - &white_whale::vault_network::vault_factory::QueryMsg::Vault { + &white_whale_std::vault_network::vault_factory::QueryMsg::Vault { asset_info: AssetInfo::Token { contract_addr: token_addr.clone().into_string(), }, @@ -179,7 +179,7 @@ pub fn app_mock_instantiate(app: &mut App) -> AppInstantiateResponse { app.execute_contract( mock_admin(), token_vault_addr.clone(), - &white_whale::vault_network::vault::ExecuteMsg::Deposit { + &white_whale_std::vault_network::vault::ExecuteMsg::Deposit { amount: Uint128::new(10_000), }, &[], @@ -190,7 +190,7 @@ pub fn app_mock_instantiate(app: &mut App) -> AppInstantiateResponse { .instantiate_contract( router_id, creator.clone().sender, - &white_whale::vault_network::vault_router::InstantiateMsg { + &white_whale_std::vault_network::vault_router::InstantiateMsg { owner: creator.sender.into_string(), vault_factory_addr: factory_addr.clone().into_string(), }, diff --git a/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_query.rs b/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_query.rs index 89349648..e00089f5 100644 --- a/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_query.rs +++ b/contracts/liquidity_hub/vault-network/vault_router/src/tests/mock_query.rs @@ -4,7 +4,7 @@ use cosmwasm_std::{ Env, OwnedDeps, }; use serde::de::DeserializeOwned; -use white_whale::vault_network::vault_router::QueryMsg; +use white_whale_std::vault_network::vault_router::QueryMsg; use crate::contract::query; diff --git a/contracts/liquidity_hub/whale_lair/Cargo.toml b/contracts/liquidity_hub/whale_lair/Cargo.toml index 3074c9d2..f47dc8ac 100644 --- a/contracts/liquidity_hub/whale_lair/Cargo.toml +++ b/contracts/liquidity_hub/whale_lair/Cargo.toml @@ -22,10 +22,10 @@ exclude = [ crate-type = ["cdylib", "rlib"] [features] -injective = ["white-whale/injective"] +injective = ["white-whale-std/injective"] osmosis = ["osmosis_token_factory"] -token_factory = ["white-whale/token_factory"] -osmosis_token_factory = ["white-whale/osmosis_token_factory"] +token_factory = ["white-whale-std/token_factory"] +osmosis_token_factory = ["white-whale-std/osmosis_token_factory"] # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] @@ -38,9 +38,9 @@ schemars.workspace = true semver.workspace = true serde.workspace = true thiserror.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true [dev-dependencies] cw-multi-test = "0.16.2" -anyhow = { version = "1.0.68"} +anyhow = { version = "1.0.68" } white-whale-testing.workspace = true diff --git a/contracts/liquidity_hub/whale_lair/src/bin/whale_lair_schema.rs b/contracts/liquidity_hub/whale_lair/src/bin/whale_lair_schema.rs index 6d1725eb..cb2d7d75 100644 --- a/contracts/liquidity_hub/whale_lair/src/bin/whale_lair_schema.rs +++ b/contracts/liquidity_hub/whale_lair/src/bin/whale_lair_schema.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::write_api; -use white_whale::whale_lair::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use white_whale_std::whale_lair::{ExecuteMsg, InstantiateMsg, QueryMsg}; fn main() { write_api! { diff --git a/contracts/liquidity_hub/whale_lair/src/commands.rs b/contracts/liquidity_hub/whale_lair/src/commands.rs index 804228e3..0b46f590 100644 --- a/contracts/liquidity_hub/whale_lair/src/commands.rs +++ b/contracts/liquidity_hub/whale_lair/src/commands.rs @@ -2,10 +2,10 @@ use cosmwasm_std::{ Addr, BankMsg, Coin, CosmosMsg, Decimal, DepsMut, Env, MessageInfo, Order, Response, StdResult, Timestamp, Uint128, Uint64, }; -use white_whale::pool_network::asset; -use white_whale::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::asset; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; -use white_whale::whale_lair::Bond; +use white_whale_std::whale_lair::Bond; use crate::helpers::validate_growth_rate; use crate::queries::MAX_PAGE_LIMIT; diff --git a/contracts/liquidity_hub/whale_lair/src/contract.rs b/contracts/liquidity_hub/whale_lair/src/contract.rs index fc4bbe12..9a59175e 100644 --- a/contracts/liquidity_hub/whale_lair/src/contract.rs +++ b/contracts/liquidity_hub/whale_lair/src/contract.rs @@ -2,9 +2,9 @@ use cosmwasm_std::{entry_point, Addr}; use cosmwasm_std::{to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult}; use cw2::{get_contract_version, set_contract_version}; use semver::Version; -use white_whale::pool_network::asset::AssetInfo; +use white_whale_std::pool_network::asset::AssetInfo; -use white_whale::whale_lair::{Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; +use white_whale_std::whale_lair::{Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; use crate::error::ContractError; use crate::helpers::validate_growth_rate; @@ -143,7 +143,7 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult<Binary> { #[cfg(not(tarpaulin_include))] #[entry_point] pub fn migrate(mut deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> { - use white_whale::migrate_guards::check_contract_name; + use white_whale_std::migrate_guards::check_contract_name; check_contract_name(deps.storage, CONTRACT_NAME.to_string())?; diff --git a/contracts/liquidity_hub/whale_lair/src/helpers.rs b/contracts/liquidity_hub/whale_lair/src/helpers.rs index c5c2d563..35f11e4f 100644 --- a/contracts/liquidity_hub/whale_lair/src/helpers.rs +++ b/contracts/liquidity_hub/whale_lair/src/helpers.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{Decimal, DepsMut, Env, MessageInfo, StdResult, Timestamp, Uint64}; -use white_whale::epoch_manager::epoch_manager::EpochConfig; -use white_whale::fee_distributor::{ClaimableEpochsResponse, EpochResponse}; -use white_whale::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::epoch_manager::epoch_manager::EpochConfig; +use white_whale_std::fee_distributor::{ClaimableEpochsResponse, EpochResponse}; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; use crate::error::ContractError; use crate::state::CONFIG; @@ -51,7 +51,7 @@ pub fn validate_claimed(deps: &DepsMut, info: &MessageInfo) -> Result<(), Contra // Do a smart query for Claimable let claimable_rewards: ClaimableEpochsResponse = deps.querier.query_wasm_smart( fee_distributor, - &white_whale::fee_distributor::QueryMsg::Claimable { + &white_whale_std::fee_distributor::QueryMsg::Claimable { address: info.sender.to_string(), }, )?; @@ -73,7 +73,7 @@ pub fn validate_bonding_for_current_epoch(deps: &DepsMut, env: &Env) -> Result<( let epoch_response: EpochResponse = deps.querier.query_wasm_smart( fee_distributor, - &white_whale::fee_distributor::QueryMsg::CurrentEpoch {}, + &white_whale_std::fee_distributor::QueryMsg::CurrentEpoch {}, )?; let current_epoch = epoch_response.epoch; diff --git a/contracts/liquidity_hub/whale_lair/src/migrations.rs b/contracts/liquidity_hub/whale_lair/src/migrations.rs index 87cbddc1..a91c2748 100644 --- a/contracts/liquidity_hub/whale_lair/src/migrations.rs +++ b/contracts/liquidity_hub/whale_lair/src/migrations.rs @@ -3,8 +3,8 @@ use crate::state::CONFIG; use cosmwasm_schema::cw_serde; use cosmwasm_std::{Addr, Decimal, DepsMut, StdError, Uint64}; use cw_storage_plus::Item; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::whale_lair::Config; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::whale_lair::Config; pub fn migrate_to_v090(deps: DepsMut) -> Result<(), StdError> { #[cw_serde] diff --git a/contracts/liquidity_hub/whale_lair/src/queries.rs b/contracts/liquidity_hub/whale_lair/src/queries.rs index 2fb39a5f..85c90042 100644 --- a/contracts/liquidity_hub/whale_lair/src/queries.rs +++ b/contracts/liquidity_hub/whale_lair/src/queries.rs @@ -6,8 +6,8 @@ use cosmwasm_std::{ }; use cw_storage_plus::Bound; -use white_whale::fee_distributor::QueryMsg; -use white_whale::{ +use white_whale_std::fee_distributor::QueryMsg; +use white_whale_std::{ pool_network::asset::AssetInfo, whale_lair::{ Bond, BondedResponse, BondingWeightResponse, Config, GlobalIndex, UnbondingResponse, @@ -61,7 +61,7 @@ pub(crate) fn query_bonded(deps: Deps, address: String) -> StdResult<BondedRespo } let fee_distributor_addr = CONFIG.load(deps.storage)?.fee_distributor_addr; - let config: white_whale::fee_distributor::Config = + let config: white_whale_std::fee_distributor::Config = deps.querier.query(&QueryRequest::Wasm(WasmQuery::Smart { contract_addr: fee_distributor_addr.to_string(), msg: to_json_binary(&QueryMsg::Config {})?, diff --git a/contracts/liquidity_hub/whale_lair/src/state.rs b/contracts/liquidity_hub/whale_lair/src/state.rs index b7cd47a8..b2d6d431 100644 --- a/contracts/liquidity_hub/whale_lair/src/state.rs +++ b/contracts/liquidity_hub/whale_lair/src/state.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{Addr, Decimal, DepsMut, StdError, StdResult, Timestamp, Uint128}; use cw_storage_plus::{Item, Map}; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::whale_lair::{Bond, Config, GlobalIndex}; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::whale_lair::{Bond, Config, GlobalIndex}; use crate::ContractError; diff --git a/contracts/liquidity_hub/whale_lair/src/tests/bond.rs b/contracts/liquidity_hub/whale_lair/src/tests/bond.rs index e002a489..d89ad8c9 100644 --- a/contracts/liquidity_hub/whale_lair/src/tests/bond.rs +++ b/contracts/liquidity_hub/whale_lair/src/tests/bond.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{coin, coins, Decimal, Timestamp, Uint128}; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::whale_lair::{BondedResponse, BondingWeightResponse}; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::whale_lair::{BondedResponse, BondingWeightResponse}; use crate::tests::robot::TestingRobot; diff --git a/contracts/liquidity_hub/whale_lair/src/tests/instantiate.rs b/contracts/liquidity_hub/whale_lair/src/tests/instantiate.rs index 8acb12ba..4ba48d9c 100644 --- a/contracts/liquidity_hub/whale_lair/src/tests/instantiate.rs +++ b/contracts/liquidity_hub/whale_lair/src/tests/instantiate.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{Addr, Decimal, Uint64}; use crate::tests::robot::TestingRobot; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::whale_lair::Config; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::whale_lair::Config; #[test] fn test_instantiate_successfully() { diff --git a/contracts/liquidity_hub/whale_lair/src/tests/robot.rs b/contracts/liquidity_hub/whale_lair/src/tests/robot.rs index b6b95967..c849693a 100644 --- a/contracts/liquidity_hub/whale_lair/src/tests/robot.rs +++ b/contracts/liquidity_hub/whale_lair/src/tests/robot.rs @@ -1,9 +1,9 @@ use cosmwasm_std::{coin, Addr, Coin, Decimal, StdResult, Uint64}; use cw_multi_test::{App, AppResponse, Executor}; -use white_whale::epoch_manager::epoch_manager::EpochConfig; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::whale_lair::{ +use white_whale_std::epoch_manager::epoch_manager::EpochConfig; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::whale_lair::{ BondedResponse, BondingWeightResponse, Config, ExecuteMsg, InstantiateMsg, QueryMsg, UnbondingResponse, WithdrawableResponse, }; @@ -93,7 +93,7 @@ impl TestingRobot { .instantiate_contract( fee_collector_id, self.sender.clone(), - &white_whale::fee_collector::InstantiateMsg {}, + &white_whale_std::fee_collector::InstantiateMsg {}, &[], "fee_collector", None, @@ -110,7 +110,7 @@ impl TestingRobot { .instantiate_contract( fee_distributor_id, self.sender.clone(), - &white_whale::fee_distributor::InstantiateMsg { + &white_whale_std::fee_distributor::InstantiateMsg { bonding_contract_addr: whale_lair_addr.clone().to_string(), fee_collector_addr: fee_collector_address.clone().to_string(), grace_period: Uint64::new(1), diff --git a/contracts/liquidity_hub/whale_lair/src/tests/unbond.rs b/contracts/liquidity_hub/whale_lair/src/tests/unbond.rs index 431b4108..2d0d9755 100644 --- a/contracts/liquidity_hub/whale_lair/src/tests/unbond.rs +++ b/contracts/liquidity_hub/whale_lair/src/tests/unbond.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{coins, Decimal, Timestamp, Uint128}; -use white_whale::whale_lair::{Bond, BondedResponse, BondingWeightResponse, UnbondingResponse}; +use white_whale_std::whale_lair::{Bond, BondedResponse, BondingWeightResponse, UnbondingResponse}; -use white_whale::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; use crate::tests::robot::TestingRobot; diff --git a/contracts/liquidity_hub/whale_lair/src/tests/update_config.rs b/contracts/liquidity_hub/whale_lair/src/tests/update_config.rs index b0b0d558..a00e448d 100644 --- a/contracts/liquidity_hub/whale_lair/src/tests/update_config.rs +++ b/contracts/liquidity_hub/whale_lair/src/tests/update_config.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{Addr, Decimal, Uint128, Uint64}; -use white_whale::pool_network::asset::AssetInfo; -use white_whale::whale_lair::Config; +use white_whale_std::pool_network::asset::AssetInfo; +use white_whale_std::whale_lair::Config; use crate::tests::robot::TestingRobot; diff --git a/contracts/liquidity_hub/whale_lair/src/tests/withdraw.rs b/contracts/liquidity_hub/whale_lair/src/tests/withdraw.rs index cc0265e8..074c9a4c 100644 --- a/contracts/liquidity_hub/whale_lair/src/tests/withdraw.rs +++ b/contracts/liquidity_hub/whale_lair/src/tests/withdraw.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{coins, Event, Uint128}; -use white_whale::pool_network::asset::{Asset, AssetInfo}; -use white_whale::whale_lair::WithdrawableResponse; +use white_whale_std::pool_network::asset::{Asset, AssetInfo}; +use white_whale_std::whale_lair::WithdrawableResponse; use crate::tests::robot::TestingRobot; diff --git a/justfile b/justfile new file mode 100644 index 00000000..08f1f87c --- /dev/null +++ b/justfile @@ -0,0 +1,67 @@ +build FEATURE='': + #!/usr/bin/env sh + echo "-- Building {{FEATURE}} -- \n" + if [ -z "{{FEATURE}}" ]; then + cargo build + else + cargo build --features {{FEATURE}} + fi + +schemas: + scripts/build_schemas.sh + +test FEATURE='': + #!/usr/bin/env sh + if [ -z "{{FEATURE}}" ]; then + cargo test + else + cargo test --features {{FEATURE}} + fi + +format: + cargo fmt --all + find . -type f -iname "*.toml" -print0 | xargs -0 taplo format + +lint FEATURE='': + #!/usr/bin/env sh + if [ -z "{{FEATURE}}" ]; then + cargo clippy --all -- -D warnings + else + cargo clippy --features {{FEATURE}} --all -- -D warnings + fi + +lintfix: + cargo clippy --fix --allow-staged --allow-dirty --all-features + just format + +check-all: + cargo check --all-features + +check: + cargo check + +refresh: + cargo clean && cargo update + +watch: + cargo watch -x lcheck + +watch-test FEATURE='': + #!/usr/bin/env sh + if [ -z "{{FEATURE}}" ]; then + cargo watch -x "nextest run" + else + cargo watch -x "nextest run --features {{FEATURE}}" + fi + +optimize CHAIN: + scripts/build_release.sh -c {{CHAIN}} + +get-artifacts-versions: + scripts/get_artifacts_versions.sh + +get-artifacts-size: + scripts/check_artifacts_size.sh + +get-pools CHAIN: + scripts/deployment/extract_pools.sh -c {{CHAIN}} diff --git a/packages/white-whale/Cargo.toml b/packages/white-whale-std/Cargo.toml similarity index 69% rename from packages/white-whale/Cargo.toml rename to packages/white-whale-std/Cargo.toml index ff9e7900..50249294 100644 --- a/packages/white-whale/Cargo.toml +++ b/packages/white-whale-std/Cargo.toml @@ -1,8 +1,13 @@ [package] -name = "white-whale" +name = "white-whale-std" version = "1.1.1" edition.workspace = true -authors = ["Kerber0x <kerber0x@protonmail.com>"] +authors = [ + "Kerber0x <kerber0x@protonmail.com>", + "0xFable <0xfabledev@gmail.com>", + "kaimen-sano <kaimen_sano@protonmail.com>", + "White Whale <info@whitewhale.money>", +] description = "Common White Whale types and utils" license.workspace = true repository.workspace = true @@ -18,7 +23,9 @@ backtraces = ["cosmwasm-std/backtraces"] injective = ["token_factory"] osmosis = ["osmosis_token_factory"] token_factory = ["cosmwasm-std/stargate", "cosmwasm-std/cosmwasm_1_1"] -osmosis_token_factory = ["token_factory"] # this is for the osmosis token factory proto definitions, which defer from the standard token factory :) +osmosis_token_factory = [ + "token_factory", +] # this is for the osmosis token factory proto definitions, which defer from the standard token factory :) [dependencies] cosmwasm-std.workspace = true @@ -31,4 +38,4 @@ protobuf.workspace = true uint.workspace = true osmosis-std-derive.workspace = true prost.workspace = true -prost-types.workspace = true \ No newline at end of file +prost-types.workspace = true diff --git a/packages/white-whale/README.md b/packages/white-whale-std/README.md similarity index 80% rename from packages/white-whale/README.md rename to packages/white-whale-std/README.md index 7d5d4f50..9dac1ca6 100644 --- a/packages/white-whale/README.md +++ b/packages/white-whale-std/README.md @@ -1,3 +1,3 @@ # White Whale Package -This is a collection of types and helpers commonly used across White Whale contracts. \ No newline at end of file +This is a collection of types and helpers commonly used across White Whale protocol. \ No newline at end of file diff --git a/packages/white-whale/src/epoch_manager/epoch_manager.rs b/packages/white-whale-std/src/epoch_manager/epoch_manager.rs similarity index 100% rename from packages/white-whale/src/epoch_manager/epoch_manager.rs rename to packages/white-whale-std/src/epoch_manager/epoch_manager.rs diff --git a/packages/white-whale/src/epoch_manager/hooks.rs b/packages/white-whale-std/src/epoch_manager/hooks.rs similarity index 100% rename from packages/white-whale/src/epoch_manager/hooks.rs rename to packages/white-whale-std/src/epoch_manager/hooks.rs diff --git a/packages/white-whale/src/epoch_manager/mod.rs b/packages/white-whale-std/src/epoch_manager/mod.rs similarity index 100% rename from packages/white-whale/src/epoch_manager/mod.rs rename to packages/white-whale-std/src/epoch_manager/mod.rs diff --git a/packages/white-whale/src/fee.rs b/packages/white-whale-std/src/fee.rs similarity index 100% rename from packages/white-whale/src/fee.rs rename to packages/white-whale-std/src/fee.rs diff --git a/packages/white-whale/src/fee_collector.rs b/packages/white-whale-std/src/fee_collector.rs similarity index 100% rename from packages/white-whale/src/fee_collector.rs rename to packages/white-whale-std/src/fee_collector.rs diff --git a/packages/white-whale/src/fee_distributor.rs b/packages/white-whale-std/src/fee_distributor.rs similarity index 100% rename from packages/white-whale/src/fee_distributor.rs rename to packages/white-whale-std/src/fee_distributor.rs diff --git a/packages/white-whale/src/lib.rs b/packages/white-whale-std/src/lib.rs similarity index 100% rename from packages/white-whale/src/lib.rs rename to packages/white-whale-std/src/lib.rs diff --git a/packages/white-whale/src/migrate_guards.rs b/packages/white-whale-std/src/migrate_guards.rs similarity index 100% rename from packages/white-whale/src/migrate_guards.rs rename to packages/white-whale-std/src/migrate_guards.rs diff --git a/packages/white-whale/src/pool_network/asset.rs b/packages/white-whale-std/src/pool_network/asset.rs similarity index 100% rename from packages/white-whale/src/pool_network/asset.rs rename to packages/white-whale-std/src/pool_network/asset.rs diff --git a/packages/white-whale/src/pool_network/denom.rs b/packages/white-whale-std/src/pool_network/denom.rs similarity index 100% rename from packages/white-whale/src/pool_network/denom.rs rename to packages/white-whale-std/src/pool_network/denom.rs diff --git a/packages/white-whale/src/pool_network/denom_injective.rs b/packages/white-whale-std/src/pool_network/denom_injective.rs similarity index 100% rename from packages/white-whale/src/pool_network/denom_injective.rs rename to packages/white-whale-std/src/pool_network/denom_injective.rs diff --git a/packages/white-whale/src/pool_network/denom_osmosis.rs b/packages/white-whale-std/src/pool_network/denom_osmosis.rs similarity index 100% rename from packages/white-whale/src/pool_network/denom_osmosis.rs rename to packages/white-whale-std/src/pool_network/denom_osmosis.rs diff --git a/packages/white-whale/src/pool_network/factory.rs b/packages/white-whale-std/src/pool_network/factory.rs similarity index 100% rename from packages/white-whale/src/pool_network/factory.rs rename to packages/white-whale-std/src/pool_network/factory.rs diff --git a/packages/white-whale/src/pool_network/frontend_helper.rs b/packages/white-whale-std/src/pool_network/frontend_helper.rs similarity index 100% rename from packages/white-whale/src/pool_network/frontend_helper.rs rename to packages/white-whale-std/src/pool_network/frontend_helper.rs diff --git a/packages/white-whale/src/pool_network/incentive.rs b/packages/white-whale-std/src/pool_network/incentive.rs similarity index 100% rename from packages/white-whale/src/pool_network/incentive.rs rename to packages/white-whale-std/src/pool_network/incentive.rs diff --git a/packages/white-whale/src/pool_network/incentive_factory.rs b/packages/white-whale-std/src/pool_network/incentive_factory.rs similarity index 100% rename from packages/white-whale/src/pool_network/incentive_factory.rs rename to packages/white-whale-std/src/pool_network/incentive_factory.rs diff --git a/packages/white-whale/src/pool_network/mock_querier.rs b/packages/white-whale-std/src/pool_network/mock_querier.rs similarity index 100% rename from packages/white-whale/src/pool_network/mock_querier.rs rename to packages/white-whale-std/src/pool_network/mock_querier.rs diff --git a/packages/white-whale/src/pool_network/mod.rs b/packages/white-whale-std/src/pool_network/mod.rs similarity index 100% rename from packages/white-whale/src/pool_network/mod.rs rename to packages/white-whale-std/src/pool_network/mod.rs diff --git a/packages/white-whale/src/pool_network/pair.rs b/packages/white-whale-std/src/pool_network/pair.rs similarity index 100% rename from packages/white-whale/src/pool_network/pair.rs rename to packages/white-whale-std/src/pool_network/pair.rs diff --git a/packages/white-whale/src/pool_network/querier.rs b/packages/white-whale-std/src/pool_network/querier.rs similarity index 100% rename from packages/white-whale/src/pool_network/querier.rs rename to packages/white-whale-std/src/pool_network/querier.rs diff --git a/packages/white-whale/src/pool_network/router.rs b/packages/white-whale-std/src/pool_network/router.rs similarity index 100% rename from packages/white-whale/src/pool_network/router.rs rename to packages/white-whale-std/src/pool_network/router.rs diff --git a/packages/white-whale/src/pool_network/swap.rs b/packages/white-whale-std/src/pool_network/swap.rs similarity index 100% rename from packages/white-whale/src/pool_network/swap.rs rename to packages/white-whale-std/src/pool_network/swap.rs diff --git a/packages/white-whale/src/pool_network/testing.rs b/packages/white-whale-std/src/pool_network/testing.rs similarity index 100% rename from packages/white-whale/src/pool_network/testing.rs rename to packages/white-whale-std/src/pool_network/testing.rs diff --git a/packages/white-whale/src/pool_network/token.rs b/packages/white-whale-std/src/pool_network/token.rs similarity index 100% rename from packages/white-whale/src/pool_network/token.rs rename to packages/white-whale-std/src/pool_network/token.rs diff --git a/packages/white-whale/src/pool_network/trio.rs b/packages/white-whale-std/src/pool_network/trio.rs similarity index 100% rename from packages/white-whale/src/pool_network/trio.rs rename to packages/white-whale-std/src/pool_network/trio.rs diff --git a/packages/white-whale/src/traits.rs b/packages/white-whale-std/src/traits.rs similarity index 100% rename from packages/white-whale/src/traits.rs rename to packages/white-whale-std/src/traits.rs diff --git a/packages/white-whale/src/vault_network/mod.rs b/packages/white-whale-std/src/vault_network/mod.rs similarity index 100% rename from packages/white-whale/src/vault_network/mod.rs rename to packages/white-whale-std/src/vault_network/mod.rs diff --git a/packages/white-whale/src/vault_network/vault.rs b/packages/white-whale-std/src/vault_network/vault.rs similarity index 100% rename from packages/white-whale/src/vault_network/vault.rs rename to packages/white-whale-std/src/vault_network/vault.rs diff --git a/packages/white-whale/src/vault_network/vault_factory.rs b/packages/white-whale-std/src/vault_network/vault_factory.rs similarity index 100% rename from packages/white-whale/src/vault_network/vault_factory.rs rename to packages/white-whale-std/src/vault_network/vault_factory.rs diff --git a/packages/white-whale/src/vault_network/vault_router.rs b/packages/white-whale-std/src/vault_network/vault_router.rs similarity index 100% rename from packages/white-whale/src/vault_network/vault_router.rs rename to packages/white-whale-std/src/vault_network/vault_router.rs diff --git a/packages/white-whale/src/whale_lair.rs b/packages/white-whale-std/src/whale_lair.rs similarity index 100% rename from packages/white-whale/src/whale_lair.rs rename to packages/white-whale-std/src/whale_lair.rs diff --git a/packages/white-whale-testing/Cargo.toml b/packages/white-whale-testing/Cargo.toml index b9f323d0..28bd83ba 100644 --- a/packages/white-whale-testing/Cargo.toml +++ b/packages/white-whale-testing/Cargo.toml @@ -22,7 +22,7 @@ schemars.workspace = true serde.workspace = true cosmwasm-schema.workspace = true cw-multi-test.workspace = true -white-whale.workspace = true +white-whale-std.workspace = true whale-lair.workspace = true fee_collector.workspace = true fee_distributor.workspace = true diff --git a/scripts/build_release.sh b/scripts/build_release.sh index 63647b18..fb6a6c39 100755 --- a/scripts/build_release.sh +++ b/scripts/build_release.sh @@ -42,9 +42,9 @@ osmosis) # add the osmosis feature flag to the Cargo.toml file so it optimizes correctly if [[ "$(uname)" == "Darwin" ]]; then - sed -i '' '/white-whale =/ s/features = \[\]/features = \["osmosis"\]/' $projectRootPath/Cargo.toml + sed -i '' '/white-whale-std =/ s/features = \[\]/features = \["osmosis"\]/' $projectRootPath/Cargo.toml else - sed -i '/white-whale =/ s/features = \[\]/features = \["osmosis"\]/' $projectRootPath/Cargo.toml + sed -i '/white-whale-std =/ s/features = \[\]/features = \["osmosis"\]/' $projectRootPath/Cargo.toml fi ;; diff --git a/scripts/get_artifacts_versions.sh b/scripts/get_artifacts_versions.sh index 71b462b3..9f25c95a 100755 --- a/scripts/get_artifacts_versions.sh +++ b/scripts/get_artifacts_versions.sh @@ -4,6 +4,7 @@ set -e project_root_path=$(realpath "$0" | sed 's|\(.*\)/.*|\1|' | cd ../ | pwd) echo -e "\nGetting artifacts versions...\n" +echo -e "Contracts::\n" for artifact in artifacts/*.wasm; do artifact="${artifact%-*}" contract_path=$(find "$project_root_path" -iname $(cut -d . -f 1 <<<$(basename $artifact)) -type d) @@ -12,4 +13,9 @@ for artifact in artifacts/*.wasm; do printf "%-25s %s\n" "$(basename $artifact)" ": $version" done +echo -e "\nPackages::\n" + +version=$(grep 'white-whale-std = ' ''"$project_root_path"'/Cargo.toml' | sed -n 's/.*version = "\([^"]*\)".*/\1/p') +printf "%-25s %s\n" "white-whale-std" ": $version" + echo -e "\n"