v038

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName module name
	ModuleName = "wrkchain"

	RouterKey = ModuleName // defined in keys.go file

	RegisterAction = "register_beacon"
	RecordAction   = "record_beacon_timestamp"
)

Variables

This section is empty.

Functions

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

Types

type GenesisState

type GenesisState struct {
	Params             Params           `json:"params" yaml:"params"`                             // wrkchain params
	StartingWrkChainID uint64           `json:"starting_wrkchain_id" yaml:"starting_wrkchain_id"` // should be 1
	WrkChains          []WrkChainExport `json:"registered_wrkchains" yaml:"registered_wrkchains"`
}

type MsgRecordWrkChainBlock

type MsgRecordWrkChainBlock struct {
	WrkChainID uint64         `json:"wrkchain_id"`
	Height     uint64         `json:"height"`
	BlockHash  string         `json:"blockhash"`
	ParentHash string         `json:"parenthash"`
	Hash1      string         `json:"hash1"`
	Hash2      string         `json:"hash2"`
	Hash3      string         `json:"hash3"`
	Owner      sdk.AccAddress `json:"owner"`
}

MsgRecordWrkChainBlock defines a RecordWrkChainBlock message

func (MsgRecordWrkChainBlock) Route

func (msg MsgRecordWrkChainBlock) Route() string

Route should return the name of the module

func (MsgRecordWrkChainBlock) Type

func (msg MsgRecordWrkChainBlock) Type() string

Type should return the action

func (MsgRecordWrkChainBlock) ValidateBasic

func (msg MsgRecordWrkChainBlock) ValidateBasic() error

ValidateBasic runs stateless checks on the message

type MsgRegisterWrkChain

type MsgRegisterWrkChain struct {
	Moniker      string         `json:"moniker"`
	WrkChainName string         `json:"name"`
	GenesisHash  string         `json:"genesis"`
	BaseType     string         `json:"type"`
	Owner        sdk.AccAddress `json:"owner"`
}

MsgRegisterWrkChain defines a RegisterWrkChain message

func (MsgRegisterWrkChain) Route

func (msg MsgRegisterWrkChain) Route() string

Route should return the name of the module

func (MsgRegisterWrkChain) Type

func (msg MsgRegisterWrkChain) Type() string

Type should return the action

func (MsgRegisterWrkChain) ValidateBasic

func (msg MsgRegisterWrkChain) ValidateBasic() error

ValidateBasic runs stateless checks on the message

type Params

type Params struct {
	FeeRegister uint64 `json:"fee_register" yaml:"fee_register"` // Fee for registering a WRKChain
	FeeRecord   uint64 `json:"fee_record" yaml:"fee_record"`     // Fee for recording hashes for a WRKChain
	Denom       string `json:"denom" yaml:"denom"`               // Fee denomination
}

type WrkChain

type WrkChain struct {
	WrkChainID   uint64         `json:"wrkchain_id"`
	Moniker      string         `json:"moniker"`
	Name         string         `json:"name"`
	GenesisHash  string         `json:"genesis"`
	BaseType     string         `json:"type"`
	LastBlock    uint64         `json:"lastblock"`
	NumberBlocks uint64         `json:"num_blocks"`
	RegisterTime int64          `json:"reg_time"`
	Owner        sdk.AccAddress `json:"owner"`
}

type WrkChainBlock

type WrkChainBlock struct {
	WrkChainID uint64         `json:"wrkchain_id"`
	Height     uint64         `json:"height"`
	BlockHash  string         `json:"blockhash"`
	ParentHash string         `json:"parenthash"`
	Hash1      string         `json:"hash1"`
	Hash2      string         `json:"hash2"`
	Hash3      string         `json:"hash3"`
	SubmitTime int64          `json:"sub_time"`
	Owner      sdk.AccAddress `json:"owner"`
}

type WrkChainBlocks

type WrkChainBlocks []WrkChainBlock

type WrkChainExport

type WrkChainExport struct {
	WrkChain       WrkChain        `json:"wrkchain" yaml:"wrkchain"`
	WrkChainBlocks []WrkChainBlock `json:"blocks" yaml:"blocks"`
}

type WrkChains

type WrkChains []WrkChain

Jump to

Keyboard shortcuts

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