eventsdb

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentDB added in v0.5.1

func GetCurrentDB() *db.GoLevelDB

func RegisterAminoEvents

func RegisterAminoEvents(codec *amino.Codec)

Types

type CoinLiquidationEvent added in v0.15.0

type CoinLiquidationEvent struct {
	Coin types.CoinSymbol
}

func (CoinLiquidationEvent) MarshalJSON added in v0.15.0

func (e CoinLiquidationEvent) MarshalJSON() ([]byte, error)

type Event

type Event interface{}

type Events

type Events []Event

type EventsDB

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

func GetCurrent

func GetCurrent() *EventsDB

func NewEventsDB

func NewEventsDB(db *db.GoLevelDB) *EventsDB

func (*EventsDB) AddEvent added in v0.3.4

func (db *EventsDB) AddEvent(height uint64, event Event)

func (*EventsDB) FlushEvents added in v0.3.4

func (db *EventsDB) FlushEvents() error

func (*EventsDB) LoadEvents added in v0.5.0

func (db *EventsDB) LoadEvents(height uint64) Events

type RewardEvent

type RewardEvent struct {
	Role            Role
	Address         types.Address
	Amount          []byte
	ValidatorPubKey types.Pubkey
}

func (RewardEvent) MarshalJSON

func (e RewardEvent) MarshalJSON() ([]byte, error)

type Role

type Role byte
const (
	RoleValidator Role = iota
	RoleDelegator
	RoleDAO
	RoleDevelopers
)

func (Role) String added in v0.9.0

func (r Role) String() string

type SlashEvent

type SlashEvent struct {
	Address         types.Address
	Amount          []byte
	Coin            types.CoinSymbol
	ValidatorPubKey types.Pubkey
}

func (SlashEvent) MarshalJSON

func (e SlashEvent) MarshalJSON() ([]byte, error)

type UnbondEvent added in v0.8.0

type UnbondEvent struct {
	Address         types.Address
	Amount          []byte
	Coin            types.CoinSymbol
	ValidatorPubKey types.Pubkey
}

func (UnbondEvent) MarshalJSON added in v0.8.0

func (e UnbondEvent) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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