distribution

package
v0.0.0-...-b9e5fcc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BankModule

type BankModule interface {
	RefreshBalances(height int64, addresses []string) error
}

BankModule represents the bank module we expect

type Config

type Config struct {
	RewardsFrequency int64 `yaml:"rewards_frequency,omitempty"`
}

Config contains the configuration about distribution frequency

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration

func NewConfig

func NewConfig(frequency int64) *Config

NewConfig returns a new Config instance

func ParseConfig

func ParseConfig(bz []byte) (*Config, error)

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module represents the x/distr module

func NewModule

func NewModule(cfg config.Config, source distrsource.Source, bankModule BankModule, cdc codec.Marshaler, db *database.Db) *Module

NewModule returns a new Module instance

func (*Module) HandleBlock

HandleBlock implements modules.BlockModule

func (*Module) HandleGenesis

func (m *Module) HandleGenesis(doc *tmtypes.GenesisDoc, appState map[string]json.RawMessage) error

HandleGenesis implements modules.Module

func (*Module) HandleMsg

func (m *Module) HandleMsg(_ int, msg sdk.Msg, tx *juno.Tx) error

HandleMsg implements modules.MessageModule

func (*Module) Name

func (m *Module) Name() string

Name implements modules.Module

func (*Module) RefreshDelegatorRewards

func (m *Module) RefreshDelegatorRewards(height int64, delegator string) error

RefreshDelegatorRewards refreshes the rewards associated to the given delegator for the given height, deleting the ones existing and downloading them from scratch.

func (*Module) RegisterPeriodicOperations

func (m *Module) RegisterPeriodicOperations(scheduler *gocron.Scheduler) error

RegisterPeriodicOperations implements modules.PeriodicOperationsModule

func (*Module) RunAdditionalOperations

func (m *Module) RunAdditionalOperations() error

RunAdditionalOperations implements modules.AdditionalOperationsModule

func (*Module) UpdateParams

func (m *Module) UpdateParams(height int64) error

UpdateParams gets the updated params and stores them inside the database

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL