types

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	CodeEventRecordAlreadySynced sdk.CodeType = 5400
	CodeEventRecordInvalid                    = 5401
	CodeEventRecordUpdate                     = 5402
)

Bank errors reserve 5400 ~ 5499.

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "clerk"

	// 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

	// DefaultCodespace default code space
	DefaultCodespace sdk.CodespaceType = ModuleName
)
View Source
const (
	QueryRecord     = "record"
	QueryRecordList = "record-list"
)

query endpoints supported by the auth Querier

Variables

View Source
var (
	EventTypeRecord = "record"

	AttributeKeyRecordTxHash     = "record-tx-hash"
	AttributeKeyRecordTxLogIndex = "record-tx-log-index"
	AttributeKeyRecordID         = "record-id"
	AttributeKeyRecordContract   = "record-contract"
	AttributeKeyCreatedAt        = "created-at"

	AttributeValueCategory = ModuleName
)
View Source
var ModuleCdc = codec.New()

ModuleCdc module cdc

Functions

func ErrEventRecordAlreadySynced

func ErrEventRecordAlreadySynced(codespace sdk.CodespaceType) sdk.Error

ErrEventRecordAlreadySynced represents event sync error

func ErrEventRecordInvalid

func ErrEventRecordInvalid(codespace sdk.CodespaceType) sdk.Error

ErrEventRecordInvalid represents event error

func ErrEventUpdate

func ErrEventUpdate(codespace sdk.CodespaceType) sdk.Error

ErrEventUpdate represents event update error

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on codec codec

func RegisterPulp

func RegisterPulp(pulp *authTypes.Pulp)

RegisterPulp register pulp

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis performs basic validation of bank genesis data returning an error for any failed validation criteria.

Types

type EventRecord

type EventRecord struct {
	ID       uint64                `json:"id" yaml:"id"`
	Contract types.HeimdallAddress `json:"contract" yaml:"contract"`
	Data     types.HexBytes        `json:"data" yaml:"data"`
	TxHash   types.HeimdallHash    `json:"tx_hash" yaml:"tx_hash"`
	LogIndex uint64                `json:"log_index" yaml:"log_index"`
	ChainID  string                `json:"bor_chain_id" yaml:"bor_chain_id"`
}

EventRecord represents state record

func NewEventRecord

func NewEventRecord(
	txHash types.HeimdallHash,
	logIndex uint64,
	id uint64,
	contract types.HeimdallAddress,
	data types.HexBytes,
	chainID string,
) EventRecord

NewEventRecord creates new record

func (*EventRecord) String

func (s *EventRecord) String() string

String returns the string representatin of span

type GenesisState

type GenesisState struct {
	EventRecords []*EventRecord `json:"event_records"`
}

GenesisState is the bank state that must be provided at genesis.

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState returns a default genesis state

func NewGenesisState

func NewGenesisState(eventRecords []*EventRecord) GenesisState

NewGenesisState creates a new genesis state.

type MsgEventRecord

type MsgEventRecord struct {
	From     types.HeimdallAddress `json:"from"`
	TxHash   types.HeimdallHash    `json:"tx_hash"`
	LogIndex uint64                `json:"log_index"`
	ID       uint64                `json:"id"`
	ChainID  string                `json:"bor_chain_id"`
}

MsgEventRecord - state msg

func NewMsgEventRecord

func NewMsgEventRecord(
	from types.HeimdallAddress,
	txHash types.HeimdallHash,
	logIndex uint64,
	id uint64,
	chainID string,
) MsgEventRecord

NewMsgEventRecord - construct state msg

func (MsgEventRecord) GetLogIndex

func (msg MsgEventRecord) GetLogIndex() uint64

GetLogIndex Returns log index

func (MsgEventRecord) GetSignBytes

func (msg MsgEventRecord) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgEventRecord) GetSigners

func (msg MsgEventRecord) GetSigners() []sdk.AccAddress

GetSigners Implements Msg.

func (MsgEventRecord) GetTxHash

func (msg MsgEventRecord) GetTxHash() types.HeimdallHash

GetTxHash Returns tx hash

func (MsgEventRecord) Route

func (msg MsgEventRecord) Route() string

Route Implements Msg.

func (MsgEventRecord) Type

func (msg MsgEventRecord) Type() string

Type Implements Msg.

func (MsgEventRecord) ValidateBasic

func (msg MsgEventRecord) ValidateBasic() sdk.Error

ValidateBasic Implements Msg.

type QueryRecordParams

type QueryRecordParams struct {
	RecordID uint64
}

QueryRecordParams defines the params for querying accounts.

func NewQueryRecordParams

func NewQueryRecordParams(recordID uint64) QueryRecordParams

NewQueryRecordParams creates a new instance of QueryRecordParams.

Jump to

Keyboard shortcuts

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