Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Remove state AH contract on devnet #441

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
48 changes: 48 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions bindings/src/account_history/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod msg;
pub mod types;
18 changes: 18 additions & 0 deletions bindings/src/account_history/msg/execute.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
use cosmwasm_schema::cw_serde;

#[cw_serde]
pub enum ExecuteMsg {
AddUserAddressToQueue {
user_address: String,
},
ChangeParams {
update_account_enabled: Option<bool>,
processed_account_per_block: Option<u64>,
delete_old_data_enabled: Option<bool>,
delete_epoch: Option<u64>,
},
CleanStorage {
limit: u64,
},
CleanStorageBulk {},
}
9 changes: 9 additions & 0 deletions bindings/src/account_history/msg/instantiate.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use cosmwasm_schema::cw_serde;
use cw_utils::Expiration;

#[cw_serde]
pub struct InstantiateMsg {
pub limit: Option<u64>,
pub expiration: Option<Expiration>,
pub trade_shield_address: Option<String>,
}
7 changes: 7 additions & 0 deletions bindings/src/account_history/msg/migration.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use cosmwasm_schema::cw_serde;

#[cw_serde]
pub struct MigrationMsg {
pub limit: Option<u64>,
pub trade_shield_address: Option<String>,
}
60 changes: 60 additions & 0 deletions bindings/src/account_history/msg/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
mod execute;
mod instantiate;
mod migration;
mod query;
mod sudo;

pub use execute::ExecuteMsg;
pub use instantiate::InstantiateMsg;
pub use migration::MigrationMsg;
pub use query::QueryMsg;
pub use sudo::SudoMsg;

pub mod query_resp {
mod get_all_resp;
mod get_rewards_resp;
mod get_storage_size;
mod liquid_asset;
mod membership_tier_response;
mod params_resp;
mod total_value_per_asset_resp;
mod user_value_response;

pub use get_all_resp::GetAllResp;
pub use get_rewards_resp::GetRewardsResp;
pub use get_storage_size::StorageSizeResp;
pub use liquid_asset::LiquidAsset;
pub use membership_tier_response::MembershipTierResponse;
pub use params_resp::ParamsResp;
pub use total_value_per_asset_resp::GetLiquidAssetsResp;
pub use user_value_response::UserValueResponse;

mod staked_assets_response;
pub use staked_assets_response::StakeAssetBalanceBreakdown;
pub use staked_assets_response::StakedAssetsResponse;

pub mod earn {
mod get_eden_boost_earn_details_resp;
pub use get_eden_boost_earn_details_resp::GetEdenBoostEarnProgramResp;
mod get_eden_earn_details_resp;
pub use get_eden_earn_details_resp::GetEdenEarnProgramResp;
mod get_elys_earn_details_resp;
pub use get_elys_earn_details_resp::GetElysEarnProgramResp;
mod get_usdc_earn_details_resp;
pub use get_usdc_earn_details_resp::GetUsdcEarnProgramResp;
}

pub mod estaking {
mod get_estaking_rewards_response;
pub use get_estaking_rewards_response::GetEstakingRewardsResponse;
}

pub mod masterchef {
mod get_masterchef_pending_rewards;
mod get_masterchef_pool_apr_response;
mod get_masterchef_stable_stake_response;
pub use get_masterchef_pending_rewards::GetMasterchefUserPendingRewardResponse;
pub use get_masterchef_pool_apr_response::MasterChefPoolAprResponse;
pub use get_masterchef_stable_stake_response::StableStakeAprResponse;
}
}
169 changes: 169 additions & 0 deletions bindings/src/account_history/msg/query.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
#[allow(unused_imports)]
use super::super::types::{PerpetualAssets, PortfolioBalanceSnapshot};
#[allow(unused_imports)]
use super::query_resp::earn::*;
#[allow(unused_imports)]
use super::query_resp::estaking::*;
#[allow(unused_imports)]
use super::query_resp::masterchef::*;

#[allow(unused_imports)]
use super::query_resp::*;
#[allow(unused_imports)]
use crate::query_resp::QueryStableStakeAprResponse;
#[allow(unused_imports)]
use crate::query_resp::{
AuthAddressesResponse, BalanceBorrowed, MasterchefParamsResponse, MasterchefPoolInfoResponse,
PoolFilterType, QueryAprsResponse, QueryEarnPoolResponse, QueryExitPoolEstimationResponse,
QueryJoinPoolEstimationResponse, QueryPoolAssetEstimationResponse, QueryStakedPositionResponse,
QueryUnstakedPositionResponse, QueryUserPoolResponse, QueryVestingInfoResponse,
StableStakeParamsData, StakedAvailable,
};
#[allow(unused_imports)]
use crate::types::{BalanceAvailable, PageRequest};
use cosmwasm_schema::{cw_serde, QueryResponses};
#[allow(unused_imports)]
use cosmwasm_std::Uint128;
#[cfg(feature = "debug")]
use cosmwasm_std::{Coin, DecCoin, Decimal};
use cw2::ContractVersion;

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
#[returns(AuthAddressesResponse)]
Accounts { pagination: Option<PageRequest> },
#[returns(GetLiquidAssetsResp)]
GetLiquidAssets { user_address: String },
#[returns(StakedAssetsResponse)]
GetStakedAssets { user_address: Option<String> },
#[returns(QueryUserPoolResponse)]
GetPoolBalances { user_address: String },
#[returns(GetRewardsResp)]
GetRewards { user_address: String },
#[returns(MembershipTierResponse)]
GetMembershipTier { user_address: String },
#[returns(PerpetualAssets)]
GetPerpetualAssets { user_address: String },
#[returns(Decimal)]
GetAssetPrice { asset: String },
#[returns(Decimal)]
GetAssetPriceFromDenomInToDenomOut { denom_in: String, denom_out: String },

