Skip to content

Commit

Permalink
ci: prepare white-whale-std crate
Browse files Browse the repository at this point in the history
  • Loading branch information
kerber0x authored Jan 25, 2024
2 parents dc80b06 + 5bfa4a9 commit ebbf9fd
Show file tree
Hide file tree
Showing 239 changed files with 1,221 additions and 1,100 deletions.
Empty file removed 0.03536
Empty file.
36 changes: 18 additions & 18 deletions Cargo.lock

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

29 changes: 16 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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" }
Expand Down
8 changes: 4 additions & 4 deletions contracts/liquidity_hub/epoch-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion contracts/liquidity_hub/epoch-manager/src/bin/schema.rs
Original file line number Diff line number Diff line change
@@ -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! {
Expand Down
4 changes: 2 additions & 2 deletions contracts/liquidity_hub/epoch-manager/src/commands.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions contracts/liquidity_hub/epoch-manager/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion contracts/liquidity_hub/epoch-manager/src/queries.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
2 changes: 1 addition & 1 deletion contracts/liquidity_hub/epoch-manager/src/state.rs
Original file line number Diff line number Diff line change
@@ -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");
Expand Down
8 changes: 4 additions & 4 deletions contracts/liquidity_hub/fee-distributor-mock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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"
22 changes: 11 additions & 11 deletions contracts/liquidity_hub/fee-distributor-mock/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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![],
Expand All @@ -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![],
Expand All @@ -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(&"")
Expand Down
2 changes: 1 addition & 1 deletion contracts/liquidity_hub/fee-distributor-mock/src/state.rs
Original file line number Diff line number Diff line change
@@ -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");
14 changes: 7 additions & 7 deletions contracts/liquidity_hub/fee_collector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand All @@ -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]
Expand Down
Loading

0 comments on commit ebbf9fd

Please sign in to comment.