pub enum QueryMsg {
Config {},
Verify {
address: Addr,
proof: Proof,
},
Simulate {
collateral_amount: Uint128,
repay_denom: Option<Denom>,
exchange_rate: Decimal,
},
SimulateReverse {
repay_amount: Uint128,
repay_denom: Option<Denom>,
exchange_rate: Decimal,
},
SimulateWithTarget {
collateral_amount: Uint128,
debt_amount: Uint128,
target_ltv: Decimal,
repay_denom: Option<Denom>,
exchange_rate: Decimal,
},
Bid {
bid_idx: Uint128,
},
BidsByUser {
bidder: Addr,
start_after: Option<Uint128>,
limit: Option<u8>,
},
BidPool {
bid_slot: u8,
},
BidPools {
start_after: Option<u8>,
limit: Option<u8>,
},
}Expand description
Standard interface to query contract state
Variants§
Config
Current config. Returns ConfigResponse
Verify
Checks the validity of an address against the merkle root
Simulate
Simulate a liquidation based on the current pool balances. Returns SimulationResponse
Fields
SimulateReverse
Calculates the amount of collateral needed to return a required repay_amount, based on the current pool balances. Returns SimulationResponse
Fields
SimulateWithTarget
Given the current collateral and debt amounts, calculates the amount of collateral that needs to be liquidated to bring the LTV to the target LTV. Returns SimulationResponse
Fields
Bid
Query a specific bid by idx. Returns BidResponse
BidsByUser
Paginate user bids. Upper limit of 30 per page. Returns BidsResponse
BidPool
Query a specific bid pool. Returns BidPoolResponse
BidPools
Paginate bid pools. Upper limit of 30 per page. Returns BidPoolsResponse
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QueryMsg
impl<'de> Deserialize<'de> for QueryMsg
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for QueryMsg
impl JsonSchema for QueryMsg
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for QueryMsg
Auto Trait Implementations§
impl Freeze for QueryMsg
impl RefUnwindSafe for QueryMsg
impl Send for QueryMsg
impl Sync for QueryMsg
impl Unpin for QueryMsg
impl UnwindSafe for QueryMsg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more