Documentation ¶
Index ¶
- Constants
- func DefaultRandomSleep()
- func EncodeReportData(reportData *withdrawOracle.WithdrawOracleReportData) ([32]byte, error)
- type EffectiveOperator
- type Oracle
- func (v *Oracle) CheckContractVersions(ctx context.Context) error
- func (v *Oracle) GetConsensusContract(ctx context.Context) (*hashConsensus.HashConsensus, error)
- func (v *Oracle) GetConsensusContractAddress(ctx context.Context) (common.Address, error)
- func (v *Oracle) GetProcessingState(ctx context.Context) (*withdrawOracle.WithdrawOracleProcessingState, error)
- func (v *Oracle) IsContractReportable(ctx context.Context) (bool, error)
- func (v *Oracle) IsMainDataSubmitted(ctx context.Context) (bool, error)
- func (v *Oracle) Paused(ctx context.Context) (bool, error)
- type ValidatorExa
- type WithdrawHelper
Constants ¶
View Source
const ( CONSENSUS_VERSION = 1 CONTRACT_VERSION = 1 SLOTS_PER_EPOCH = 32 SECONDS_PER_SLOT = 12 SECONDS_PER_EPOCH = SLOTS_PER_EPOCH * SECONDS_PER_SLOT )
version
Variables ¶
This section is empty.
Functions ¶
func DefaultRandomSleep ¶
func DefaultRandomSleep()
func EncodeReportData ¶
func EncodeReportData(reportData *withdrawOracle.WithdrawOracleReportData) ([32]byte, error)
Types ¶
type EffectiveOperator ¶
type EffectiveOperator struct { VnftCount uint64 OperatorReward withdrawOracle.WithdrawInfo }
type Oracle ¶
type Oracle struct { }
func (*Oracle) CheckContractVersions ¶
func (*Oracle) GetConsensusContract ¶
func (v *Oracle) GetConsensusContract(ctx context.Context) (*hashConsensus.HashConsensus, error)
func (*Oracle) GetConsensusContractAddress ¶
func (*Oracle) GetProcessingState ¶
func (v *Oracle) GetProcessingState(ctx context.Context) (*withdrawOracle.WithdrawOracleProcessingState, error)
func (*Oracle) IsContractReportable ¶
func (*Oracle) IsMainDataSubmitted ¶
type ValidatorExa ¶
type ValidatorExa struct { Validator *consensusApi.Validator IsExited bool ExitedSlot *big.Int ExitedBlockHeight *big.Int TokenId *big.Int OperatorId *big.Int // Whether oracle needs to make a report IsNeedOracleReportExit bool // IsNeedOracleReportExit = true And then to calculate ExitedAmount *big.Int // Whether the tokenId is owned by the pledge pool IsOwnerLiqPool bool // 1.slashed 2.exited 3.Not OracleReportExit SlashAmount *big.Int IsDelayedExit bool }
type WithdrawHelper ¶
type WithdrawHelper struct {
// contains filtered or unexported fields
}
func (*WithdrawHelper) IsOwnerLiqPool ¶
func (v *WithdrawHelper) IsOwnerLiqPool(ctx context.Context, exa *ValidatorExa) (bool, error)
func (*WithdrawHelper) ProcessReport ¶
func (v *WithdrawHelper) ProcessReport(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.