Documentation ¶
Index ¶
- type IterateExchangeRateVote
- type IterateFeederDelegationHandler
- type Keeper
- func (k Keeper) ClearTobinTaxes(ctx sdk.Context)
- func (k Keeper) DeleteAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress)
- func (k Keeper) DeleteAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddress)
- func (k Keeper) DeleteExchangeRate(ctx sdk.Context, denom string)
- func (k Keeper) DeleteMissCounter(ctx sdk.Context, operator sdk.ValAddress)
- func (k Keeper) GetAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress) (types.AggregateExchangeRatePrevote, error)
- func (k Keeper) GetAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddress) (types.AggregateExchangeRateVote, error)
- func (k Keeper) GetExchangeRate(ctx sdk.Context, denom string) (sdk.Dec, error)
- func (k Keeper) GetFeederDelegation(ctx sdk.Context, operator sdk.ValAddress) sdk.AccAddress
- func (k Keeper) GetMissCounter(ctx sdk.Context, operator sdk.ValAddress) uint64
- func (k Keeper) GetTobinTax(ctx sdk.Context, denom string) (sdk.Dec, error)
- func (k Keeper) IterateAggregateExchangeRatePrevotes(ctx sdk.Context, ...)
- func (k Keeper) IterateAggregateExchangeRateVotes(ctx sdk.Context, handler IterateExchangeRateVote)
- func (k Keeper) IterateExchangeRates(ctx sdk.Context, handler func(denom string, exchangeRate sdk.Dec) (stop bool))
- func (k Keeper) IterateFeederDelegations(ctx sdk.Context, handler IterateFeederDelegationHandler)
- func (k Keeper) IterateMissCounters(ctx sdk.Context, ...)
- func (k Keeper) IterateTobinTaxes(ctx sdk.Context, handler func(denom string, tobinTax sdk.Dec) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress, ...)
- func (k Keeper) SetAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddress, vote types.AggregateExchangeRateVote)
- func (k Keeper) SetExchangeRate(ctx sdk.Context, denom string, exchangeRate sdk.Dec)
- func (k Keeper) SetFeederDelegation(ctx sdk.Context, operator sdk.ValAddress, delegatedFeeder sdk.AccAddress)
- func (k Keeper) SetMissCounter(ctx sdk.Context, operator sdk.ValAddress, missCounter uint64)
- func (k Keeper) SetTobinTax(ctx sdk.Context, denom string, tobinTax sdk.Dec)
- func (k Keeper) ValidateFeeder(ctx sdk.Context, feederAddr sdk.AccAddress, validatorAddr sdk.ValAddress) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IterateExchangeRateVote ¶
type IterateExchangeRateVote = func(voterAddr sdk.ValAddress, aggregateVote types.AggregateExchangeRateVote) (stop bool)
type IterateFeederDelegationHandler ¶
type IterateFeederDelegationHandler = func(delegator sdk.ValAddress, delegate sdk.AccAddress) (stop bool)
type Keeper ¶
type Keeper struct { StakingKeeper types.StakingKeeper // contains filtered or unexported fields }
Keeper of the oracle store
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramspace paramstypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistributionKeeper, stakingKeeper types.StakingKeeper, distrName string, ) Keeper
NewKeeper constructs a new keeper for oracle
func (Keeper) ClearTobinTaxes ¶
ClearTobinTaxes clears tobin taxes.
func (Keeper) DeleteAggregateExchangeRatePrevote ¶
func (k Keeper) DeleteAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress)
DeleteAggregateExchangeRatePrevote deletes an oracle prevote from the store
func (Keeper) DeleteAggregateExchangeRateVote ¶
func (k Keeper) DeleteAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddress)
DeleteAggregateExchangeRateVote deletes an oracle prevote from the store
func (Keeper) DeleteExchangeRate ¶
DeleteExchangeRate deletes the consensus exchange rate of USD denominated in the denom asset from the store.
func (Keeper) DeleteMissCounter ¶
func (k Keeper) DeleteMissCounter(ctx sdk.Context, operator sdk.ValAddress)
DeleteMissCounter removes miss counter for the validator
func (Keeper) GetAggregateExchangeRatePrevote ¶
func (k Keeper) GetAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress) (types.AggregateExchangeRatePrevote, error)
GetAggregateExchangeRatePrevote retrieves an oracle prevote from the store
func (Keeper) GetAggregateExchangeRateVote ¶
func (k Keeper) GetAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddress) (types.AggregateExchangeRateVote, error)
GetAggregateExchangeRateVote retrieves an oracle prevote from the store
func (Keeper) GetExchangeRate ¶
GetExchangeRate gets the consensus exchange rate of USD denominated in the denom asset from the store.
func (Keeper) GetFeederDelegation ¶
func (k Keeper) GetFeederDelegation(ctx sdk.Context, operator sdk.ValAddress) sdk.AccAddress
GetFeederDelegation gets the account address that the validator operator delegated oracle vote rights to.
func (Keeper) GetMissCounter ¶
GetMissCounter retrieves the # of vote periods missed in this oracle slash window
func (Keeper) GetTobinTax ¶
GetTobinTax return tobin tax for the denom
func (Keeper) IterateAggregateExchangeRatePrevotes ¶
func (k Keeper) IterateAggregateExchangeRatePrevotes(ctx sdk.Context, handler func(voterAddr sdk.ValAddress, aggregatePrevote types.AggregateExchangeRatePrevote) (stop bool))
IterateAggregateExchangeRatePrevotes iterates rate over prevotes in the store
func (Keeper) IterateAggregateExchangeRateVotes ¶
func (k Keeper) IterateAggregateExchangeRateVotes(ctx sdk.Context, handler IterateExchangeRateVote)
IterateAggregateExchangeRateVotes iterates rate over prevotes in the store
func (Keeper) IterateExchangeRates ¶
func (k Keeper) IterateExchangeRates(ctx sdk.Context, handler func(denom string, exchangeRate sdk.Dec) (stop bool))
IterateExchangeRates iterates over USD rates in the store.
func (Keeper) IterateFeederDelegations ¶
func (k Keeper) IterateFeederDelegations( ctx sdk.Context, handler IterateFeederDelegationHandler, )
IterateFeederDelegations iterates over the feed delegates and performs a callback function.
func (Keeper) IterateMissCounters ¶
func (k Keeper) IterateMissCounters(ctx sdk.Context, handler func(operator sdk.ValAddress, missCounter uint64) (stop bool))
IterateMissCounters iterates over the miss counters and performs a callback function.
func (Keeper) IterateTobinTaxes ¶
func (k Keeper) IterateTobinTaxes(ctx sdk.Context, handler func(denom string, tobinTax sdk.Dec) (stop bool))
IterateTobinTaxes iterates rate over tobin taxes in the store.
func (Keeper) SetAggregateExchangeRatePrevote ¶
func (k Keeper) SetAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress, prevote types.AggregateExchangeRatePrevote)
SetAggregateExchangeRatePrevote set an oracle aggregate prevote to the store
func (Keeper) SetAggregateExchangeRateVote ¶
func (k Keeper) SetAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddress, vote types.AggregateExchangeRateVote)
SetAggregateExchangeRateVote adds an oracle aggregate prevote to the store
func (Keeper) SetExchangeRate ¶
SetExchangeRate sets the consensus exchange rate of USD denominated in the denom asset to the store.
func (Keeper) SetFeederDelegation ¶
func (k Keeper) SetFeederDelegation(ctx sdk.Context, operator sdk.ValAddress, delegatedFeeder sdk.AccAddress)
SetFeederDelegation sets the account address that the validator operator delegated oracle vote rights to.
func (Keeper) SetMissCounter ¶
SetMissCounter updates the # of vote periods missed in this oracle slash window
func (Keeper) SetTobinTax ¶
SetTobinTax updates tobin tax for the denom
func (Keeper) ValidateFeeder ¶
func (k Keeper) ValidateFeeder(ctx sdk.Context, feederAddr sdk.AccAddress, validatorAddr sdk.ValAddress) error
ValidateFeeder returns the given feeder is allowed to feed the message or not.