Documentation ¶
Index ¶
- Constants
- Variables
- func GetGuardKey(cid mainchain.CidType, simplexReceiver mainchain.Addr) []byte
- func GetPenaltyKey(nonce uint64) []byte
- func GetPullerKey(eLog ethtypes.Log) []byte
- func MonitorTendermintEvent(nodeURI, eventTag string, handleEvent func(event abci.Event))
- func NewMonitor(operator *Operator, db dbm.DB)
- type ChanInfo
- type EventName
- type EventWrapper
- type Monitor
- type MonitorContractInfo
- type Operator
- 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 )
View Source
var ( InitiateWithdrawRewardEvent = fmt.Sprintf("%s.%s='%s'", validator.ModuleName, sdk.AttributeKeyAction, validator.ActionInitiateWithdraw) SlashEvent = fmt.Sprintf("%s.%s='%s'", slash.EventTypeSlash, sdk.AttributeKeyAction, slash.ActionPenalty) )
Functions ¶
func GetGuardKey ¶ added in v0.2.0
get guard key from mainchain txHash
func GetPullerKey ¶
get puller key from mainchain txHash
func MonitorTendermintEvent ¶ added in v0.2.4
func NewMonitor ¶ added in v0.2.0
Types ¶
type EventName ¶
type EventName string
const ( UpdateSidechainAddr EventName = "UpdateSidechainAddr" AddSubscriptionBalance EventName = "AddSubscriptionBalance" ConfirmParamProposal EventName = "ConfirmParamProposal" UpdateDelegatedStake EventName = "UpdateDelegatedStake" CandidateUnbonded EventName = "CandidateUnbonded" ValidatorChange EventName = "ValidatorChange" UpdateCommissionRate EventName = "UpdateCommissionRate" IntendSettle EventName = "IntendSettle" IntendWithdraw EventName = "IntendWithdraw" 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 Monitor ¶ added in v0.2.0
type Monitor struct { *Operator // contains filtered or unexported fields }
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 Operator ¶ added in v0.2.3
type Operator struct { EthClient *mainchain.EthClient Transactor *transactor.Transactor }
func NewOperator ¶ added in v0.2.3
func (*Operator) SyncDelegator ¶ added in v0.2.3
func (*Operator) SyncSubscriptionBalance ¶ added in v0.2.3
func (*Operator) SyncUpdateSidechainAddr ¶ added in v0.2.3
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.