staking

package
v2.8.3-rc3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: BSD-3-Clause Imports: 12 Imported by: 4 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MinimumStakeAmount = big.NewInt(100000000000000000)

	ErrInsufficientStakeAmount = errors.New("insufficient stake amount")
	ErrInsufficientFunds       = errors.New("insufficient token balance")
	ErrInsufficientStake       = errors.New("insufficient stake")
	ErrOraclePriceUnavailable  = errors.New("oracle price unavailable")
	ErrNotImplemented          = errors.New("not implemented")
	ErrNotPaused               = errors.New("contract is not paused")
	ErrUnexpectedLength        = errors.New("unexpected results length")
)

Functions

This section is empty.

Types

type Contract

type Contract interface {
	DepositStake(ctx context.Context, stakedAmount *big.Int) (common.Hash, error)
	ChangeStakeOverlay(ctx context.Context, nonce common.Hash) (common.Hash, error)
	GetPotentialStake(ctx context.Context) (*big.Int, error)
	GetMinDeposit(ctx context.Context) (*big.Int, error)
	GetWithdrawableStake(ctx context.Context) (*big.Int, error)
	WithdrawStake(ctx context.Context) (common.Hash, error)
	MigrateStake(ctx context.Context) (common.Hash, error)
	UpdateHeight(ctx context.Context) (common.Hash, bool, error)
	RedistributionStatuser
}

func New

func New(
	owner common.Address,
	stakingContractAddress common.Address,
	stakingContractABI abi.ABI,
	bzzTokenAddress common.Address,
	transactionService transaction.Service,
	nonce common.Hash,
	gasLimit uint64,
	height uint8,
) Contract

type MinDepositError added in v2.8.3

type MinDepositError struct {
	Minimum *big.Int
}

MinDepositError is returned when a deposit is below the amount required by the staking contract, including the non-decreasing commitment rule.

func (*MinDepositError) Error added in v2.8.3

func (e *MinDepositError) Error() string

func (*MinDepositError) Unwrap added in v2.8.3

func (e *MinDepositError) Unwrap() error

type RedistributionStatuser

type RedistributionStatuser interface {
	IsOverlayFrozen(ctx context.Context, block uint64) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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