executionlayer

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName      = types.ModuleName
	RouterKey       = types.RouterKey
	HashMapStoreKey = types.HashMapStoreKey
)
View Source
const (
	QueryEEDetail        = "querydetail"
	QueryEEBalanceDetail = "querybalancedetail"
	QueryStakeDetail     = "querystakedetail"
	QueryVoteDetail      = "queryvotedetail"

	QueryValidator    = "queryvalidator"
	QueryAllValidator = "queryallvalidator"

	QueryDelegator = "querydelegator"
	QueryVoter     = "queryvoter"

	QueryReward     = "queryreward"
	QueryCommission = "querycommission"
)

Variables

View Source
var (
	// function aliases
	NewMsgExecute  = types.NewMsgExecute
	NewMsgTransfer = types.NewMsgTransfer
	NewMsgBond     = types.NewMsgBond
	NewMsgUnBond   = types.NewMsgUnBond
	RegisterCodec  = types.RegisterCodec
	NewUnitHashMap = types.NewUnitHashMap

	// variable aliases
	ModuleCdc               = types.ModuleCdc
	ValidatorKey            = types.ValidatorKey
	ValidatorsByConsAddrKey = types.ValidatorsByConsAddrKey

	// error
	ErrValidatorOwnerExists            = types.ErrValidatorOwnerExists
	ErrValidatorPubKeyExists           = types.ErrValidatorPubKeyExists
	ErrValidatorPubKeyTypeNotSupported = types.ErrValidatorPubKeyTypeNotSupported
)
View Source
var (
	ContractAddress            = "friday15evpva2u57vv6l5czehyk1111111111111"
	GenesisAccountAddress, _   = sdk.AccAddressFromBech32("friday15evpva2u57vv6l5czehyk69s0wnq9hrkqulwfz")
	RecipientAccountAddress, _ = sdk.AccAddressFromBech32("friday1y2dx0evs5k6hxuhfrfdmm7wcwsrqr073htghpv")
)

Functions

func BeginBlocker

func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, elk ExecutionLayerKeeper)

func DeployArgsToJsonString added in v0.6.0

func DeployArgsToJsonString(args []*consensus.Deploy_Arg) (string, error)

func EndBlocker added in v0.6.0

func ExportGenesis

func ExportGenesis(ctx sdk.Context, keeper ExecutionLayerKeeper) types.GenesisState

func InitGenesis

func InitGenesis(
	ctx sdk.Context, keeper ExecutionLayerKeeper, data types.GenesisState) (res []abci.ValidatorUpdate)

InitGenesis sets an executionlayer configuration for genesis.

func NewHandler

func NewHandler(k ExecutionLayerKeeper) sdk.Handler

NewHandler returns a handler for "executionlayer" type messages.

func NewQuerier

func NewQuerier(keeper ExecutionLayerKeeper) sdk.Querier

NewQuerier is the module level router for state queries

func ReplaceFromBech32ToHex added in v0.11.0

func ReplaceFromBech32ToHex(valueStr string) (string, []sdk.AccAddress, error)

func WriteValidators added in v0.11.0

func WriteValidators(ctx sdk.Context, keeper ExecutionLayerKeeper) (vals []tmtypes.GenesisValidator)

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

___________________________ app module object

func NewAppModule

func NewAppModule(executionLayerKeeper ExecutionLayerKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)

module begin-block

func (AppModule) EndBlock

func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate

module end-block

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

module export genesis

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

module init-genesis

func (AppModule) Name

func (AppModule) Name() string

module name

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

module handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler constructs the query router

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute works to route query to this module (revised)

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

register invariants

func (AppModule) Route

func (AppModule) Route() string

Route works to route msg to this module (revised)

type AppModuleBasic

type AppModuleBasic struct{}

app module basics object

func (AppModuleBasic) BuildCreateValidatorMsg added in v0.3.0

func (AppModuleBasic) BuildCreateValidatorMsg(cliCtx context.CLIContext) (sdk.Msg, error)

