Documentation ¶
Index ¶
Constants ¶
const ( // ModuleName is the name of the module ModuleName = "chainmanager" // StoreKey is the store key string for bor StoreKey = ModuleName // RouterKey is the message route for bor RouterKey = ModuleName // QuerierRoute is the querier route for bor QuerierRoute = ModuleName // DefaultParamspace default name for parameter store DefaultParamspace = ModuleName )
const ( DefaultMainchainTxConfirmations uint64 = 6 DefaultMaticchainTxConfirmations uint64 = 10 )
Default parameter values
const (
QueryParams = "params"
)
query endpoints supported by the chain-manager Querier
Variables ¶
var ( DefaultStateReceiverAddress hmTypes.HeimdallAddress = hmTypes.HexToHeimdallAddress("0x0000000000000000000000000000000000001001") DefaultValidatorSetAddress hmTypes.HeimdallAddress = hmTypes.HexToHeimdallAddress("0x0000000000000000000000000000000000001000") )
var ( KeyMainchainTxConfirmations = []byte("MainchainTxConfirmations") KeyMaticchainTxConfirmations = []byte("MaticchainTxConfirmations") KeyChainParams = []byte("ChainParams") )
Parameter keys
var ModuleCdc *codec.Codec
ModuleCdc module codec
Functions ¶
func RegisterCodec ¶
RegisterCodec registers all necessary param module types with a given codec.
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis performs basic validation of auth genesis data returning an error for any failed validation criteria.
Types ¶
type ChainParams ¶
type ChainParams struct { BorChainID string `json:"bor_chain_id" yaml:"bor_chain_id"` MaticTokenAddress hmTypes.HeimdallAddress `json:"matic_token_address" yaml:"matic_token_address"` StakingManagerAddress hmTypes.HeimdallAddress `json:"staking_manager_address" yaml:"staking_manager_address"` SlashManagerAddress hmTypes.HeimdallAddress `json:"slash_manager_address" yaml:"slash_manager_address"` RootChainAddress hmTypes.HeimdallAddress `json:"root_chain_address" yaml:"root_chain_address"` StakingInfoAddress hmTypes.HeimdallAddress `json:"staking_info_address" yaml:"staking_info_address"` StateSenderAddress hmTypes.HeimdallAddress `json:"state_sender_address" yaml:"state_sender_address"` // Bor Chain Contracts StateReceiverAddress hmTypes.HeimdallAddress `json:"state_receiver_address" yaml:"state_receiver_address"` ValidatorSetAddress hmTypes.HeimdallAddress `json:"validator_set_address" yaml:"validator_set_address"` }
ChainParams chain related params
func (ChainParams) String ¶
func (cp ChainParams) String() string
type GenesisState ¶
type GenesisState struct {
Params Params `json:"params" yaml:"params"`
}
GenesisState - all chainmanager state that must be provided at genesis
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState - Return a default genesis state
func GetGenesisStateFromAppState ¶
func GetGenesisStateFromAppState(appState map[string]json.RawMessage) GenesisState
GetGenesisStateFromAppState returns staking GenesisState given raw application genesis state
func NewGenesisState ¶
func NewGenesisState(params Params) GenesisState
NewGenesisState - Create a new genesis state
type Params ¶
type Params struct { MainchainTxConfirmations uint64 `json:"mainchain_tx_confirmations" yaml:"mainchain_tx_confirmations"` MaticchainTxConfirmations uint64 `json:"maticchain_tx_confirmations" yaml:"maticchain_tx_confirmations"` ChainParams ChainParams `json:"chain_params" yaml:"chain_params"` }
Params defines the parameters for the chainmanager module.
func NewParams ¶
func NewParams(mainchainTxConfirmations uint64, maticchainTxConfirmations uint64, chainParams ChainParams) Params
NewParams creates a new Params object
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() subspace.ParamSetPairs
ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of auth module's parameters. nolint