withdraw

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2023 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

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 (v *Oracle) CheckContractVersions(ctx context.Context) error

func (*Oracle) GetConsensusContract

func (v *Oracle) GetConsensusContract(ctx context.Context) (*hashConsensus.HashConsensus, error)

func (*Oracle) GetConsensusContractAddress

func (v *Oracle) GetConsensusContractAddress(ctx context.Context) (common.Address, error)

func (*Oracle) GetProcessingState

func (*Oracle) IsContractReportable

func (v *Oracle) IsContractReportable(ctx context.Context) (bool, error)

func (*Oracle) IsMainDataSubmitted

func (v *Oracle) IsMainDataSubmitted(ctx context.Context) (bool, error)

func (*Oracle) Paused

func (v *Oracle) Paused(ctx context.Context) (bool, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL