Documentation
¶
Index ¶
- Variables
- func GetEventKey(log types.Log) []byte
- func GetPenaltyKey(nonce uint64) []byte
- func GetPullerKey(log types.Log) []byte
- func GetPusherKey(log types.Log) []byte
- func NewEthMonitor(ethClient *mainchain.EthClient, operator, blockSyncer *transactor.Transactor)
- type EthMonitor
- type EventName
- type EventWrapper
- type PenaltyEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EventKeyPrefix = []byte{0x01} // Key prefix for event PullerKeyPrefix = []byte{0x02} // Key prefix for puller PusherKeyPrefix = []byte{0x03} // Key prefix for pusher PenaltyKeyPrefix = []byte{0x04} // Key prefix for penalty )
Functions ¶
func NewEthMonitor ¶
func NewEthMonitor(ethClient *mainchain.EthClient, operator, blockSyncer *transactor.Transactor)
Types ¶
type EthMonitor ¶
type EthMonitor struct {
// contains filtered or unexported fields
}
type EventWrapper ¶
Wrapper for ethereum Event
func NewEventFromBytes ¶
func NewEventFromBytes(input []byte) EventWrapper
func (EventWrapper) MustMarshal ¶
func (e EventWrapper) MustMarshal() []byte
Marshal event into json bytes
func (*EventWrapper) MustUnMarshal ¶
func (e *EventWrapper) MustUnMarshal(input []byte)
Unmarshal json bytes to event
func (EventWrapper) ParseEvent ¶
func (e EventWrapper) ParseEvent(ethClient *mainchain.EthClient) (res interface{})
type PenaltyEvent ¶
type PenaltyEvent struct {
// contains filtered or unexported fields
}
func NewPenaltyEvent ¶
func NewPenaltyEvent(nonce uint64) PenaltyEvent
func NewPenaltyEventFromBytes ¶
func NewPenaltyEventFromBytes(input []byte) PenaltyEvent
func (PenaltyEvent) MustMarshal ¶
func (e PenaltyEvent) MustMarshal() []byte
Marshal event into json bytes
func (*PenaltyEvent) MustUnMarshal ¶
func (e *PenaltyEvent) MustUnMarshal(input []byte)
Unmarshal json bytes to penalty event
Click to show internal directories.
Click to hide internal directories.