Documentation ¶
Index ¶
- func MarshalResponse(resp interface{}) ([]byte, error)
- type Plugin
- type UmeeQuery
- func (q UmeeQuery) HandleAccountBalances(ctx context.Context, qs lvtypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleAccountSummary(ctx context.Context, qs lvtypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleActiveExchangeRates(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleAggregatePrevote(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleAggregatePrevotes(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleAggregateVote(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleAggregateVotes(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleBadDebts(ctx context.Context, qs lvtypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleExchangeRates(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleFeederDelegation(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleLeverageParams(ctx context.Context, qs lvtypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleLiquidationTargets(ctx context.Context, qs lvtypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleMarketSummary(ctx context.Context, qs lvtypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleMaxBorrow(ctx context.Context, qs lvtypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleMaxWithdraw(ctx context.Context, qs lvtypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleMedianDeviations(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleMedians(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleMissCounter(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleOracleParams(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleRegisteredTokens(ctx context.Context, qs lvtypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleSlashWindow(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalResponse ¶
MarshalResponse marshals any response.
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin wraps the query plugin with queriers.
func NewQueryPlugin ¶
NewQueryPlugin creates a plugin to query native modules.
func (*Plugin) CustomQuerier ¶
func (plugin *Plugin) CustomQuerier() func(ctx sdk.Context, request json.RawMessage) ([]byte, error)
CustomQuerier implements custom querier for wasm smartcontracts acess umee native modules.
type UmeeQuery ¶
type UmeeQuery struct { // Leverage queries // Used to query the x/leverage module's parameters. LeverageParameters *lvtypes.QueryParams `json:"leverage_parameters,omitempty"` // Used to query all the registered tokens. RegisteredTokens *lvtypes.QueryRegisteredTokens `json:"registered_tokens,omitempty"` // Used to get the summary data of an denom. MarketSummary *lvtypes.QueryMarketSummary `json:"market_summary,omitempty"` // Used to get an account's current supply, collateral, and borrow positions. AccountBalances *lvtypes.QueryAccountBalances `json:"account_balances,omitempty"` // Used to queries USD values representing an account's total positions and borrowing limits. AccountSummary *lvtypes.QueryAccountSummary `json:"account_summary,omitempty"` // request to return a list of borrower addresses eligible for liquidation. LiquidationTargets *lvtypes.QueryLiquidationTargets `json:"liquidation_targets,omitempty"` // requet to returns list of bad debts BadDebts *lvtypes.QueryBadDebts `json:"bad_debts_params,omitempty"` // request to returns max withdraw MaxWithdraw *lvtypes.QueryMaxWithdraw `json:"max_withdraw_params,omitempty"` // request to get max borrows MaxBorrow *lvtypes.QueryMaxBorrow `json:"max_borrow_params,omitempty"` // oracle queries // Used to get all feeder delegation of a validator. FeederDelegation *octypes.QueryFeederDelegation `json:"feeder_delegation,omitempty"` // Used to get all the oracle miss counter of a validator. MissCounter *octypes.QueryMissCounter `json:"miss_counter,omitempty"` // Used to get information of an slash window. SlashWindow *octypes.QuerySlashWindow `json:"slash_window,omitempty"` // Used to get an aggregate prevote of a validator. AggregatePrevote *octypes.QueryAggregatePrevote `json:"aggregate_prevote,omitempty"` // Used to get an aggregate prevote of all validators. AggregatePrevotes *octypes.QueryAggregatePrevotes `json:"aggregate_prevotes,omitempty"` // Used to get an aggregate vote of a validator. AggregateVote *octypes.QueryAggregateVote `json:"aggregate_vote,omitempty"` // Used to get an aggregate vote of all validators. AggregateVotes *octypes.QueryAggregateVotes `json:"aggregate_votes,omitempty"` // Used to query the x/oracle module's parameters. OracleParams *octypes.QueryParams `json:"oracle_params,omitempty"` // Used to get the exchange rates of all denoms. ExchangeRates *octypes.QueryExchangeRates `json:"exchange_rates,omitempty"` // Used to get all active denoms. ActiveExchangeRates *octypes.QueryActiveExchangeRates `json:"active_exchange_rates,omitempty"` // Used to get all medians. Medians *octypes.QueryMedians `json:"medians,omitempty"` // Used to get all median deviations. MedianDeviations *octypes.QueryMedianDeviations `json:"median_deviations,omitempty"` }
UmeeQuery wraps all the queries availables for cosmwasm smartcontracts.
func (UmeeQuery) HandleAccountBalances ¶
func (q UmeeQuery) HandleAccountBalances( ctx context.Context, qs lvtypes.QueryServer, ) (proto.Message, error)
HandleAccountBalances queries an account's current supply, collateral, and borrow positions.
func (UmeeQuery) HandleAccountSummary ¶
func (q UmeeQuery) HandleAccountSummary( ctx context.Context, qs lvtypes.QueryServer, ) (proto.Message, error)
HandleAccountSummary queries USD values representing an account's total positions and borrowing limits. It requires oracle prices to return successfully.
func (UmeeQuery) HandleActiveExchangeRates ¶
func (q UmeeQuery) HandleActiveExchangeRates( ctx sdk.Context, qs octypes.QueryServer, ) (proto.Message, error)
HandleActiveExchangeRates gets all active denoms.
func (UmeeQuery) HandleAggregatePrevote ¶
func (q UmeeQuery) HandleAggregatePrevote( ctx sdk.Context, qs octypes.QueryServer, ) (proto.Message, error)
HandleAggregatePrevote gets an aggregate prevote of a validator.
func (UmeeQuery) HandleAggregatePrevotes ¶
func (q UmeeQuery) HandleAggregatePrevotes( ctx sdk.Context, qs octypes.QueryServer, ) (proto.Message, error)
HandleAggregatePrevotes gets an aggregate prevote of all validators.
func (UmeeQuery) HandleAggregateVote ¶
func (q UmeeQuery) HandleAggregateVote( ctx sdk.Context, qs octypes.QueryServer, ) (proto.Message, error)
HandleAggregateVote gets an aggregate vote of a validator.
func (UmeeQuery) HandleAggregateVotes ¶
func (q UmeeQuery) HandleAggregateVotes( ctx sdk.Context, qs octypes.QueryServer, ) (proto.Message, error)
HandleAggregateVotes gets an aggregate vote of all validators.
func (UmeeQuery) HandleBadDebts ¶
func (q UmeeQuery) HandleBadDebts( ctx context.Context, qs lvtypes.QueryServer, ) (proto.Message, error)
HandleBadDebts queries bad debts.
func (UmeeQuery) HandleExchangeRates ¶
func (q UmeeQuery) HandleExchangeRates( ctx sdk.Context, qs octypes.QueryServer, ) (proto.Message, error)
HandleExchangeRates gets the exchange rates of all denoms.
func (UmeeQuery) HandleFeederDelegation ¶
func (q UmeeQuery) HandleFeederDelegation( ctx sdk.Context, qs octypes.QueryServer, ) (proto.Message, error)
HandleFeederDelegation gets all the feeder delegation of a validator.
func (UmeeQuery) HandleLeverageParams ¶
func (q UmeeQuery) HandleLeverageParams( ctx context.Context, qs lvtypes.QueryServer, ) (proto.Message, error)
HandleLeverageParams handles the get the x/leverage module's parameters.
func (UmeeQuery) HandleLiquidationTargets ¶
func (q UmeeQuery) HandleLiquidationTargets( ctx context.Context, qs lvtypes.QueryServer, ) (proto.Message, error)
HandleLiquidationTargets queries a list of all borrower account addresses eligible for liquidation.
func (UmeeQuery) HandleMarketSummary ¶
func (q UmeeQuery) HandleMarketSummary( ctx context.Context, qs lvtypes.QueryServer, ) (proto.Message, error)
HandleMarketSummary queries a base asset's current borrowing and supplying conditions.
func (UmeeQuery) HandleMaxBorrow ¶
func (q UmeeQuery) HandleMaxBorrow( ctx context.Context, qs lvtypes.QueryServer, ) (proto.Message, error)
HandleMaxBorrow queries max borrow.
func (UmeeQuery) HandleMaxWithdraw ¶
func (q UmeeQuery) HandleMaxWithdraw( ctx context.Context, qs lvtypes.QueryServer, ) (proto.Message, error)
HandleBadDebts queries bad debts.
func (UmeeQuery) HandleMedianDeviations ¶
func (q UmeeQuery) HandleMedianDeviations( ctx sdk.Context, qs octypes.QueryServer, ) (proto.Message, error)
HandleMedians gets median deviations.
func (UmeeQuery) HandleMedians ¶
HandleMedians gets medians.
func (UmeeQuery) HandleMissCounter ¶
func (q UmeeQuery) HandleMissCounter( ctx sdk.Context, qs octypes.QueryServer, ) (proto.Message, error)
HandleMissCounter gets all the oracle miss counter of a validator.
func (UmeeQuery) HandleOracleParams ¶
func (q UmeeQuery) HandleOracleParams( ctx sdk.Context, qs octypes.QueryServer, ) (proto.Message, error)
HandleOracleParams gets the x/oracle module's parameters.
func (UmeeQuery) HandleRegisteredTokens ¶
func (q UmeeQuery) HandleRegisteredTokens( ctx context.Context, qs lvtypes.QueryServer, ) (proto.Message, error)
HandleRegisteredTokens handles the get all registered tokens query and response.
func (UmeeQuery) HandleSlashWindow ¶
func (q UmeeQuery) HandleSlashWindow( ctx sdk.Context, qs octypes.QueryServer, ) (proto.Message, error)
HandleSlashWindow gets slash window information.