bus

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounts

type Accounts interface {
	DeleteCoin(types.Address, types.CoinSymbol)
	AddBalance(types.Address, types.CoinSymbol, *big.Int)
}

type App

type App interface {
	AddTotalSlashed(*big.Int)
}

type Bus

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

func NewBus

func NewBus() *Bus

func (*Bus) Accounts

func (b *Bus) Accounts() Accounts

func (*Bus) App

func (b *Bus) App() App

func (*Bus) Candidates

func (b *Bus) Candidates() Candidates

func (*Bus) Checker

func (b *Bus) Checker() Checker

func (*Bus) Coins

func (b *Bus) Coins() Coins

func (*Bus) Events

func (b *Bus) Events() eventsdb.IEventsDB

func (*Bus) FrozenFunds

func (b *Bus) FrozenFunds() FrozenFunds

func (*Bus) SetAccounts

func (b *Bus) SetAccounts(accounts Accounts)

func (*Bus) SetApp

func (b *Bus) SetApp(app App)

func (*Bus) SetCandidates

func (b *Bus) SetCandidates(candidates Candidates)

func (*Bus) SetChecker

func (b *Bus) SetChecker(checker Checker)

func (*Bus) SetCoins

func (b *Bus) SetCoins(coins Coins)

func (*Bus) SetEvents

func (b *Bus) SetEvents(events eventsdb.IEventsDB)

func (*Bus) SetFrozenFunds

func (b *Bus) SetFrozenFunds(frozenfunds FrozenFunds)

type Candidate

type Candidate struct {
	PubKey        types.Pubkey
	RewardAddress types.Address
	OwnerAddress  types.Address
	Commission    uint
	Status        byte
}

type Candidates

type Candidates interface {
	GetStakes(types.Pubkey) []Stake
	Punish(uint64, types.TmAddress) *big.Int
	GetCandidate(types.Pubkey) *Candidate
	SetOffline(types.Pubkey)
	GetCandidateByTendermintAddress(types.TmAddress) *Candidate
}

type Checker

type Checker interface {
	AddCoin(types.CoinSymbol, *big.Int, ...string)
	AddCoinVolume(types.CoinSymbol, *big.Int)
}

type Coin

type Coin struct {
	Name    string
	Crr     uint
	Symbol  types.CoinSymbol
	Volume  *big.Int
	Reserve *big.Int
}

type Coins

type Coins interface {
	GetCoin(types.CoinSymbol) *Coin
	SubCoinVolume(types.CoinSymbol, *big.Int)
	SubCoinReserve(types.CoinSymbol, *big.Int)
}

type FrozenFunds

type FrozenFunds interface {
	AddFrozenFund(uint64, types.Address, types.Pubkey, types.CoinSymbol, *big.Int)
}

type Stake

type Stake struct {
	Owner    types.Address
	Value    *big.Int
	Coin     types.CoinSymbol
	BipValue *big.Int
}

Jump to

Keyboard shortcuts

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