Documentation ¶
Index ¶
- Constants
- Variables
- func ErrEventRecordAlreadySynced(codespace sdk.CodespaceType) sdk.Error
- func ErrEventRecordInvalid(codespace sdk.CodespaceType) sdk.Error
- func ErrEventUpdate(codespace sdk.CodespaceType) sdk.Error
- func RegisterCodec(cdc *codec.Codec)
- func RegisterPulp(pulp *authTypes.Pulp)
- func ValidateGenesis(data GenesisState) error
- type EventRecord
- type GenesisState
- type MsgEventRecord
- func (msg MsgEventRecord) GetLogIndex() uint64
- func (msg MsgEventRecord) GetSignBytes() []byte
- func (msg MsgEventRecord) GetSigners() []sdk.AccAddress
- func (msg MsgEventRecord) GetTxHash() types.HeimdallHash
- func (msg MsgEventRecord) Route() string
- func (msg MsgEventRecord) Type() string
- func (msg MsgEventRecord) ValidateBasic() sdk.Error
- type QueryRecordParams
Constants ¶
const ( CodeEventRecordAlreadySynced sdk.CodeType = 5400 CodeEventRecordInvalid = 5401 CodeEventRecordUpdate = 5402 )
Bank errors reserve 5400 ~ 5499.
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 )
const ( QueryRecord = "record" QueryRecordList = "record-list" )
query endpoints supported by the auth Querier
Variables ¶
var ( EventTypeRecord = "record" AttributeKeyRecordTxHash = "record-tx-hash" AttributeKeyRecordTxLogIndex = "record-tx-log-index" AttributeKeyRecordID = "record-id" AttributeKeyRecordContract = "record-contract" AttributeKeyCreatedAt = "created-at" AttributeValueCategory = ModuleName )
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 ¶
RegisterCodec registers concrete types on codec codec
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) 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.