Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 43 additions & 47 deletions Cargo.lock

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

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,7 @@ mars-mock-pyth = { path = "./contracts/mock-pyth" }
mars-oracle-base = { path = "./contracts/oracle/base" }
mars-oracle-osmosis = { path = "./contracts/oracle/osmosis" }
mars-oracle-wasm = { path = "./contracts/oracle/wasm" }
# mars-params needs the `library` flag because mars-rover-health depends on it.
# We should remove the type definitions in a "mars-types" crate and have the
# health contract depend on it instead. This way, we can remove the library flag
# here.
mars-params = { path = "./contracts/params", features = ["library"] }
mars-params = { path = "./contracts/params" }
mars-red-bank = { path = "./contracts/red-bank" }
mars-rewards-collector-base = { path = "./contracts/rewards-collector/base" }
mars-rewards-collector-neutron = { path = "./contracts/rewards-collector/neutron" }
Expand Down
2 changes: 1 addition & 1 deletion contracts/credit-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ cw-utils = { workspace = true }
cw-vault-standard = { workspace = true }
mars-account-nft-types = { workspace = true }
mars-liquidation = { workspace = true }
mars-params = { workspace = true }
mars-owner = { workspace = true }
mars-red-bank-types = { workspace = true }
mars-rover = { workspace = true }
Expand All @@ -46,6 +45,7 @@ mars-mock-incentives = { workspace = true }
mars-mock-oracle = { workspace = true }
mars-mock-red-bank = { workspace = true }
mars-mock-vault = { workspace = true }
mars-params = { workspace = true }
mars-rover-health = { workspace = true }
mars-swapper-mock = { workspace = true }
mars-zapper-mock = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion contracts/credit-manager/src/deposit.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::collections::BTreeSet;

use cosmwasm_std::{Coin, Deps, DepsMut, Response, Uint128};
use mars_params::msg::TotalDepositResponse;
use mars_red_bank_types::params::TotalDepositResponse;
use mars_rover::{
coins::Coins,
error::{ContractError, ContractResult},
Expand Down
2 changes: 1 addition & 1 deletion contracts/credit-manager/src/hls.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cosmwasm_std::{Deps, Response};
use mars_params::types::hls::HlsAssetType;
use mars_red_bank_types::params::HlsAssetType;
use mars_rover::error::{ContractError, ContractResult};
use mars_rover_health_types::AccountKind;

Expand Down
2 changes: 1 addition & 1 deletion contracts/credit-manager/tests/helpers/builders.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use cosmwasm_std::{coin, Decimal};
use cw_utils::Duration;
use mars_params::types::asset::LiquidationBonus;
use mars_red_bank_types::params::LiquidationBonus;

use crate::helpers::{lp_token_info, CoinInfo, VaultTestInfo};

Expand Down
5 changes: 1 addition & 4 deletions contracts/credit-manager/tests/helpers/mock_entity_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ use std::str::FromStr;

use cosmwasm_std::{coin, Decimal};
use cw_utils::Duration;
use mars_params::types::{
asset::LiquidationBonus,
hls::{HlsAssetType, HlsParamsUnchecked},
};
use mars_red_bank_types::params::{HlsAssetType, HlsParamsUnchecked, LiquidationBonus};

use crate::helpers::{CoinInfo, VaultTestInfo};

Expand Down
19 changes: 7 additions & 12 deletions contracts/credit-manager/tests/helpers/mock_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,17 @@ use mars_mock_vault::{
contract::DEFAULT_VAULT_TOKEN_PREFUND, msg::InstantiateMsg as VaultInstantiateMsg,
};
use mars_owner::OwnerUpdate;
use mars_params::{
msg::{
AssetParamsUpdate,
AssetParamsUpdate::AddOrUpdate,
ExecuteMsg::{UpdateAssetParams, UpdateVaultConfig},
InstantiateMsg as ParamsInstantiateMsg, QueryMsg as ParamsQueryMsg, VaultConfigUpdate,
},
types::{
asset::AssetParams,
vault::{VaultConfig, VaultConfigUnchecked},
},
};
use mars_red_bank_types::{
address_provider::{self, MarsAddressType},
incentives::{ExecuteMsg::BalanceChange, QueryMsg::UserUnclaimedRewards},
oracle::ActionKind,
params::{
AssetParams, AssetParamsUpdate,
AssetParamsUpdate::AddOrUpdate,
ExecuteMsg::{UpdateAssetParams, UpdateVaultConfig},
InstantiateMsg as ParamsInstantiateMsg, QueryMsg as ParamsQueryMsg, VaultConfig,
VaultConfigUnchecked, VaultConfigUpdate,
},
red_bank::{
self, InitOrUpdateAssetParams, InterestRateModel,
QueryMsg::{UserCollateral, UserDebt},
Expand Down
5 changes: 2 additions & 3 deletions contracts/credit-manager/tests/helpers/types.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use cosmwasm_schema::cw_serde;
use cosmwasm_std::{coin, Addr, Coin, Decimal, Uint128};
use cw_utils::Duration;
use mars_params::types::{
asset::{AssetParamsUnchecked, CmSettings, LiquidationBonus, RedBankSettings},
hls::HlsParamsUnchecked,
use mars_red_bank_types::params::{
AssetParamsUnchecked, CmSettings, HlsParamsUnchecked, LiquidationBonus, RedBankSettings,
};
use mars_rover::msg::execute::{ActionAmount, ActionCoin};

Expand Down
2 changes: 1 addition & 1 deletion contracts/credit-manager/tests/test_claim_rewards.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cosmwasm_std::{Addr, Uint128};
use mars_params::{msg::AssetParamsUpdate::AddOrUpdate, types::hls::HlsAssetType};
use mars_red_bank_types::params::{AssetParamsUpdate::AddOrUpdate, HlsAssetType};
use mars_rover::{
error::ContractError,
msg::execute::Action::{Borrow, ClaimRewards, Deposit},
Expand Down
2 changes: 1 addition & 1 deletion contracts/credit-manager/tests/test_deposit_cap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub mod helpers;
use std::collections::HashMap;

use cosmwasm_std::{Addr, Coin, Coins, Decimal, StdResult, Uint128};
use mars_params::{msg::AssetParamsUpdate, types::asset::AssetParams};
use mars_red_bank_types::params::{AssetParams, AssetParamsUpdate};
use mars_rover::{
error::ContractError,
msg::execute::{Action, ActionAmount, ActionCoin},
Expand Down
7 changes: 3 additions & 4 deletions contracts/credit-manager/tests/test_health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ use std::ops::{Add, Mul};
use cosmwasm_std::{coin, coins, Addr, Coin, Decimal, Uint128};
use mars_credit_manager::borrow::DEFAULT_DEBT_SHARES_PER_COIN_BORROWED;
use mars_mock_oracle::msg::CoinPrice;
use mars_params::{
msg::{AssetParamsUpdate::AddOrUpdate, VaultConfigUpdate},
types::asset::LiquidationBonus,
use mars_red_bank_types::{
oracle::ActionKind,
params::{AssetParamsUpdate::AddOrUpdate, LiquidationBonus, VaultConfigUpdate},
};
use mars_red_bank_types::oracle::ActionKind;
use mars_rover::{
error::ContractError,
msg::{
Expand Down
Loading