BuildCreateValidatorMsg - used for gen-tx

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

default genesis state

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

get the root query command of this module

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

get the root tx command of this module

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

module name

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

register module codec

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)

register rest routes

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

module validate genesis

type ExecutionLayerKeeper

type ExecutionLayerKeeper struct {
	HashMapStoreKey sdk.StoreKey

	AccountKeeper  auth.AccountKeeper
	NicknameKeeper nickname.NicknameKeeper
	// contains filtered or unexported fields
}

func NewExecutionLayerKeeper

func NewExecutionLayerKeeper(
	cdc *codec.Codec, hashMapStoreKey sdk.StoreKey, path string,
	accountKeeper auth.AccountKeeper,
	nicknameKeeper nickname.NicknameKeeper) ExecutionLayerKeeper

func (ExecutionLayerKeeper) GetAllValidators added in v0.3.0

func (k ExecutionLayerKeeper) GetAllValidators(ctx sdk.Context) (validators []types.Validator)

func (ExecutionLayerKeeper) GetChainName added in v0.3.0

func (k ExecutionLayerKeeper) GetChainName(ctx sdk.Context) string

GetChainName retrieves ChainName in sdk store

func (ExecutionLayerKeeper) GetGenesisAccounts added in v0.2.0

func (k ExecutionLayerKeeper) GetGenesisAccounts(ctx sdk.Context) []types.Account

GetGenesisAccounts retrieves GenesisAccounts in sdk store

func (ExecutionLayerKeeper) GetGenesisConf

func (k ExecutionLayerKeeper) GetGenesisConf(ctx sdk.Context) types.GenesisConf

GetGenesisConf retrieves GenesisConf from sdk store

func (ExecutionLayerKeeper) GetProtocolVersion added in v0.11.0

func (k ExecutionLayerKeeper) GetProtocolVersion(ctx sdk.Context) state.ProtocolVersion

----------------------------------------------------------------------------------------------------------- GetProtocolVersion retrieves protocol version

func (ExecutionLayerKeeper) GetProxyContractHash added in v0.6.0

func (k ExecutionLayerKeeper) GetProxyContractHash(ctx sdk.Context) []byte

GetProxyContractHash retrieves proxy_contract_hash

func (ExecutionLayerKeeper) GetUnitHashMap

func (k ExecutionLayerKeeper) GetUnitHashMap(ctx sdk.Context, height int64) UnitHashMap

GetUnitHashMap returns a UnitHashMap for blockHash

func (ExecutionLayerKeeper) GetValidator added in v0.3.0

func (k ExecutionLayerKeeper) GetValidator(ctx sdk.Context, accAddress sdk.AccAddress) (validator types.Validator, found bool)

func (ExecutionLayerKeeper) GetValidatorByConsAddr added in v0.11.0

func (k ExecutionLayerKeeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator types.Validator, found bool)

func (ExecutionLayerKeeper) GetValidatorConsPubKey added in v0.3.0

func (k ExecutionLayerKeeper) GetValidatorConsPubKey(ctx sdk.Context, accAddress sdk.AccAddress) crypto.PubKey

func (ExecutionLayerKeeper) GetValidatorDescription added in v0.3.0

func (k ExecutionLayerKeeper) GetValidatorDescription(ctx sdk.Context, accAddress sdk.AccAddress) types.Description

func (ExecutionLayerKeeper) GetValidatorStake added in v0.3.0

func (k ExecutionLayerKeeper) GetValidatorStake(ctx sdk.Context, accAddress sdk.AccAddress) string

func (ExecutionLayerKeeper) SetAccountIfNotExists added in v0.3.0

func (k ExecutionLayerKeeper) SetAccountIfNotExists(ctx sdk.Context, addr sdk.AccAddress)

SetAccountIfNotExists runs if network has no given account

func (ExecutionLayerKeeper) SetChainName added in v0.3.0

func (k ExecutionLayerKeeper) SetChainName(ctx sdk.Context, chainName string)

