Documentation ¶
Index ¶
- Constants
- Variables
- func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, elk ExecutionLayerKeeper)
- func EndBloker(ctx sdk.Context, k ExecutionLayerKeeper) []abci.ValidatorUpdate
- func ExportGenesis(ctx sdk.Context, keeper ExecutionLayerKeeper) types.GenesisState
- func InitGenesis(ctx sdk.Context, keeper ExecutionLayerKeeper, data types.GenesisState)
- func NewHandler(k ExecutionLayerKeeper) sdk.Handler
- func NewQuerier(keeper ExecutionLayerKeeper) sdk.Querier
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
- func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
- func (AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) BuildCreateValidatorMsg(cliCtx context.CLIContext) (sdk.Msg, error)
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type CandidateBlock
- type ExecutionLayerKeeper
- func (k ExecutionLayerKeeper) Execute(ctx sdk.Context, blockHash []byte, execAccount sdk.AccAddress, ...) error
- func (k ExecutionLayerKeeper) GetAllValidators(ctx sdk.Context) (validators []types.Validator)
- func (k ExecutionLayerKeeper) GetCandidateBlock(ctx sdk.Context) types.CandidateBlock
- func (k ExecutionLayerKeeper) GetCandidateBlockBond(ctx sdk.Context) []*ipc.Bond
- func (k ExecutionLayerKeeper) GetCandidateBlockHash(ctx sdk.Context) []byte
- func (k ExecutionLayerKeeper) GetChainName(ctx sdk.Context) string
- func (k ExecutionLayerKeeper) GetEEState(ctx sdk.Context, blockHash []byte) []byte
- func (k ExecutionLayerKeeper) GetGenesisAccounts(ctx sdk.Context) []types.Account
- func (k ExecutionLayerKeeper) GetGenesisConf(ctx sdk.Context) types.GenesisConf
- func (k ExecutionLayerKeeper) GetQueryBalanceResult(ctx sdk.Context, blockhash []byte, address types.PublicKey) (string, error)
- func (k ExecutionLayerKeeper) GetQueryBalanceResultSimple(ctx sdk.Context, address types.PublicKey) (string, error)
- func (k ExecutionLayerKeeper) GetQueryResult(ctx sdk.Context, blockhash []byte, keyType string, keyData string, path string) (state.Value, error)
- func (k ExecutionLayerKeeper) GetQueryResultSimple(ctx sdk.Context, keyType string, keyData string, path string) (state.Value, error)
- func (k ExecutionLayerKeeper) GetUnitHashMap(ctx sdk.Context, blockHash []byte) UnitHashMap
- func (k ExecutionLayerKeeper) GetValidator(ctx sdk.Context, accAddress []byte) (validator types.Validator, found bool)
- func (k ExecutionLayerKeeper) GetValidatorConsPubKey(ctx sdk.Context, accAddress []byte) crypto.PubKey
- func (k ExecutionLayerKeeper) GetValidatorDescription(ctx sdk.Context, accAddress []byte) types.Description
- func (k ExecutionLayerKeeper) GetValidatorOperatorAddress(ctx sdk.Context, accAddress []byte) sdk.ValAddress
- func (k ExecutionLayerKeeper) GetValidatorStake(ctx sdk.Context, accAddress []byte) string
- func (k ExecutionLayerKeeper) MustGetProtocolVersion(ctx sdk.Context) state.ProtocolVersion
- func (k ExecutionLayerKeeper) SetAccountIfNotExists(ctx sdk.Context, account sdk.AccAddress)
- func (k ExecutionLayerKeeper) SetCandidateBlock(ctx sdk.Context, candidateBlock types.CandidateBlock)
- func (k ExecutionLayerKeeper) SetCandidateBlockBond(ctx sdk.Context, bonds []*ipc.Bond)
- func (k ExecutionLayerKeeper) SetCandidateBlockHash(ctx sdk.Context, blockHash []byte)
- func (k ExecutionLayerKeeper) SetChainName(ctx sdk.Context, chainName string)
- func (k ExecutionLayerKeeper) SetEEState(ctx sdk.Context, blockHash []byte, eeState []byte) bool
- func (k ExecutionLayerKeeper) SetGenesisAccounts(ctx sdk.Context, accounts []types.Account)
- func (k ExecutionLayerKeeper) SetGenesisConf(ctx sdk.Context, genesisConf types.GenesisConf)
- func (k ExecutionLayerKeeper) SetUnitHashMap(ctx sdk.Context, blockHash []byte, unitHash UnitHashMap) bool
- func (k ExecutionLayerKeeper) SetValidator(ctx sdk.Context, accAddress []byte, validator types.Validator)
- func (k ExecutionLayerKeeper) SetValidatorConsPubKey(ctx sdk.Context, accAddress []byte, pubKey crypto.PubKey)
- func (k ExecutionLayerKeeper) SetValidatorDescription(ctx sdk.Context, accAddress []byte, description types.Description)
- func (k ExecutionLayerKeeper) SetValidatorOperatorAddress(ctx sdk.Context, accAddress []byte, valAddress sdk.ValAddress)
- func (k ExecutionLayerKeeper) SetValidatorStake(ctx sdk.Context, accAddress []byte, stake string)
- func (k ExecutionLayerKeeper) Transfer(ctx sdk.Context, tokenOwnerAccount, fromAddress, toAddress sdk.AccAddress, ...) error
- type MsgBond
- type MsgCreateValidator
- type MsgExecute
- type MsgUnBond
- type QueryExecutionLayer
- type QueryExecutionLayerDetail
- type QueryExecutionLayerResp
- type QueryGetBalance
- type QueryGetBalanceDetail
- type UnitHashMap
Constants ¶
const ( ModuleName = types.ModuleName RouterKey = types.RouterKey HashMapStoreKey = types.HashMapStoreKey )
const ( QueryEE = "query" QueryEEDetail = "querydetail" QueryEEBalance = "querybalance" QueryEEBalanceDetail = "querybalancedetail" )
Variables ¶
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 )
var (
GenesisAccountAddress, _ = sdk.AccAddressFromBech32("friday1dl2cjlfpmc9hcyd4rxts047tze87s0gxmzqx70")
RecipientAccountAddress, _ = sdk.AccAddressFromBech32("friday1y2dx0evs5k6hxuhfrfdmm7wcwsrqr073htghpv")
)
Functions ¶
func BeginBlocker ¶
func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, elk ExecutionLayerKeeper)
func EndBloker ¶ added in v0.3.0
func EndBloker(ctx sdk.Context, k ExecutionLayerKeeper) []abci.ValidatorUpdate
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, keeper ExecutionLayerKeeper) types.GenesisState
ExportGenesis : exports an executionlayer configuration for genesis
func InitGenesis ¶
func InitGenesis( ctx sdk.Context, keeper ExecutionLayerKeeper, data types.GenesisState)
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
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, _ 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) NewQuerierHandler ¶
NewQuerierHandler constructs the query router
func (AppModule) QuerierRoute ¶
QuerierRoute works to route query to this module (revised)
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
register invariants
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) 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 CandidateBlock ¶ added in v0.3.0
type CandidateBlock = types.CandidateBlock
type ExecutionLayerKeeper ¶
type ExecutionLayerKeeper struct { HashMapStoreKey sdk.StoreKey AccountKeeper auth.AccountKeeper // contains filtered or unexported fields }
func NewExecutionLayerKeeper ¶
func NewExecutionLayerKeeper( cdc *codec.Codec, hashMapStoreKey sdk.StoreKey, path string, accountKeeper auth.AccountKeeper) ExecutionLayerKeeper
func (ExecutionLayerKeeper) Execute ¶ added in v0.3.0
func (k ExecutionLayerKeeper) Execute(ctx sdk.Context, blockHash []byte, execAccount sdk.AccAddress, contractOwnerAccount sdk.AccAddress, sessionCode []byte, sessionArgs []byte, paymentCode []byte, paymentArgs []byte, gasPrice uint64) error
Execute is general execution
func (ExecutionLayerKeeper) GetAllValidators ¶ added in v0.3.0
func (k ExecutionLayerKeeper) GetAllValidators(ctx sdk.Context) (validators []types.Validator)
func (ExecutionLayerKeeper) GetCandidateBlock ¶ added in v0.3.0
func (k ExecutionLayerKeeper) GetCandidateBlock(ctx sdk.Context) types.CandidateBlock
----------------------------------------------------------------------------------------------------------- GetCandidateBlock returns current block hash
func (ExecutionLayerKeeper) GetCandidateBlockBond ¶ added in v0.3.0
func (k ExecutionLayerKeeper) GetCandidateBlockBond(ctx sdk.Context) []*ipc.Bond
func (ExecutionLayerKeeper) GetCandidateBlockHash ¶ added in v0.3.0
func (k ExecutionLayerKeeper) GetCandidateBlockHash(ctx sdk.Context) []byte
GetCandidateBlockHash returns current block hash
func (ExecutionLayerKeeper) GetChainName ¶ added in v0.3.0
func (k ExecutionLayerKeeper) GetChainName(ctx sdk.Context) string
GetChainName retrieves ChainName in sdk store
func (ExecutionLayerKeeper) GetEEState ¶
func (k ExecutionLayerKeeper) GetEEState(ctx sdk.Context, blockHash []byte) []byte
GetEEState returns a eeState for blockHash
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) GetQueryBalanceResult ¶
func (k ExecutionLayerKeeper) GetQueryBalanceResult(ctx sdk.Context, blockhash []byte, address types.PublicKey) (string, error)
GetQueryBalanceResult queries with whole parameters
func (ExecutionLayerKeeper) GetQueryBalanceResultSimple ¶
func (k ExecutionLayerKeeper) GetQueryBalanceResultSimple(ctx sdk.Context, address types.PublicKey) (string, error)
GetQueryBalanceResultSimple queries with whole parameters
func (ExecutionLayerKeeper) GetQueryResult ¶
func (k ExecutionLayerKeeper) GetQueryResult(ctx sdk.Context, blockhash []byte, keyType string, keyData string, path string) (state.Value, error)
GetQueryResult queries with whole parameters
func (ExecutionLayerKeeper) GetQueryResultSimple ¶
func (k ExecutionLayerKeeper) GetQueryResultSimple(ctx sdk.Context, keyType string, keyData string, path string) (state.Value, error)
GetQueryResultSimple queries without state hash. State hash comes from Tendermint block state - EE state mapping DB
func (ExecutionLayerKeeper) GetUnitHashMap ¶
func (k ExecutionLayerKeeper) GetUnitHashMap(ctx sdk.Context, blockHash []byte) UnitHashMap
GetUnitHashMap returns a UnitHashMap for blockHash
func (ExecutionLayerKeeper) GetValidator ¶ added in v0.3.0
func (ExecutionLayerKeeper) GetValidatorConsPubKey ¶ added in v0.3.0
func (ExecutionLayerKeeper) GetValidatorDescription ¶ added in v0.3.0
func (k ExecutionLayerKeeper) GetValidatorDescription(ctx sdk.Context, accAddress []byte) types.Description
func (ExecutionLayerKeeper) GetValidatorOperatorAddress ¶ added in v0.3.0
func (k ExecutionLayerKeeper) GetValidatorOperatorAddress(ctx sdk.Context, accAddress []byte) sdk.ValAddress
func (ExecutionLayerKeeper) GetValidatorStake ¶ added in v0.3.0
func (k ExecutionLayerKeeper) GetValidatorStake(ctx sdk.Context, accAddress []byte) string
func (ExecutionLayerKeeper) MustGetProtocolVersion ¶ added in v0.3.0
func (k ExecutionLayerKeeper) MustGetProtocolVersion(ctx sdk.Context) state.ProtocolVersion
func (ExecutionLayerKeeper) SetAccountIfNotExists ¶ added in v0.3.0
func (k ExecutionLayerKeeper) SetAccountIfNotExists(ctx sdk.Context, account sdk.AccAddress)
SetAccountIfNotExists runs if network has no given account
func (ExecutionLayerKeeper) SetCandidateBlock ¶ added in v0.3.0
func (k ExecutionLayerKeeper) SetCandidateBlock(ctx sdk.Context, candidateBlock types.CandidateBlock)
func (ExecutionLayerKeeper) SetCandidateBlockBond ¶ added in v0.3.0
func (k ExecutionLayerKeeper) SetCandidateBlockBond(ctx sdk.Context, bonds []*ipc.Bond)
func (ExecutionLayerKeeper) SetCandidateBlockHash ¶ added in v0.3.0
func (k ExecutionLayerKeeper) SetCandidateBlockHash(ctx sdk.Context, blockHash []byte)
SetCandidateBlockHash saves current block hash
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) SetEEState ¶
SetEEState map eeState to blockHash
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) SetUnitHashMap ¶
func (k ExecutionLayerKeeper) SetUnitHashMap(ctx sdk.Context, blockHash []byte, unitHash UnitHashMap) bool
SetUnitHashMap map unitHash to blockHash
func (ExecutionLayerKeeper) SetValidator ¶ added in v0.3.0
func (ExecutionLayerKeeper) SetValidatorConsPubKey ¶ added in v0.3.0
func (ExecutionLayerKeeper) SetValidatorDescription ¶ added in v0.3.0
func (k ExecutionLayerKeeper) SetValidatorDescription(ctx sdk.Context, accAddress []byte, description types.Description)
func (ExecutionLayerKeeper) SetValidatorOperatorAddress ¶ added in v0.3.0
func (k ExecutionLayerKeeper) SetValidatorOperatorAddress(ctx sdk.Context, accAddress []byte, valAddress sdk.ValAddress)
func (ExecutionLayerKeeper) SetValidatorStake ¶ added in v0.3.0
func (k ExecutionLayerKeeper) SetValidatorStake(ctx sdk.Context, accAddress []byte, stake string)
func (ExecutionLayerKeeper) Transfer ¶ added in v0.3.0
func (k ExecutionLayerKeeper) Transfer( ctx sdk.Context, tokenOwnerAccount, fromAddress, toAddress sdk.AccAddress, transferCode []byte, transferAbi []byte, paymentCode []byte, paymentAbi []byte, gasPrice uint64) error
Transfer function executes "Execute" of Execution layer, that is specialized for transfer Difference of general execution
- Raw account is needed for checking address existence
- Fixed transfer & payemtn WASMs are needed
type MsgCreateValidator ¶ added in v0.3.0
type MsgCreateValidator = types.MsgCreateValidator
type MsgExecute ¶
type MsgExecute = types.MsgExecute
type QueryExecutionLayer ¶
type QueryExecutionLayer = types.QueryExecutionLayer
type QueryExecutionLayerDetail ¶
type QueryExecutionLayerDetail = types.QueryExecutionLayerDetail
type QueryExecutionLayerResp ¶
type QueryExecutionLayerResp = types.QueryExecutionLayerResp
type QueryGetBalance ¶
type QueryGetBalance = types.QueryGetBalance
type QueryGetBalanceDetail ¶
type QueryGetBalanceDetail = types.QueryGetBalanceDetail
type UnitHashMap ¶
type UnitHashMap = types.UnitHashMap