app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2019 License: Apache-2.0 Imports: 31 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultKeyPass = "1234567890"
)

Variables

View Source
var (
	DefaultCLIHome  = os.ExpandEnv("$HOME/.sentinel-hubcli")
	DefaultNodeHome = os.ExpandEnv("$HOME/.sentinel-hubd")
)

nolint:gochecknoglobals

Functions

func CollectStdTxs

func CollectStdTxs(cdc *codec.Codec, moniker string, genTxsDir string,
	genDoc tm.GenesisDoc) (appGenTxs []auth.StdTx, persistentPeers string, err error)

nolint:gocyclo

func MakeCodec

func MakeCodec() *codec.Codec

func ValidateGenesisState

func ValidateGenesisState(state GenesisState) error

nolint:gocyclo

Types

type GenesisAccount

type GenesisAccount struct {
	Address          sdk.AccAddress `json:"address"`
	Coins            sdk.Coins      `json:"coins"`
	Sequence         uint64         `json:"sequence_number"`
	AccountNumber    uint64         `json:"account_number"`
	OriginalVesting  sdk.Coins      `json:"original_vesting"`
	DelegatedFree    sdk.Coins      `json:"delegated_free"`
	DelegatedVesting sdk.Coins      `json:"delegated_vesting"`
	StartTime        int64          `json:"start_time"`
	EndTime          int64          `json:"end_time"`
}

func NewGenesisAccount

func NewGenesisAccount(acc auth.Account) GenesisAccount

func NewGenesisAccountFromBaseAccount

func NewGenesisAccountFromBaseAccount(acc *auth.BaseAccount) GenesisAccount

func (*GenesisAccount) ToAccount

func (ga *GenesisAccount) ToAccount() auth.Account

type GenesisState

type GenesisState struct {
	Accounts     []GenesisAccount          `json:"accounts"`
	Auth         auth.GenesisState         `json:"auth"`
	Bank         bank.GenesisState         `json:"bank"`
	Staking      staking.GenesisState      `json:"staking"`
	Mint         mint.GenesisState         `json:"mint"`
	Distribution distribution.GenesisState `json:"distribution"`
	Gov          gov.GenesisState          `json:"gov"`
	Crisis       crisis.GenesisState       `json:"crisis"`
	Slashing     slashing.GenesisState     `json:"slashing"`
	Deposit      deposit.GenesisState      `json:"deposit"`
	VPN          vpn.GenesisState          `json:"vpn"`
	GenTxs       []json.RawMessage         `json:"gen_txs"`
}

func NewDefaultGenesisState

func NewDefaultGenesisState() GenesisState

func NewGenesisState

func NewGenesisState(accounts []GenesisAccount, _auth auth.GenesisState, _bank bank.GenesisState,
	_staking staking.GenesisState, _mint mint.GenesisState, _distribution distribution.GenesisState,
	_gov gov.GenesisState, _crisis crisis.GenesisState, _slashing slashing.GenesisState,
	_deposit deposit.GenesisState, _vpn vpn.GenesisState) GenesisState

func NewGenesisStateFromGenesisDoc

func NewGenesisStateFromGenesisDoc(cdc *codec.Codec, genesisDoc tm.GenesisDoc,
	genTxs []json.RawMessage) (state GenesisState, err error)

func (GenesisState) Sanitize

func (gs GenesisState) Sanitize()

type HubApp

type HubApp struct {
	*baseapp.BaseApp
	// contains filtered or unexported fields
}

func NewHubApp

func NewHubApp(logger log.Logger, db tmDB.DB, traceStore io.Writer, loadLatest bool, invCheckPeriod uint,
	baseAppOptions ...func(*baseapp.BaseApp)) *HubApp

func (*HubApp) BeginBlocker

func (app *HubApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

func (*HubApp) EndBlocker

func (app *HubApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

func (*HubApp) ExportAppStateAndValidators

func (app *HubApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) (
	appState json.RawMessage, validators []tm.GenesisValidator, err error)

func (*HubApp) LoadHeight

func (app *HubApp) LoadHeight(height int64) error

type StakingHooks

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

func NewStakingHooks

func NewStakingHooks(dh distribution.Hooks, sh slashing.Hooks) StakingHooks

func (StakingHooks) AfterDelegationModified

func (h StakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)

func (StakingHooks) AfterValidatorBeginUnbonding

func (h StakingHooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)

nolint: lll

func (StakingHooks) AfterValidatorBonded

func (h StakingHooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)

func (StakingHooks) AfterValidatorCreated

func (h StakingHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress)

func (StakingHooks) AfterValidatorRemoved

func (h StakingHooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)

func (StakingHooks) BeforeDelegationCreated

func (h StakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)

func (StakingHooks) BeforeDelegationRemoved

func (h StakingHooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)

func (StakingHooks) BeforeDelegationSharesModified

func (h StakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)

nolint: lll

func (StakingHooks) BeforeValidatorModified

func (h StakingHooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress)

func (StakingHooks) BeforeValidatorSlashed

func (h StakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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