Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OracleVoteExtension ¶
OracleVoteExtension defines the canonical vote extension structure.
type ProposalHandler ¶
type ProposalHandler struct {
// contains filtered or unexported fields
}
func NewProposalHandler ¶
func NewProposalHandler(logger log.Logger, keeper keeper.Keeper, valStore baseapp.ValidatorStore) *ProposalHandler
func (*ProposalHandler) PreBlocker ¶
func (h *ProposalHandler) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
func (*ProposalHandler) PrepareProposal ¶
func (h *ProposalHandler) PrepareProposal() sdk.PrepareProposalHandler
func (*ProposalHandler) ProcessProposal ¶
func (h *ProposalHandler) ProcessProposal() sdk.ProcessProposalHandler
type Provider ¶
type Provider interface {
GetTickerPrices(...keeper.CurrencyPair) (map[string]keeper.TickerPrice, error)
}
Provider defines an interface for fetching prices and candles for a given set of currency pairs. The provider is presumed to be a trusted source of prices.
type ProviderAggregator ¶
type ProviderAggregator struct {
// contains filtered or unexported fields
}
ProviderAggregator is a simple aggregator for provider prices and candles. It is thread-safe since it is assumed to be called concurrently in price fetching goroutines, i.e. ExtendVote.
func NewProviderAggregator ¶
func NewProviderAggregator() *ProviderAggregator
func (*ProviderAggregator) SetProviderTickerPricesAndCandles ¶
func (p *ProviderAggregator) SetProviderTickerPricesAndCandles( providerName string, prices map[string]keeper.TickerPrice, pair keeper.CurrencyPair, ) bool
type StakeWeightedPrices ¶
type StakeWeightedPrices struct { StakeWeightedPrices map[string]math.LegacyDec ExtendedCommitInfo abci.ExtendedCommitInfo }
StakeWeightedPrices defines the structure a proposer should use to calculate and submit the stake-weighted prices for a given set of supported currency pairs, in addition to the vote extensions used to calculate them. This is so validators can verify the proposer's calculations.
type VoteExtHandler ¶
func NewVoteExtHandler ¶
func (*VoteExtHandler) ExtendVoteHandler ¶
func (h *VoteExtHandler) ExtendVoteHandler() sdk.ExtendVoteHandler
func (*VoteExtHandler) VerifyVoteExtensionHandler ¶
func (h *VoteExtHandler) VerifyVoteExtensionHandler() sdk.VerifyVoteExtensionHandler