eventsdb

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAminoEvents

func RegisterAminoEvents(codec *amino.Codec)

Types

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 *mintdb.LDBDatabase) *EventsDB

func (*EventsDB) GetEvents

func (db *EventsDB) GetEvents(height int64) Events

func (*EventsDB) SaveEvent

func (db *EventsDB) SaveEvent(height int64, event Event) error

func (*EventsDB) SaveEvents

func (db *EventsDB) SaveEvents(height int64, events Events) error

type RewardEvent

type RewardEvent struct {
	Role            Role
	Address         types.Address
	Amount          string
	ValidatorPubKey types.Pubkey
}

func (RewardEvent) MarshalJSON

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

type Role

type Role string
var (
	RoleValidator  Role = "Validator"
	RoleDelegator  Role = "Delegator"
	RoleDAO        Role = "DAO"
	RoleDevelopers Role = "Developers"
)

type SlashEvent

type SlashEvent struct {
	Address         types.Address
	Amount          string
	Coin            types.CoinSymbol
	ValidatorPubKey types.Pubkey
}

func (SlashEvent) MarshalJSON

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

Jump to

Keyboard shortcuts

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