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 ValidateGenesis(data GenesisState) error
- type EventRecord
- type GenesisState
- type MsgEventRecord
- func (msg MsgEventRecord) GetLogIndex() uint64
- func (msg MsgEventRecord) GetSideSignBytes() []byte
- 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
- type QueryRecordSequenceParams
- type QueryRecordTimePaginationParams
Constants ¶
const ( CodeEventRecordAlreadySynced sdk.CodeType = 5400 CodeEventRecordInvalid sdk.CodeType = 5401 CodeEventRecordUpdate sdk.CodeType = 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" QueryRecordListWithTime = "record-list-time" QueryRecordSequence = "record-sequence" )
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"` RecordTime time.Time `json:"record_time" yaml:"record_time"` }
EventRecord represents state record
func NewEventRecord ¶
func NewEventRecord( txHash types.HeimdallHash, logIndex uint64, id uint64, contract types.HeimdallAddress, data types.HexBytes, chainID string, recordTime time.Time, ) 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"` RecordSequences []string `json:"record_sequences" yaml:"record_sequences"` }
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, recordSequences []string) 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"` BlockNumber uint64 `json:"block_number"` ContractAddress types.HeimdallAddress `json:"contract_address"` Data types.HexBytes `json:"data"` 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, blockNumber uint64, id uint64, contractAddress types.HeimdallAddress, data types.HexBytes, chainID string, ) MsgEventRecord
NewMsgEventRecord - construct state msg
func (MsgEventRecord) GetLogIndex ¶
func (msg MsgEventRecord) GetLogIndex() uint64
GetLogIndex Returns log index
func (MsgEventRecord) GetSideSignBytes ¶
func (msg MsgEventRecord) GetSideSignBytes() []byte
GetSideSignBytes returns side sign bytes
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.
type QueryRecordSequenceParams ¶
QueryRecordSequenceParams defines the params for querying an account Sequence.
func NewQueryRecordSequenceParams ¶
func NewQueryRecordSequenceParams(txHash string, logIndex uint64) QueryRecordSequenceParams
NewQueryRecordSequenceParams creates a new instance of QuerySequenceParams.
type QueryRecordTimePaginationParams ¶
type QueryRecordTimePaginationParams struct { FromTime time.Time ToTime time.Time Page uint64 Limit uint64 }
QueryRecordTimePaginationParams defines the params for querying records with time.
func NewQueryTimeRangePaginationParams ¶
func NewQueryTimeRangePaginationParams(fromTime, toTime time.Time, page, limit uint64) QueryRecordTimePaginationParams
NewQueryTimeRangePaginationParams creates a new instance of NewQueryTimeRangePaginationParams.