#[returns(QueryEarnPoolResponse)]
GetLiquidityPools {
pool_ids: Option<Vec<u64>>,
filter_type: PoolFilterType,
pagination: Option<PageRequest>,
},

#[returns(QueryJoinPoolEstimationResponse)]
JoinPoolEstimation { pool_id: u64, amounts_in: Vec<Coin> },

#[returns(QueryExitPoolEstimationResponse)]
ExitPoolEstimation {
pool_id: u64,
exit_fiat_amount: Decimal,
},

#[returns(QueryPoolAssetEstimationResponse)]
PoolAssetEstimation { pool_id: u64, amount: DecCoin },

#[returns(GetEstakingRewardsResponse)]
GetEstakingRewards { address: String },

#[returns(MasterchefParamsResponse)]
GetMasterchefParams {},

#[returns(MasterchefPoolInfoResponse)]
GetMasterchefPoolInfo { pool_id: u64 },

#[returns(GetMasterchefUserPendingRewardResponse)]
GetMasterchefPendingRewards { address: String },

#[returns(QueryStableStakeAprResponse)]
GetMasterchefStableStakeApr { denom: String },

#[returns(MasterChefPoolAprResponse)]
GetMasterChefPoolApr { pool_ids: Vec<u64> },
// debug only
#[cfg(feature = "debug")]
#[returns(ParamsResp)]
Params {},

#[cfg(feature = "debug")]
#[returns(PortfolioBalanceSnapshot)]
LastSnapshot { user_address: String },

#[cfg(feature = "debug")]
#[returns(UserValueResponse)]
UserValue { user_address: String },

#[cfg(feature = "debug")]
#[returns(Vec<(String, Vec<PortfolioBalanceSnapshot>)>)]
All { pagination: Option<PageRequest> },

#[cfg(feature = "debug")]
#[returns(Vec<PortfolioBalanceSnapshot>)]
UserSnapshots { user_address: String },

#[cfg(feature = "debug")]
#[returns(QueryStakedPositionResponse)]
CommitmentStakedPositions { delegator_address: String },

#[cfg(feature = "debug")]
#[returns(QueryUnstakedPositionResponse)]
CommitmentUnStakedPositions { delegator_address: String },

#[cfg(feature = "debug")]
#[returns(StakedAvailable)]
CommitmentStakedBalanceOfDenom { address: String, denom: String },

#[cfg(feature = "debug")]
#[returns(BalanceBorrowed)]
StableStakeBalanceOfBorrow {},

#[cfg(feature = "debug")]
#[returns(StableStakeParamsData)]
StableStakeParams {},

#[cfg(feature = "debug")]
#[returns(QueryVestingInfoResponse)]
CommitmentVestingInfo { address: String },

#[cfg(feature = "debug")]
#[returns(BalanceAvailable)]
Balance { address: String, denom: String },

#[cfg(feature = "debug")]
#[returns(Decimal)]
AmmPriceByDenom { token_in: Coin, discount: Decimal },

#[cfg(feature = "debug")]
#[returns(GetEdenEarnProgramResp)]
GetEdenEarnProgramDetails { address: String },

#[cfg(feature = "debug")]
#[returns(GetEdenBoostEarnProgramResp)]
GetEdenBoostEarnProgramDetails { address: String },

#[cfg(feature = "debug")]
#[returns(GetElysEarnProgramResp)]
GetElysEarnProgramDetails { address: String },

#[cfg(feature = "debug")]
#[returns(GetUsdcEarnProgramResp)]
GetUsdcEarnProgramDetails { address: String },

#[cfg(feature = "debug")]
#[returns(QueryAprsResponse)]
IncentiveAprs {},

#[cfg(feature = "debug")]
#[returns(StorageSizeResp)]
StorageSize {},

#[cfg(feature = "debug")]
#[returns(ContractVersion)]
Version {},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use crate::account_history::types::earn_program::eden_boost_earn::EdenBoostEarnProgram;

use cosmwasm_schema::cw_serde;

#[cw_serde]
#[derive(Default)]
pub struct GetEdenBoostEarnProgramResp {
pub data: EdenBoostEarnProgram,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use cosmwasm_schema::cw_serde;

use crate::account_history::types::earn_program::eden_earn::EdenEarnProgram;

#[cw_serde]
#[derive(Default)]
pub struct GetEdenEarnProgramResp {
pub data: EdenEarnProgram,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use crate::account_history::types::earn_program::elys_earn::ElysEarnProgram;
use cosmwasm_schema::cw_serde;

#[cw_serde]
#[derive(Default)]
pub struct GetElysEarnProgramResp {
pub data: ElysEarnProgram,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use crate::account_history::types::earn_program::usdc_earn::UsdcEarnProgram;
use cosmwasm_schema::cw_serde;

#[cw_serde]
#[derive(Default)]
pub struct GetUsdcEarnProgramResp {
pub data: UsdcEarnProgram,
}
Loading
Loading