compact_db

package module
v0.1.1-0...-b041121 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: MIT Imports: 7 Imported by: 0

README

events-db

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 IEventsDB

type IEventsDB interface {
	AddEvent(height uint32, event Event)
	LoadEvents(height uint32) Events
	CommitEvents() error
}

func NewEventsStore

func NewEventsStore(db db.DB) IEventsDB

type RewardEvent

type RewardEvent struct {
	Role            string        `json:"role"`
	Address         types.Address `json:"address"`
	Amount          string        `json:"amount"`
	ValidatorPubKey types.Pubkey  `json:"validator_pub_key"`
}

type Role

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

func NewRole

func NewRole(r string) Role

func (Role) String

func (r Role) String() string

type SlashEvent

type SlashEvent struct {
	Address         types.Address    `json:"address"`
	Amount          string           `json:"amount"`
	Coin            types.CoinSymbol `json:"coin"`
	ValidatorPubKey types.Pubkey     `json:"validator_pub_key"`
}

type UnbondEvent

type UnbondEvent struct {
	Address         types.Address    `json:"address"`
	Amount          string           `json:"amount"`
	Coin            types.CoinSymbol `json:"coin"`
	ValidatorPubKey types.Pubkey     `json:"validator_pub_key"`
}

Jump to

Keyboard shortcuts

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