Documentation ¶
Index ¶
- func GetStargateWhitelistedPaths() (keys []string)
- func GetWhitelistedQuery(queryPath string) (codec.ProtoMarshaler, error)
- func MarshalResponse(resp interface{}) ([]byte, error)
- func StargateQuerier(queryRouter baseapp.GRPCQueryRouter, cdc codec.Codec) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error)
- type Plugin
- type UmeeQuery
- func (q UmeeQuery) HandleAccountBalances(ctx context.Context, qs lvtypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleAccountBonds(ctx context.Context, qs incentive.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) HandleActualRates(ctx context.Context, qs incentive.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) HandleCompletedIncentivePrograms(ctx context.Context, qs incentive.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleCurrentRates(ctx context.Context, qs incentive.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) HandleIncentiveParams(ctx context.Context, qs incentive.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleIncentiveProgram(ctx context.Context, qs incentive.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleLastRewardTime(ctx context.Context, qs incentive.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) HandleMeTokenIndexBalances(ctx context.Context, qs metoken.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleMeTokenIndexPrice(ctx context.Context, qs metoken.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleMeTokenIndexes(ctx context.Context, qs metoken.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleMeTokenParams(ctx context.Context, qs metoken.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleMeTokenRedeemFee(ctx context.Context, qs metoken.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleMeTokenSwapFee(ctx context.Context, qs metoken.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) HandleOngoingIncentivePrograms(ctx context.Context, qs incentive.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleOracleParams(ctx sdk.Context, qs octypes.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandlePendingRewards(ctx context.Context, qs incentive.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)
- func (q UmeeQuery) HandleTotalBonded(ctx context.Context, qs incentive.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleTotalUnbonding(ctx context.Context, qs incentive.QueryServer) (proto.Message, error)
- func (q UmeeQuery) HandleUpcomingIncentivePrograms(ctx context.Context, qs incentive.QueryServer) (proto.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStargateWhitelistedPaths ¶
func GetStargateWhitelistedPaths() (keys []string)
func GetWhitelistedQuery ¶
func GetWhitelistedQuery(queryPath string) (codec.ProtoMarshaler, error)
GetWhitelistedQuery returns the whitelisted query at the provided path. If the query does not exist, or it was setup wrong by the chain, this returns an error.
func MarshalResponse ¶
MarshalResponse marshals any response.
func StargateQuerier ¶
func StargateQuerier( queryRouter baseapp.GRPCQueryRouter, cdc codec.Codec, ) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error)
StargateQuerier dispatches whitelisted stargate queries
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin wraps the query plugin with queriers.
func NewQueryPlugin ¶
func NewQueryPlugin( leverageKeeper lvkeeper.Keeper, oracleKeeper ockeeper.Keeper, incentiveKeeper inckeeper.Keeper, metokenBuilder metokenkeeper.Builder, ) *Plugin
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"` // incentive queries // Incentive module params . IncentiveParameters *incentive.QueryParams `json:"incentive_parameters,omitempty"` // TotalBonded queries the sum of all bonded collateral uTokens. TotalBonded *incentive.QueryTotalBonded `json:"total_bonded,omitempty"` // TotalUnbonding queries the sum of all unbonding collateral uTokens. TotalUnbonding *incentive.QueryTotalUnbonding `json:"total_unbonding,omitempty"` // AccountBonds queries all bonded collateral and unbondings associated with an account. AccountBonds *incentive.QueryAccountBonds `json:"account_bonds,omitempty"` // PendingRewards queries unclaimed incentive rewards associated with an account. PendingRewards *incentive.QueryPendingRewards `json:"pending_rewards,omitempty"` // CompletedIncentivePrograms queries for all incentives programs that have been passed // by governance, CompletedIncentivePrograms *incentive.QueryCompletedIncentivePrograms `json:"completed_incentive_programs,omitempty"` // OngoingIncentivePrograms queries for all incentives programs that have been passed // by governance, funded, and started but not yet completed. OngoingIncentivePrograms *incentive.QueryOngoingIncentivePrograms `json:"ongoing_incentive_programs,omitempty"` // UpcomingIncentivePrograms queries for all incentives programs that have been passed // by governance, but not yet started. They may or may not have been funded. UpcomingIncentivePrograms *incentive.QueryUpcomingIncentivePrograms `json:"upcoming_incentive_programs,omitempty"` // IncentiveProgram queries a single incentive program by ID. IncentiveProgram *incentive.QueryIncentiveProgram `json:"incentive_program,omitempty"` // CurrentRates queries the hypothetical return of a bonded uToken denomination // if current incentive rewards continued for one year. The response is an sdk.Coins // of base token rewards, per reference amount (usually 10^exponent of the uToken.) CurrentRates *incentive.QueryCurrentRates `json:"current_rates,omitempty"` // ActualRates queries the hypothetical return of a bonded uToken denomination // if current incentive rewards continued for one year. The response is an sdk.Dec // representing an oracle-adjusted APY. ActualRates *incentive.QueryActualRates `json:"actual_rates,omitempty"` // LastRewardTime queries the last block time at which incentive rewards were calculated. LastRewardTime *incentive.QueryLastRewardTime `json:"last_reward_time,omitempty"` // metoken queries MeTokenParameters *metoken.QueryParams `json:"metoken_parameters,omitempty"` Indexes *metoken.QueryIndexes `json:"metoken_indexes,omitempty"` SwapFee *metoken.QuerySwapFee `json:"metoken_swapfee,omitempty"` RedeemFee *metoken.QueryRedeemFee `json:"metoken_redeemfee,omitempty"` IndexBalances *metoken.QueryIndexBalances `json:"metoken_indexbalances,omitempty"` IndexPrice *metoken.QueryIndexPrices `json:"metoken_indexprice,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) HandleAccountBonds ¶
func (q UmeeQuery) HandleAccountBonds( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandleAccountBonds handles the get all bonded collateral and unbondings associated with an account.
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) HandleActualRates ¶
func (q UmeeQuery) HandleActualRates( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandleActualRates handles the get the actutal rates of given denom
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) HandleCompletedIncentivePrograms ¶
func (q UmeeQuery) HandleCompletedIncentivePrograms( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandleCompletedIncentivePrograms handles the get all incentives programs that have been passed by governance,
func (UmeeQuery) HandleCurrentRates ¶
func (q UmeeQuery) HandleCurrentRates( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandleCurrentRates handles the get current rates of given denom
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) HandleIncentiveParams ¶
func (q UmeeQuery) HandleIncentiveParams( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandleLeverageParams handles the get the x/leverage module's parameters.
func (UmeeQuery) HandleIncentiveProgram ¶
func (q UmeeQuery) HandleIncentiveProgram( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandleIncentiveProgram handles the get a single incentive program by ID.
func (UmeeQuery) HandleLastRewardTime ¶
func (q UmeeQuery) HandleLastRewardTime( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandleLastRewardTime handles the get last block time at which incentive rewards were calculated.
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) HandleMeTokenIndexBalances ¶
func (q UmeeQuery) HandleMeTokenIndexBalances( ctx context.Context, qs metoken.QueryServer, ) (proto.Message, error)
HandleMeTokenIndexBalances handles the get for x/metoken indexes balances.
func (UmeeQuery) HandleMeTokenIndexPrice ¶
func (q UmeeQuery) HandleMeTokenIndexPrice( ctx context.Context, qs metoken.QueryServer, ) (proto.Message, error)
HandleMeTokenIndexPrice handles the get for x/metoken indexe price.
func (UmeeQuery) HandleMeTokenIndexes ¶
func (q UmeeQuery) HandleMeTokenIndexes( ctx context.Context, qs metoken.QueryServer, ) (proto.Message, error)
HandleMeTokenIndexes handles the get for x/metoken indexes.
func (UmeeQuery) HandleMeTokenParams ¶
func (q UmeeQuery) HandleMeTokenParams( ctx context.Context, qs metoken.QueryServer, ) (proto.Message, error)
HandleMeTokenParams handles the get for x/metoken module's parameters.
func (UmeeQuery) HandleMeTokenRedeemFee ¶
func (q UmeeQuery) HandleMeTokenRedeemFee( ctx context.Context, qs metoken.QueryServer, ) (proto.Message, error)
HandleMeTokenRedeemFee handles the get for x/metoken redeem fee.
func (UmeeQuery) HandleMeTokenSwapFee ¶
func (q UmeeQuery) HandleMeTokenSwapFee( ctx context.Context, qs metoken.QueryServer, ) (proto.Message, error)
HandleMeTokenSwapFee handles the get for x/metoken swap fee.
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) HandleOngoingIncentivePrograms ¶
func (q UmeeQuery) HandleOngoingIncentivePrograms( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandleOngoingIncentivePrograms handles the get all incentives programs that have been passed by governance, funded, and started but not yet completed.
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) HandlePendingRewards ¶
func (q UmeeQuery) HandlePendingRewards( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandlePendingRewards handles the gets all unclaimed incentive rewards associated with an account.
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.
func (UmeeQuery) HandleTotalBonded ¶
func (q UmeeQuery) HandleTotalBonded( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandleTotalBonded handles the get the sum of all bonded collateral uTokens.
func (UmeeQuery) HandleTotalUnbonding ¶
func (q UmeeQuery) HandleTotalUnbonding( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandleTotalUnbonding handles the get the sum of all unbonding collateral uTokens.
func (UmeeQuery) HandleUpcomingIncentivePrograms ¶
func (q UmeeQuery) HandleUpcomingIncentivePrograms( ctx context.Context, qs incentive.QueryServer, ) (proto.Message, error)
HandleUpcomingIncentivePrograms handles the get all incentives programs that have been passed by governance, but not yet started. They may or may not have been funded.