staking

package
v8.0.0-...-6a2f0a1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowanceSharesABI

type AllowanceSharesABI struct {
	abi.Method
}

func NewAllowanceSharesABI

func NewAllowanceSharesABI() AllowanceSharesABI

func (AllowanceSharesABI) PackInput

func (AllowanceSharesABI) PackOutput

func (m AllowanceSharesABI) PackOutput(amount *big.Int) ([]byte, error)

func (AllowanceSharesABI) UnpackInput

func (m AllowanceSharesABI) UnpackInput(data []byte) (*fxcontract.AllowanceSharesArgs, error)

func (AllowanceSharesABI) UnpackOutput

func (m AllowanceSharesABI) UnpackOutput(data []byte) (*big.Int, error)

type AllowanceSharesMethod

type AllowanceSharesMethod struct {
	*Keeper
	AllowanceSharesABI
}

func NewAllowanceSharesMethod

func NewAllowanceSharesMethod(keeper *Keeper) *AllowanceSharesMethod

func (*AllowanceSharesMethod) GetMethodId

func (m *AllowanceSharesMethod) GetMethodId() []byte

func (*AllowanceSharesMethod) IsReadonly

func (m *AllowanceSharesMethod) IsReadonly() bool

func (*AllowanceSharesMethod) RequiredGas

func (m *AllowanceSharesMethod) RequiredGas() uint64

func (*AllowanceSharesMethod) Run

