Documentation ¶
Index ¶
- Constants
- func ClRewardMax() *big.Int
- func DefaultRandomSleep()
- func EncodeReportData(reportData *withdrawOracle.WithdrawOracleReportData) ([32]byte, error)
- func RandomSleepTime() time.Duration
- 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) GetLastProcessingRefSlot(ctx context.Context) (*big.Int, error)
- func (v *Oracle) GetProcessingState(ctx context.Context) (*withdrawOracle.WithdrawOracleProcessingState, error)
- func (v *Oracle) GetReportAsyncProcessorAddress() (common.Address, 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 VnftOwner
- type WithdrawHelper
Constants ¶
View Source
const ( CONSENSUS_VERSION = 2 WITHRAW_ORACLE_CONTRACT_VERSION = 2 LARGE_STAKE_ORACLE_CONTRACT_VERSION = 1 WITHRAW_ORACLE_MODULE_ID = 1 LARGE_STAKE_MODULE_ID = 2 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 ClRewardMax ¶ added in v0.2.1
func DefaultRandomSleep ¶
func DefaultRandomSleep()
func EncodeReportData ¶
func EncodeReportData(reportData *withdrawOracle.WithdrawOracleReportData) ([32]byte, error)
func RandomSleepTime ¶ added in v0.0.6
Types ¶
type EffectiveOperator ¶
type EffectiveOperator struct { VnftCountOfStakingPool 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) GetLastProcessingRefSlot ¶ added in v0.0.6
func (*Oracle) GetProcessingState ¶
func (v *Oracle) GetProcessingState(ctx context.Context) (*withdrawOracle.WithdrawOracleProcessingState, error)
func (*Oracle) GetReportAsyncProcessorAddress ¶ added in v0.0.6
func (*Oracle) IsContractReportable ¶
func (*Oracle) IsMainDataSubmitted ¶
type ValidatorExa ¶
type ValidatorExa struct { Validator *consensusApi.Validator VnftOwner VnftOwner 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 // ClCapital used to calculate WithdrawInfo ExitedAmountForClCapital *big.Int // 1.slashed 2.exited 3.Not OracleReportExit SlashAmount *big.Int }
type WithdrawHelper ¶
type WithdrawHelper struct { ValidatorUnknownCount uint64 // 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.