staking

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: BSD-3-Clause Imports: 11 Imported by: 3

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")
	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)
	GetWithdrawableStake(ctx context.Context) (*big.Int, error)
	WithdrawStake(ctx context.Context) (common.Hash, error)
	MigrateStake(ctx context.Context) (common.Hash, error)
	RedistributionStatuser
}

func New

func New(
	owner common.Address,
	stakingContractAddress common.Address,
	stakingContractABI abi.ABI,
	bzzTokenAddress common.Address,
	transactionService transaction.Service,
	nonce common.Hash,
	setGasLimit bool,
) Contract

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