func (m *AllowanceSharesMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

type ApproveSharesABI

type ApproveSharesABI struct {
	abi.Method
	abi.Event
}

func NewApproveSharesABI

func NewApproveSharesABI() ApproveSharesABI

func (ApproveSharesABI) NewApproveSharesEvent

func (m ApproveSharesABI) NewApproveSharesEvent(owner, spender common.Address, validator string, shares *big.Int) (data []byte, topic []common.Hash, err error)

func (ApproveSharesABI) PackInput

func (m ApproveSharesABI) PackInput(args fxcontract.ApproveSharesArgs) ([]byte, error)

func (ApproveSharesABI) PackOutput

func (m ApproveSharesABI) PackOutput(result bool) ([]byte, error)

func (ApproveSharesABI) UnpackEvent

func (ApproveSharesABI) UnpackInput

func (m ApproveSharesABI) UnpackInput(data []byte) (*fxcontract.ApproveSharesArgs, error)

func (ApproveSharesABI) UnpackOutput

func (m ApproveSharesABI) UnpackOutput(data []byte) (bool, error)

type ApproveSharesMethod

type ApproveSharesMethod struct {
	*Keeper
	ApproveSharesABI
}

func NewApproveSharesMethod

func NewApproveSharesMethod(keeper *Keeper) *ApproveSharesMethod

func (*ApproveSharesMethod) GetMethodId

func (m *ApproveSharesMethod) GetMethodId() []byte

func (*ApproveSharesMethod) IsReadonly

func (m *ApproveSharesMethod) IsReadonly() bool

func (*ApproveSharesMethod) RequiredGas

func (m *ApproveSharesMethod) RequiredGas() uint64

func (*ApproveSharesMethod) Run

func (m *ApproveSharesMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

type Contract

type Contract struct {
	// contains filtered or unexported fields
}

func NewPrecompiledContract

func NewPrecompiledContract(
	bankKeeper types.BankKeeper,
	stakingKeeper *fxstakingkeeper.Keeper,
	distrKeeper distrkeeper.Keeper,
	stakingDenom string,
	govKeeper types.GovKeeper,
	slashingKeeper types.SlashingKeeper,
) *Contract

func (*Contract) Address

func (c *Contract) Address() common.Address

func (*Contract) IsStateful

func (c *Contract) IsStateful() bool

func (*Contract) RequiredGas

func (c *Contract) RequiredGas(input []byte) uint64

func (*Contract) Run

func (c *Contract) Run(evm *vm.EVM, vmContract *vm.Contract, readonly bool) (ret []byte, err error)

type DelegateV2ABI

type DelegateV2ABI struct {
	abi.Method
	abi.Event
}

func NewDelegateV2ABI

func NewDelegateV2ABI() DelegateV2ABI

func (DelegateV2ABI) NewDelegateEvent

func (m DelegateV2ABI) NewDelegateEvent(sender common.Address, validator string, amount *big.Int) (data []byte, topic []common.Hash, err error)

func (DelegateV2ABI) PackInput

func (m DelegateV2ABI) PackInput(args fxcontract.DelegateV2Args) ([]byte, error)

func (DelegateV2ABI) PackOutput

func (m DelegateV2ABI) PackOutput(result bool) ([]byte, error)

func (DelegateV2ABI) UnpackEvent

func (m DelegateV2ABI) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingDelegateV2, error)

func (DelegateV2ABI) UnpackInput

func (m DelegateV2ABI) UnpackInput(data []byte) (*fxcontract.DelegateV2Args, error)

func (DelegateV2ABI) UnpackOutput

func (m DelegateV2ABI) UnpackOutput(data []byte) (bool, error)

type DelegateV2Method

type DelegateV2Method struct {
	*Keeper
	DelegateV2ABI
}

func NewDelegateV2Method

func NewDelegateV2Method(keeper *Keeper) *DelegateV2Method

func (*DelegateV2Method) GetMethodId

func (m *DelegateV2Method) GetMethodId() []byte

func (*DelegateV2Method) IsReadonly

func (m *DelegateV2Method) IsReadonly() bool

func (*DelegateV2Method) RequiredGas

func (m *DelegateV2Method) RequiredGas() uint64

func (*DelegateV2Method) Run

func (m *DelegateV2Method) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

type DelegationABI

type DelegationABI struct {
	abi.Method
}

func NewDelegationABI

func NewDelegationABI() DelegationABI

func (DelegationABI) PackInput

func (m DelegationABI) PackInput(args fxcontract.DelegationArgs) ([]byte, error)

func (DelegationABI) PackOutput

func (m DelegationABI) PackOutput(shares, amount *big.Int) ([]byte, error)

func (DelegationABI) UnpackInput

func (m DelegationABI) UnpackInput(data []byte) (*fxcontract.DelegationArgs, error)

func (DelegationABI) UnpackOutput

func (m DelegationABI) UnpackOutput(data []byte) (*big.Int, *big.Int, error)

type DelegationMethod

type DelegationMethod struct {
	*Keeper
	DelegationABI
}

func NewDelegationMethod

func NewDelegationMethod(keeper *Keeper) *DelegationMethod

func (*DelegationMethod) GetMethodId

func (m *DelegationMethod) GetMethodId() []byte

func (*DelegationMethod) IsReadonly

func (m *DelegationMethod) IsReadonly() bool

func (*DelegationMethod) RequiredGas

func (m *DelegationMethod) RequiredGas() uint64

func (*DelegationMethod) Run

func (m *DelegationMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

type DelegationRewardsABI

type DelegationRewardsABI struct {
	abi.Method
}

func NewDelegationRewardsABI

func NewDelegationRewardsABI() DelegationRewardsABI

func (DelegationRewardsABI) PackInput

func (DelegationRewardsABI) PackOutput

func (m DelegationRewardsABI) PackOutput(amount *big.Int) ([]byte, error)

func (DelegationRewardsABI) UnpackInput

func (DelegationRewardsABI) UnpackOutput

func (m DelegationRewardsABI) UnpackOutput(data []byte) (*big.Int, error)

type DelegationRewardsMethod

type DelegationRewardsMethod struct {
	*Keeper
	DelegationRewardsABI
}

func NewDelegationRewardsMethod

func NewDelegationRewardsMethod(keeper *Keeper) *DelegationRewardsMethod

func (*DelegationRewardsMethod) GetMethodId

func (m *DelegationRewardsMethod) GetMethodId() []byte

func (*DelegationRewardsMethod) IsReadonly

func (m *DelegationRewardsMethod) IsReadonly() bool

func (*DelegationRewardsMethod) RequiredGas

func (m *DelegationRewardsMethod) RequiredGas() uint64

func (*DelegationRewardsMethod) Run

func (m *DelegationRewardsMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func (Keeper) NewStakingCoin

func (k Keeper) NewStakingCoin(amount *big.Int) sdk.Coin

func (Keeper) ValidatorListMissedBlock

func (k Keeper) ValidatorListMissedBlock(ctx sdk.Context, bondedVals []stakingtypes.Validator) ([]string, error)

type RedelegateABI

type RedelegateABI struct {
	abi.Method
	abi.Event
}

func NewRedelegateV2ABI

func NewRedelegateV2ABI() RedelegateABI

func (RedelegateABI) NewRedelegationEvent

func (m RedelegateABI) NewRedelegationEvent(sender common.Address, validatorSrc, validatorDst string, amount *big.Int, completionTime int64) (data []byte, topic []common.Hash, err error)

func (RedelegateABI) PackInput

func (m RedelegateABI) PackInput(args fxcontract.RedelegateV2Args) ([]byte, error)

func (RedelegateABI) PackOutput

func (m RedelegateABI) PackOutput(result bool) ([]byte, error)

func (RedelegateABI) UnpackEvent

func (RedelegateABI) UnpackInput

func (m RedelegateABI) UnpackInput(data []byte) (*fxcontract.RedelegateV2Args, error)

func (RedelegateABI) UnpackOutput

func (m RedelegateABI) UnpackOutput(data []byte) (bool, error)

type RedelegateV2Method

type RedelegateV2Method struct {
	*Keeper
	RedelegateABI
}

func NewRedelegateV2Method

func NewRedelegateV2Method(keeper *Keeper) *RedelegateV2Method

func (*RedelegateV2Method) GetMethodId

func (m *RedelegateV2Method) GetMethodId() []byte

func (*RedelegateV2Method) IsReadonly

func (m *RedelegateV2Method) IsReadonly() bool

func (*RedelegateV2Method) RequiredGas

func (m *RedelegateV2Method) RequiredGas() uint64

func (*RedelegateV2Method) Run

func (m *RedelegateV2Method) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

type SlashingInfoABI

type SlashingInfoABI struct {
	abi.Method
}

func NewSlashingInfoABI

func NewSlashingInfoABI() SlashingInfoABI

func (SlashingInfoABI) PackInput

func (m SlashingInfoABI) PackInput(args fxcontract.SlashingInfoArgs) ([]byte, error)

func (SlashingInfoABI) PackOutput

func (m SlashingInfoABI) PackOutput(jailed bool, missed int64) ([]byte, error)

func (SlashingInfoABI) UnpackInput

func (m SlashingInfoABI) UnpackInput(data []byte) (*fxcontract.SlashingInfoArgs, error)

func (SlashingInfoABI) UnpackOutput

func (m SlashingInfoABI) UnpackOutput(data []byte) (bool, *big.Int, error)

type SlashingInfoMethod

type SlashingInfoMethod struct {
	*Keeper
	SlashingInfoABI
}

func NewSlashingInfoMethod

func NewSlashingInfoMethod(keeper *Keeper) *SlashingInfoMethod

func (*SlashingInfoMethod) GetMethodId

func (m *SlashingInfoMethod) GetMethodId() []byte

func (*SlashingInfoMethod) IsReadonly

func (m *SlashingInfoMethod) IsReadonly() bool

func (*SlashingInfoMethod) RequiredGas

func (m *SlashingInfoMethod) RequiredGas() uint64

func (*SlashingInfoMethod) Run

func (m *SlashingInfoMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

type TransferFromSharesABI

type TransferFromSharesABI struct {
	// contains filtered or unexported fields
}

func NewTransferFromSharesABI

func NewTransferFromSharesABI() TransferFromSharesABI

func (TransferFromSharesABI) NewTransferShareEvent

func (m TransferFromSharesABI) NewTransferShareEvent(sender, to common.Address, validator string, shares, amount *big.Int) (data []byte, topic []common.Hash, err error)

func (TransferFromSharesABI) PackInput

func (TransferFromSharesABI) PackOutput

func (m TransferFromSharesABI) PackOutput(amount, reward *big.Int) ([]byte, error)

func (TransferFromSharesABI) UnpackEvent

func (m TransferFromSharesABI) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingTransferShares, error)

func (TransferFromSharesABI) UnpackInput

func (TransferFromSharesABI) UnpackOutput

func (m TransferFromSharesABI) UnpackOutput(data []byte) (*big.Int, *big.Int, error)

type TransferFromSharesMethod

type TransferFromSharesMethod struct {
	*Keeper
	TransferFromSharesABI
}

func NewTransferFromSharesMethod

func NewTransferFromSharesMethod(keeper *Keeper) *TransferFromSharesMethod

func (*TransferFromSharesMethod) GetMethodId

func (m *TransferFromSharesMethod) GetMethodId() []byte

func (*TransferFromSharesMethod) IsReadonly

func (m *TransferFromSharesMethod) IsReadonly() bool

func (TransferFromSharesMethod) NewTransferShareEvent

func (m TransferFromSharesMethod) NewTransferShareEvent(sender, to common.Address, validator string, shares, amount *big.Int) (data []byte, topic []common.Hash, err error)

func (TransferFromSharesMethod) PackOutput

func (m TransferFromSharesMethod) PackOutput(amount, reward *big.Int) ([]byte, error)

func (*TransferFromSharesMethod) RequiredGas

func (m *TransferFromSharesMethod) RequiredGas() uint64

func (*TransferFromSharesMethod) Run

func (m *TransferFromSharesMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

func (TransferFromSharesMethod) UnpackEvent

func (m TransferFromSharesMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingTransferShares, error)

func (TransferFromSharesMethod) UnpackOutput

func (m TransferFromSharesMethod) UnpackOutput(data []byte) (*big.Int, *big.Int, error)

type TransferSharesABI

type TransferSharesABI struct {
	// contains filtered or unexported fields
}

func NewTransferSharesABI

func NewTransferSharesABI() TransferSharesABI

func (TransferSharesABI) NewTransferShareEvent

func (m TransferSharesABI) NewTransferShareEvent(sender, to common.Address, validator string, shares, amount *big.Int) (data []byte, topic []common.Hash, err error)

func (TransferSharesABI) PackInput

func (m TransferSharesABI) PackInput(args fxcontract.TransferSharesArgs) ([]byte, error)

func (TransferSharesABI) PackOutput

func (m TransferSharesABI) PackOutput(amount, reward *big.Int) ([]byte, error)

func (TransferSharesABI) UnpackEvent

func (m TransferSharesABI) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingTransferShares, error)

func (TransferSharesABI) UnpackInput

func (m TransferSharesABI) UnpackInput(data []byte) (*fxcontract.TransferSharesArgs, error)

func (TransferSharesABI) UnpackOutput

func (m TransferSharesABI) UnpackOutput(data []byte) (*big.Int, *big.Int, error)

type TransferSharesMethod

type TransferSharesMethod struct {
	*Keeper
	TransferSharesABI
}

func NewTransferSharesMethod

func NewTransferSharesMethod(keeper *Keeper) *TransferSharesMethod

func (*TransferSharesMethod) GetMethodId

func (m *TransferSharesMethod) GetMethodId() []byte

func (*TransferSharesMethod) IsReadonly

func (m *TransferSharesMethod) IsReadonly() bool

func (TransferSharesMethod) NewTransferShareEvent

func (m TransferSharesMethod) NewTransferShareEvent(sender, to common.Address, validator string, shares, amount *big.Int) (data []byte, topic []common.Hash, err error)

func (TransferSharesMethod) PackOutput

func (m TransferSharesMethod) PackOutput(amount, reward *big.Int) ([]byte, error)

func (*TransferSharesMethod) RequiredGas

func (m *TransferSharesMethod) RequiredGas() uint64

func (*TransferSharesMethod) Run

func (m *TransferSharesMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

func (TransferSharesMethod) UnpackEvent

func (m TransferSharesMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingTransferShares, error)

func (TransferSharesMethod) UnpackOutput

func (m TransferSharesMethod) UnpackOutput(data []byte) (*big.Int, *big.Int, error)

type UndelegateABI

type UndelegateABI struct {
	abi.Method
	abi.Event
}

func NewUndelegateV2ABI

func NewUndelegateV2ABI() UndelegateABI

func (UndelegateABI) PackInput

func (m UndelegateABI) PackInput(args fxcontract.UndelegateV2Args) ([]byte, error)

func (UndelegateABI) PackOutput

func (m UndelegateABI) PackOutput(result bool) ([]byte, error)

func (UndelegateABI) UnpackEvent

func (UndelegateABI) UnpackInput

func (m UndelegateABI) UnpackInput(data []byte) (*fxcontract.UndelegateV2Args, error)

func (UndelegateABI) UnpackOutput

func (m UndelegateABI) UnpackOutput(data []byte) (bool, error)

type UndelegateV2Method

type UndelegateV2Method struct {
	*Keeper
	UndelegateABI
}

func NewUndelegateV2Method

func NewUndelegateV2Method(keeper *Keeper) *UndelegateV2Method

func (*UndelegateV2Method) GetMethodId

func (m *UndelegateV2Method) GetMethodId() []byte

func (*UndelegateV2Method) IsReadonly

func (m *UndelegateV2Method) IsReadonly() bool

func (*UndelegateV2Method) NewUndelegateEvent

func (m *UndelegateV2Method) NewUndelegateEvent(sender common.Address, validator string, amount *big.Int, completionTime int64) (data []byte, topic []common.Hash, err error)

func (*UndelegateV2Method) RequiredGas

func (m *UndelegateV2Method) RequiredGas() uint64

func (*UndelegateV2Method) Run

func (m *UndelegateV2Method) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

type Validator

type Validator struct {
	ValAddr      string
	MissedBlocks int64
}

type ValidatorListABI

type ValidatorListABI struct {
	abi.Method
}

func NewValidatorListABI

func NewValidatorListABI() ValidatorListABI

func (ValidatorListABI) PackInput

func (m ValidatorListABI) PackInput(args fxcontract.ValidatorListArgs) ([]byte, error)

func (ValidatorListABI) PackOutput

func (m ValidatorListABI) PackOutput(valList []string) ([]byte, error)

func (ValidatorListABI) UnpackInput

func (m ValidatorListABI) UnpackInput(data []byte) (*fxcontract.ValidatorListArgs, error)

func (ValidatorListABI) UnpackOutput

func (m ValidatorListABI) UnpackOutput(data []byte) ([]string, error)

type ValidatorListMethod

type ValidatorListMethod struct {
	*Keeper
	ValidatorListABI
}

func NewValidatorListMethod

func NewValidatorListMethod(keeper *Keeper) *ValidatorListMethod

func (*ValidatorListMethod) GetMethodId

func (m *ValidatorListMethod) GetMethodId() []byte

func (*ValidatorListMethod) IsReadonly

func (m *ValidatorListMethod) IsReadonly() bool

func (*ValidatorListMethod) RequiredGas

func (m *ValidatorListMethod) RequiredGas() uint64

func (*ValidatorListMethod) Run

func (m *ValidatorListMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

type WithdrawABI

type WithdrawABI struct {
	abi.Method
	abi.Event
}

func NewWithdrawABI

func NewWithdrawABI() WithdrawABI

func (WithdrawABI) NewWithdrawEvent

func (m WithdrawABI) NewWithdrawEvent(sender common.Address, validator string, reward *big.Int) (data []byte, topic []common.Hash, err error)

func (WithdrawABI) PackInput

func (m WithdrawABI) PackInput(args fxcontract.WithdrawArgs) ([]byte, error)

func (WithdrawABI) PackOutput

func (m WithdrawABI) PackOutput(reward *big.Int) ([]byte, error)

func (WithdrawABI) UnpackEvent

func (m WithdrawABI) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingWithdraw, error)

func (WithdrawABI) UnpackInput

func (m WithdrawABI) UnpackInput(data []byte) (*fxcontract.WithdrawArgs, error)

func (WithdrawABI) UnpackOutput

func (m WithdrawABI) UnpackOutput(data []byte) (*big.Int, error)

type WithdrawMethod

type WithdrawMethod struct {
	*Keeper
	WithdrawABI
}

func NewWithdrawMethod

func NewWithdrawMethod(keeper *Keeper) *WithdrawMethod

func (*WithdrawMethod) GetMethodId

func (m *WithdrawMethod) GetMethodId() []byte

func (*WithdrawMethod) IsReadonly

func (m *WithdrawMethod) IsReadonly() bool

func (*WithdrawMethod) RequiredGas

func (m *WithdrawMethod) RequiredGas() uint64

func (*WithdrawMethod) Run

func (m *WithdrawMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)

Jump to

Keyboard shortcuts

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