pub enum QueryMsg {
Show 13 variants
Version {},
Markets {
start_after: Option<MarketId>,
limit: Option<u32>,
},
MarketInfo {
market_id: MarketId,
},
AddrIsContract {
addr: RawAddr,
},
FactoryOwner {},
ShutdownStatus {
market_id: MarketId,
},
CodeIds {},
GetReferrer {
addr: RawAddr,
},
ListReferees {
addr: RawAddr,
limit: Option<u32>,
start_after: Option<String>,
},
ListRefereeCount {
limit: Option<u32>,
start_after: Option<ListRefereeCountStartAfter>,
},
CopyTrading {
start_after: Option<CopyTradingInfoRaw>,
limit: Option<u32>,
},
CopyTradingForLeader {
leader: RawAddr,
start_after: Option<RawAddr>,
limit: Option<u32>,
},
CounterTrade {
start_after: Option<MarketId>,
limit: Option<u32>,
},
}
Expand description
Queries available on the factory contract
Variants§
Version
- returns [cw2::ContractVersion]
Markets
- returns MarketsResp
All the markets
Fields
start_after: Option<MarketId>
Last seen market ID in a MarketsResp for enumeration
limit: Option<u32>
Defaults to MARKETS_QUERY_LIMIT_DEFAULT
MarketInfo
- returns MarketInfoResponse
Combined query to get the market related addresses
AddrIsContract
- returns AddrIsContractResp
given an address, checks if it’s any of the registered protocol contracts.
FactoryOwner
- returns FactoryOwnerResp
Returns information about the owners of the factory
ShutdownStatus
- returns ShutdownStatus
CodeIds
- returns CodeIds
GetReferrer
Who referred this user, if anyone?
- returns GetReferrerResp
ListReferees
Enumerated query: who was referred by this user?
- returns ListRefereesResp
Fields
start_after: Option<String>
Taken from ListRefereesResp::next_start_after
ListRefereeCount
Enumerated query: referee counts for all referrers.
- returns ListRefereeCountResp
Fields
start_after: Option<ListRefereeCountStartAfter>
Take from ListRefereeCountResp::next_start_after
CopyTrading
Fetch copy trading contracts
Returns CopyTradingResp
Fields
start_after: Option<CopyTradingInfoRaw>
Last seen CopyTradingInfo in a CopyTradingResp for enumeration
limit: Option<u32>
Defaults to QUERY_LIMIT_DEFAULT
CopyTradingForLeader
Fetch copy trading contract belonging to a specfic leader
Returns CopyTradingResp
Fields
limit: Option<u32>
Defaults to QUERY_LIMIT_DEFAULT
CounterTrade
Fetch counter trade contracts
Fields
start_after: Option<MarketId>
Last seen MarketId in a CounterTradeResp for enumeration
limit: Option<u32>
Defaults to QUERY_LIMIT_DEFAULT
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(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moresource§impl PartialEq for QueryMsg
impl PartialEq for QueryMsg
source§impl QueryResponses for QueryMsg
impl QueryResponses for QueryMsg
fn response_schemas_impl() -> BTreeMap<String, RootSchema>
fn response_schemas() -> Result<BTreeMap<String, RootSchema>, IntegrityError>
impl 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§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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