SetChainName saves ChainName in sdk store

func (ExecutionLayerKeeper) SetGenesisAccounts added in v0.2.0

func (k ExecutionLayerKeeper) SetGenesisAccounts(ctx sdk.Context, accounts []types.Account)

SetGenesisAccounts saves GenesisAccounts in sdk store

func (ExecutionLayerKeeper) SetGenesisConf

func (k ExecutionLayerKeeper) SetGenesisConf(ctx sdk.Context, genesisConf types.GenesisConf)

SetGenesisConf saves GenesisConf in sdk store

func (ExecutionLayerKeeper) SetProtocolVersion added in v0.11.0

func (k ExecutionLayerKeeper) SetProtocolVersion(ctx sdk.Context, protocolVersion state.ProtocolVersion)

SetProtocolVersion save protocol version.

func (ExecutionLayerKeeper) SetProxyContractHash added in v0.6.0

func (k ExecutionLayerKeeper) SetProxyContractHash(ctx sdk.Context, contractHash []byte)

SetProxyContractHash save proxy_contract_hash value.

func (ExecutionLayerKeeper) SetUnitHashMap

func (k ExecutionLayerKeeper) SetUnitHashMap(ctx sdk.Context, unitHash UnitHashMap) bool

SetUnitHashMap map unitHash to blockHash

func (ExecutionLayerKeeper) SetValidator added in v0.3.0

func (k ExecutionLayerKeeper) SetValidator(ctx sdk.Context, accAddress sdk.AccAddress, validator types.Validator)

func (ExecutionLayerKeeper) SetValidatorByConsAddr added in v0.11.0

func (k ExecutionLayerKeeper) SetValidatorByConsAddr(ctx sdk.Context, validator types.Validator)

func (ExecutionLayerKeeper) SetValidatorConsPubKey added in v0.3.0

func (k ExecutionLayerKeeper) SetValidatorConsPubKey(ctx sdk.Context, accAddress sdk.AccAddress, pubKey crypto.PubKey)

func (ExecutionLayerKeeper) SetValidatorDescription added in v0.3.0

func (k ExecutionLayerKeeper) SetValidatorDescription(ctx sdk.Context, accAddress sdk.AccAddress, description types.Description)

func (ExecutionLayerKeeper) SetValidatorStake added in v0.3.0

func (k ExecutionLayerKeeper) SetValidatorStake(ctx sdk.Context, accAddress sdk.AccAddress, stake string)

type MsgBond added in v0.3.0

type MsgBond = types.MsgBond

type MsgCreateValidator added in v0.3.0

type MsgCreateValidator = types.MsgCreateValidator

type MsgEditValidator added in v0.5.0

type MsgEditValidator = types.MsgEditValidator

type MsgExecute

type MsgExecute = types.MsgExecute

type MsgUnBond added in v0.3.0

type MsgUnBond = types.MsgUnBond

type QueryDelegatorParams added in v0.8.0

type QueryDelegatorParams = types.QueryDelegatorParams

type QueryExecutionLayerDetail

type QueryExecutionLayerDetail = types.QueryExecutionLayerDetail

type QueryGetBalanceDetail

type QueryGetBalanceDetail = types.QueryGetBalanceDetail

type QueryGetStakeDetail added in v0.11.0

type QueryGetStakeDetail = types.QueryGetStakeDetail

type QueryGetVoteDetail added in v0.11.0

type QueryGetVoteDetail = types.QueryGetVoteDetail

type QueryValidatorParams added in v0.5.0

type QueryValidatorParams = types.QueryValidatorParams

type QueryVoterParams added in v0.8.0

type QueryVoterParams = types.QueryVoterParams

type QueryVoterParamsHash added in v0.9.0

type QueryVoterParamsHash = types.QueryVoterParamsHash

type QueryVoterParamsUref added in v0.9.0

type QueryVoterParamsUref = types.QueryVoterParamsUref

type UnitHashMap

type UnitHashMap = types.UnitHashMap

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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