Documentation ¶
Index ¶
- Constants
- Variables
- func GetGuardKey(cid mainchain.CidType, simplexReceiver mainchain.Addr) []byte
- func GetPenaltyKey(nonce uint64) []byte
- func GetPullerKey(txHash mainchain.HashType) []byte
- func NewMonitor(ethClient *mainchain.EthClient, operator *transactor.Transactor, db dbm.DB)
- type ChanInfo
- type EventName
- type EventWrapper
- type Monitor
- type MonitorContractInfo
- type PenaltyEvent
Constants ¶
Variables ¶
View Source
var ( PullerKeyPrefix = []byte{0x01} // Key prefix for puller GuardKeyPrefix = []byte{0x02} // Key prefix for guard PenaltyKeyPrefix = []byte{0x03} // Key prefix for penalty )
Functions ¶
func GetGuardKey ¶ added in v0.2.0
get guard key from mainchain txHash
func GetPullerKey ¶
get puller key from mainchain txHash
func NewMonitor ¶ added in v0.2.0
func NewMonitor(ethClient *mainchain.EthClient, operator *transactor.Transactor, db dbm.DB)
Types ¶
type EventName ¶
type EventName string
const ( UpdateSidechainAddr EventName = "UpdateSidechainAddr" ConfirmParamProposal EventName = "ConfirmParamProposal" Delegate EventName = "Delegate" CandidateUnbonded EventName = "CandidateUnbonded" ValidatorChange EventName = "ValidatorChange" IntendSettle EventName = "IntendSettle" IntendWithdraw EventName = "IntendWithdraw" IntendWithdrawDpos EventName = "IntendWithdrawDpos" IntendWithdrawChannel EventName = "IntendWithdrawChannel" )
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) interface{}
type MonitorContractInfo ¶ added in v0.2.0
type MonitorContractInfo struct {
// contains filtered or unexported fields
}
func NewMonitorContractInfo ¶ added in v0.2.0
func NewMonitorContractInfo(address mainchain.Addr, abi string) *MonitorContractInfo
func (*MonitorContractInfo) GetABI ¶ added in v0.2.0
func (info *MonitorContractInfo) GetABI() string
func (*MonitorContractInfo) GetAddr ¶ added in v0.2.0
func (info *MonitorContractInfo) GetAddr() mainchain.Addr
type PenaltyEvent ¶
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.