Documentation ¶
Index ¶
- func ApproveSharesEmitEvents(ctx sdk.Context, validator sdk.ValAddress, owner, spender sdk.AccAddress, ...)
- func DelegateEmitEvents(ctx sdk.Context, delegator sdk.AccAddress, validator sdk.ValAddress, ...)
- func EmitEvent(evm *vm.EVM, data []byte, topics []common.Hash)
- func GetABI() abi.ABI
- func GetAddress() common.Address
- func RedelegateEmitEvents(ctx sdk.Context, delegator sdk.AccAddress, ...)
- func TransferSharesEmitEvents(ctx sdk.Context, validator sdk.ValAddress, from, recipient sdk.AccAddress, ...)
- func Undelegate(ctx sdk.Context, sk StakingKeeper, bk BankKeeper, delAddr sdk.AccAddress, ...) (sdkmath.Int, time.Time, error)
- func UndelegateEmitEvents(ctx sdk.Context, delegator sdk.AccAddress, validator sdk.ValAddress, ...)
- func WithdrawEmitEvents(ctx sdk.Context, delegator sdk.AccAddress, amount sdk.Coins)
- type AllowanceSharesMethod
- func (m *AllowanceSharesMethod) GetMethodId() []byte
- func (m *AllowanceSharesMethod) IsReadonly() bool
- func (m *AllowanceSharesMethod) PackInput(args fxstakingtypes.AllowanceSharesArgs) ([]byte, error)
- func (m *AllowanceSharesMethod) PackOutput(amount *big.Int) ([]byte, error)
- func (m *AllowanceSharesMethod) RequiredGas() uint64
- func (m *AllowanceSharesMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *AllowanceSharesMethod) UnpackInput(data []byte) (*fxstakingtypes.AllowanceSharesArgs, error)
- func (m *AllowanceSharesMethod) UnpackOutput(data []byte) (*big.Int, error)
- type ApproveSharesMethod
- func (m *ApproveSharesMethod) GetMethodId() []byte
- func (m *ApproveSharesMethod) IsReadonly() bool
- func (m *ApproveSharesMethod) NewApproveSharesEvent(owner, spender common.Address, validator string, shares *big.Int) (data []byte, topic []common.Hash, err error)
- func (m *ApproveSharesMethod) PackInput(args fxstakingtypes.ApproveSharesArgs) ([]byte, error)
- func (m *ApproveSharesMethod) PackOutput(result bool) ([]byte, error)
- func (m *ApproveSharesMethod) RequiredGas() uint64
- func (m *ApproveSharesMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *ApproveSharesMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingApproveShares, error)
- func (m *ApproveSharesMethod) UnpackInput(data []byte) (*fxstakingtypes.ApproveSharesArgs, error)
- func (m *ApproveSharesMethod) UnpackOutput(data []byte) (bool, error)
- type BankKeeper
- type Contract
- type DelegateMethod
- func (m *DelegateMethod) GetMethodId() []byte
- func (m *DelegateMethod) IsReadonly() bool
- func (m *DelegateMethod) NewDelegateEvent(sender common.Address, validator string, amount, shares *big.Int) (data []byte, topic []common.Hash, err error)
- func (m *DelegateMethod) PackInput(args fxstakingtypes.DelegateArgs) ([]byte, error)
- func (m *DelegateMethod) PackOutput(share, reward *big.Int) ([]byte, error)
- func (m *DelegateMethod) RequiredGas() uint64
- func (m *DelegateMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *DelegateMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingDelegate, error)
- func (m *DelegateMethod) UnpackInput(data []byte) (*fxstakingtypes.DelegateArgs, error)
- func (m *DelegateMethod) UnpackOutput(data []byte) (bool, error)
- type DelegateV2Method
- func (m *DelegateV2Method) GetMethodId() []byte
- func (m *DelegateV2Method) IsReadonly() bool
- func (m *DelegateV2Method) NewDelegateEvent(sender common.Address, validator string, amount *big.Int) (data []byte, topic []common.Hash, err error)
- func (m *DelegateV2Method) PackInput(args fxstakingtypes.DelegateV2Args) ([]byte, error)
- func (m *DelegateV2Method) PackOutput(result bool) ([]byte, error)
- func (m *DelegateV2Method) RequiredGas() uint64
- func (m *DelegateV2Method) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *DelegateV2Method) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingDelegateV2, error)
- func (m *DelegateV2Method) UnpackInput(data []byte) (*fxstakingtypes.DelegateV2Args, error)
- func (m *DelegateV2Method) UnpackOutput(data []byte) (bool, error)
- type DelegationMethod
- func (m *DelegationMethod) GetMethodId() []byte
- func (m *DelegationMethod) IsReadonly() bool
- func (m *DelegationMethod) PackInput(args fxstakingtypes.DelegationArgs) ([]byte, error)
- func (m *DelegationMethod) PackOutput(shares, amount *big.Int) ([]byte, error)
- func (m *DelegationMethod) RequiredGas() uint64
- func (m *DelegationMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *DelegationMethod) UnpackInput(data []byte) (*fxstakingtypes.DelegationArgs, error)
- func (m *DelegationMethod) UnpackOutput(data []byte) (*big.Int, *big.Int, error)
- type DelegationRewardsMethod
- func (m *DelegationRewardsMethod) GetMethodId() []byte
- func (m *DelegationRewardsMethod) IsReadonly() bool
- func (m *DelegationRewardsMethod) PackInput(args fxstakingtypes.DelegationRewardsArgs) ([]byte, error)
- func (m *DelegationRewardsMethod) PackOutput(amount *big.Int) ([]byte, error)
- func (m *DelegationRewardsMethod) RequiredGas() uint64
- func (m *DelegationRewardsMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *DelegationRewardsMethod) UnpackInput(data []byte) (*fxstakingtypes.DelegationRewardsArgs, error)
- func (m *DelegationRewardsMethod) UnpackOutput(data []byte) (*big.Int, error)
- type DistrKeeper
- type EvmKeeper
- type GovKeeper
- type Keeper
- type RedelegateMethodV2
- func (m *RedelegateMethodV2) GetMethodId() []byte
- func (m *RedelegateMethodV2) IsReadonly() bool
- func (m *RedelegateMethodV2) NewRedelegationEvent(sender common.Address, validatorSrc, validatorDst string, amount *big.Int, ...) (data []byte, topic []common.Hash, err error)
- func (m *RedelegateMethodV2) PackInput(args fxstakingtypes.RedelegateV2Args) ([]byte, error)
- func (m *RedelegateMethodV2) PackOutput(result bool) ([]byte, error)
- func (m *RedelegateMethodV2) RequiredGas() uint64
- func (m *RedelegateMethodV2) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *RedelegateMethodV2) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingRedelegateV2, error)
- func (m *RedelegateMethodV2) UnpackInput(data []byte) (*fxstakingtypes.RedelegateV2Args, error)
- func (m *RedelegateMethodV2) UnpackOutput(data []byte) (bool, error)
- type RedelegationMethod
- func (m *RedelegationMethod) GetMethodId() []byte
- func (m *RedelegationMethod) IsReadonly() bool
- func (m *RedelegationMethod) NewRedelegationEvent(sender common.Address, validatorSrc, validatorDst string, ...) (data []byte, topic []common.Hash, err error)
- func (m *RedelegationMethod) PackInput(args fxstakingtypes.RedelegateArgs) ([]byte, error)
- func (m *RedelegationMethod) PackOutput(redelAmount, reward *big.Int, completionTime int64) ([]byte, error)
- func (m *RedelegationMethod) RequiredGas() uint64
- func (m *RedelegationMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *RedelegationMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingRedelegate, error)
- func (m *RedelegationMethod) UnpackInput(data []byte) (*fxstakingtypes.RedelegateArgs, error)
- func (m *RedelegationMethod) UnpackOutput(data []byte) (bool, error)
- type StakingKeeper
- type TransferFromShares
- func (m *TransferFromShares) GetMethodId() []byte
- func (m *TransferFromShares) IsReadonly() bool
- func (m *TransferFromShares) PackInput(args fxstakingtypes.TransferFromSharesArgs) ([]byte, error)
- func (m *TransferFromShares) RequiredGas() uint64
- func (m *TransferFromShares) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *TransferFromShares) UnpackInput(data []byte) (*fxstakingtypes.TransferFromSharesArgs, error)
- type TransferShare
- func (m *TransferShare) NewTransferShareEvent(sender, to common.Address, validator string, shares, amount *big.Int) (data []byte, topic []common.Hash, err error)
- func (m *TransferShare) PackOutput(amount, reward *big.Int) ([]byte, error)
- func (m *TransferShare) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingTransferShares, error)
- func (m *TransferShare) UnpackOutput(data []byte) (*big.Int, *big.Int, error)
- type TransferShares
- func (m *TransferShares) GetMethodId() []byte
- func (m *TransferShares) IsReadonly() bool
- func (m *TransferShares) PackInput(args fxstakingtypes.TransferSharesArgs) ([]byte, error)
- func (m *TransferShares) RequiredGas() uint64
- func (m *TransferShares) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *TransferShares) UnpackInput(data []byte) (*fxstakingtypes.TransferSharesArgs, error)
- type UndelegateMethod
- func (m *UndelegateMethod) GetMethodId() []byte
- func (m *UndelegateMethod) IsReadonly() bool
- func (m *UndelegateMethod) NewUndelegateEvent(sender common.Address, validator string, shares, amount *big.Int, ...) (data []byte, topic []common.Hash, err error)
- func (m *UndelegateMethod) PackInput(args fxstakingtypes.UndelegateArgs) ([]byte, error)
- func (m *UndelegateMethod) PackOutput(undelAmount, reward *big.Int, completionTime int64) ([]byte, error)
- func (m *UndelegateMethod) RequiredGas() uint64
- func (m *UndelegateMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *UndelegateMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingUndelegate, error)
- func (m *UndelegateMethod) UnpackInput(data []byte) (*fxstakingtypes.UndelegateArgs, error)
- func (m *UndelegateMethod) UnpackOutput(data []byte) (bool, error)
- type UndelegateV2Method
- func (m *UndelegateV2Method) GetMethodId() []byte
- func (m *UndelegateV2Method) IsReadonly() bool
- func (m *UndelegateV2Method) NewUndelegateEvent(sender common.Address, validator string, amount *big.Int, completionTime int64) (data []byte, topic []common.Hash, err error)
- func (m *UndelegateV2Method) PackInput(args fxstakingtypes.UndelegateV2Args) ([]byte, error)
- func (m *UndelegateV2Method) PackOutput(result bool) ([]byte, error)
- func (m *UndelegateV2Method) RequiredGas() uint64
- func (m *UndelegateV2Method) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *UndelegateV2Method) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingUndelegateV2, error)
- func (m *UndelegateV2Method) UnpackInput(data []byte) (*fxstakingtypes.UndelegateV2Args, error)
- func (m *UndelegateV2Method) UnpackOutput(data []byte) (bool, error)
- type WithdrawMethod
- func (m *WithdrawMethod) GetMethodId() []byte
- func (m *WithdrawMethod) IsReadonly() bool
- func (m *WithdrawMethod) NewWithdrawEvent(sender common.Address, validator string, reward *big.Int) (data []byte, topic []common.Hash, err error)
- func (m *WithdrawMethod) PackInput(args fxstakingtypes.WithdrawArgs) ([]byte, error)
- func (m *WithdrawMethod) PackOutput(reward *big.Int) ([]byte, error)
- func (m *WithdrawMethod) RequiredGas() uint64
- func (m *WithdrawMethod) Run(evm *vm.EVM, contract *vm.Contract) ([]byte, error)
- func (m *WithdrawMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingWithdraw, error)
- func (m *WithdrawMethod) UnpackInput(data []byte) (*fxstakingtypes.WithdrawArgs, error)
- func (m *WithdrawMethod) UnpackOutput(data []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApproveSharesEmitEvents ¶
func ApproveSharesEmitEvents(ctx sdk.Context, validator sdk.ValAddress, owner, spender sdk.AccAddress, shares sdkmath.Int)
func DelegateEmitEvents ¶
func DelegateEmitEvents(ctx sdk.Context, delegator sdk.AccAddress, validator sdk.ValAddress, amount *big.Int, newShares sdk.Dec)
func GetAddress ¶
func RedelegateEmitEvents ¶
func RedelegateEmitEvents(ctx sdk.Context, delegator sdk.AccAddress, validatorSrc, validatorDst sdk.ValAddress, amount sdkmath.Int, completionTime time.Time)
func TransferSharesEmitEvents ¶
func TransferSharesEmitEvents(ctx sdk.Context, validator sdk.ValAddress, from, recipient sdk.AccAddress, shares, token sdkmath.Int)
func Undelegate ¶
func Undelegate(ctx sdk.Context, sk StakingKeeper, bk BankKeeper, delAddr sdk.AccAddress, valAddr sdk.ValAddress, shares sdk.Dec, bondDenom string, ) (sdkmath.Int, time.Time, error)
func UndelegateEmitEvents ¶
func UndelegateEmitEvents(ctx sdk.Context, delegator sdk.AccAddress, validator sdk.ValAddress, amount sdkmath.Int, completionTime time.Time)
func WithdrawEmitEvents ¶
Types ¶
type AllowanceSharesMethod ¶
type AllowanceSharesMethod struct {}
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) PackInput ¶
func (m *AllowanceSharesMethod) PackInput(args fxstakingtypes.AllowanceSharesArgs) ([]byte, error)
func (*AllowanceSharesMethod) PackOutput ¶
func (m *AllowanceSharesMethod) PackOutput(amount *big.Int) ([]byte, error)
func (*AllowanceSharesMethod) RequiredGas ¶
func (m *AllowanceSharesMethod) RequiredGas() uint64
func (*AllowanceSharesMethod) UnpackInput ¶
func (m *AllowanceSharesMethod) UnpackInput(data []byte) (*fxstakingtypes.AllowanceSharesArgs, error)
func (*AllowanceSharesMethod) UnpackOutput ¶
func (m *AllowanceSharesMethod) UnpackOutput(data []byte) (*big.Int, error)
type ApproveSharesMethod ¶
type ApproveSharesMethod struct {}
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) NewApproveSharesEvent ¶
func (*ApproveSharesMethod) PackInput ¶
func (m *ApproveSharesMethod) PackInput(args fxstakingtypes.ApproveSharesArgs) ([]byte, error)
func (*ApproveSharesMethod) PackOutput ¶
func (m *ApproveSharesMethod) PackOutput(result bool) ([]byte, error)
func (*ApproveSharesMethod) RequiredGas ¶
func (m *ApproveSharesMethod) RequiredGas() uint64
func (*ApproveSharesMethod) UnpackEvent ¶
func (m *ApproveSharesMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingApproveShares, error)
func (*ApproveSharesMethod) UnpackInput ¶
func (m *ApproveSharesMethod) UnpackInput(data []byte) (*fxstakingtypes.ApproveSharesArgs, error)
func (*ApproveSharesMethod) UnpackOutput ¶
func (m *ApproveSharesMethod) UnpackOutput(data []byte) (bool, error)
type BankKeeper ¶
type BankKeeper interface { SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, recipientAddr sdk.AccAddress, senderModule string, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin }
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
func NewPrecompiledContract ¶
func NewPrecompiledContract( bankKeeper BankKeeper, stakingKeeper *fxstakingkeeper.Keeper, distrKeeper distrkeeper.Keeper, stakingDenom string, govKeeper GovKeeper, ) *Contract
func (*Contract) IsStateful ¶
func (*Contract) RequiredGas ¶
type DelegateMethod ¶
func NewDelegateMethod ¶
func NewDelegateMethod(keeper *Keeper) *DelegateMethod
func (*DelegateMethod) GetMethodId ¶
func (m *DelegateMethod) GetMethodId() []byte
func (*DelegateMethod) IsReadonly ¶
func (m *DelegateMethod) IsReadonly() bool
func (*DelegateMethod) NewDelegateEvent ¶
func (*DelegateMethod) PackInput ¶
func (m *DelegateMethod) PackInput(args fxstakingtypes.DelegateArgs) ([]byte, error)
func (*DelegateMethod) PackOutput ¶
func (m *DelegateMethod) PackOutput(share, reward *big.Int) ([]byte, error)
func (*DelegateMethod) RequiredGas ¶
func (m *DelegateMethod) RequiredGas() uint64
func (*DelegateMethod) UnpackEvent ¶
func (m *DelegateMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingDelegate, error)
func (*DelegateMethod) UnpackInput ¶
func (m *DelegateMethod) UnpackInput(data []byte) (*fxstakingtypes.DelegateArgs, error)
func (*DelegateMethod) UnpackOutput ¶
func (m *DelegateMethod) UnpackOutput(data []byte) (bool, error)
type DelegateV2Method ¶
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) NewDelegateEvent ¶
func (*DelegateV2Method) PackInput ¶
func (m *DelegateV2Method) PackInput(args fxstakingtypes.DelegateV2Args) ([]byte, error)
func (*DelegateV2Method) PackOutput ¶
func (m *DelegateV2Method) PackOutput(result bool) ([]byte, error)
func (*DelegateV2Method) RequiredGas ¶
func (m *DelegateV2Method) RequiredGas() uint64
func (*DelegateV2Method) UnpackEvent ¶
func (m *DelegateV2Method) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingDelegateV2, error)
func (*DelegateV2Method) UnpackInput ¶
func (m *DelegateV2Method) UnpackInput(data []byte) (*fxstakingtypes.DelegateV2Args, error)
func (*DelegateV2Method) UnpackOutput ¶
func (m *DelegateV2Method) UnpackOutput(data []byte) (bool, error)
type DelegationMethod ¶
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) PackInput ¶
func (m *DelegationMethod) PackInput(args fxstakingtypes.DelegationArgs) ([]byte, error)
func (*DelegationMethod) PackOutput ¶
func (m *DelegationMethod) PackOutput(shares, amount *big.Int) ([]byte, error)
func (*DelegationMethod) RequiredGas ¶
func (m *DelegationMethod) RequiredGas() uint64
func (*DelegationMethod) UnpackInput ¶
func (m *DelegationMethod) UnpackInput(data []byte) (*fxstakingtypes.DelegationArgs, error)
func (*DelegationMethod) UnpackOutput ¶
type DelegationRewardsMethod ¶
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) PackInput ¶
func (m *DelegationRewardsMethod) PackInput(args fxstakingtypes.DelegationRewardsArgs) ([]byte, error)
func (*DelegationRewardsMethod) PackOutput ¶
func (m *DelegationRewardsMethod) PackOutput(amount *big.Int) ([]byte, error)
func (*DelegationRewardsMethod) RequiredGas ¶
func (m *DelegationRewardsMethod) RequiredGas() uint64
func (*DelegationRewardsMethod) UnpackInput ¶
func (m *DelegationRewardsMethod) UnpackInput(data []byte) (*fxstakingtypes.DelegationRewardsArgs, error)
func (*DelegationRewardsMethod) UnpackOutput ¶
func (m *DelegationRewardsMethod) UnpackOutput(data []byte) (*big.Int, error)
type DistrKeeper ¶
type DistrKeeper interface { GetDelegatorWithdrawAddr(ctx sdk.Context, delAddr sdk.AccAddress) sdk.AccAddress IncrementValidatorPeriod(ctx sdk.Context, val stakingtypes.ValidatorI) uint64 CalculateDelegationRewards(ctx sdk.Context, val stakingtypes.ValidatorI, del stakingtypes.DelegationI, endingPeriod uint64) (rewards sdk.DecCoins) GetDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress) (period distrtypes.DelegatorStartingInfo) SetDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress, period distrtypes.DelegatorStartingInfo) DeleteDelegatorStartingInfo(ctx sdk.Context, val sdk.ValAddress, del sdk.AccAddress) GetValidatorCurrentRewards(ctx sdk.Context, val sdk.ValAddress) (rewards distrtypes.ValidatorCurrentRewards) GetValidatorHistoricalRewards(ctx sdk.Context, val sdk.ValAddress, period uint64) (rewards distrtypes.ValidatorHistoricalRewards) SetValidatorHistoricalRewards(ctx sdk.Context, val sdk.ValAddress, period uint64, rewards distrtypes.ValidatorHistoricalRewards) DeleteValidatorHistoricalReward(ctx sdk.Context, val sdk.ValAddress, period uint64) }
type RedelegateMethodV2 ¶
func NewRedelegateV2Method ¶
func NewRedelegateV2Method(keeper *Keeper) *RedelegateMethodV2
func (*RedelegateMethodV2) GetMethodId ¶
func (m *RedelegateMethodV2) GetMethodId() []byte
func (*RedelegateMethodV2) IsReadonly ¶
func (m *RedelegateMethodV2) IsReadonly() bool
func (*RedelegateMethodV2) NewRedelegationEvent ¶
func (*RedelegateMethodV2) PackInput ¶
func (m *RedelegateMethodV2) PackInput(args fxstakingtypes.RedelegateV2Args) ([]byte, error)
func (*RedelegateMethodV2) PackOutput ¶
func (m *RedelegateMethodV2) PackOutput(result bool) ([]byte, error)
func (*RedelegateMethodV2) RequiredGas ¶
func (m *RedelegateMethodV2) RequiredGas() uint64
func (*RedelegateMethodV2) UnpackEvent ¶
func (m *RedelegateMethodV2) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingRedelegateV2, error)
func (*RedelegateMethodV2) UnpackInput ¶
func (m *RedelegateMethodV2) UnpackInput(data []byte) (*fxstakingtypes.RedelegateV2Args, error)
func (*RedelegateMethodV2) UnpackOutput ¶
func (m *RedelegateMethodV2) UnpackOutput(data []byte) (bool, error)
type RedelegationMethod ¶
func NewRedelegationMethod ¶
func NewRedelegationMethod(keeper *Keeper) *RedelegationMethod
func (*RedelegationMethod) GetMethodId ¶
func (m *RedelegationMethod) GetMethodId() []byte
func (*RedelegationMethod) IsReadonly ¶
func (m *RedelegationMethod) IsReadonly() bool
func (*RedelegationMethod) NewRedelegationEvent ¶
func (*RedelegationMethod) PackInput ¶
func (m *RedelegationMethod) PackInput(args fxstakingtypes.RedelegateArgs) ([]byte, error)
func (*RedelegationMethod) PackOutput ¶
func (*RedelegationMethod) RequiredGas ¶
func (m *RedelegationMethod) RequiredGas() uint64
func (*RedelegationMethod) UnpackEvent ¶
func (m *RedelegationMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingRedelegate, error)
func (*RedelegationMethod) UnpackInput ¶
func (m *RedelegationMethod) UnpackInput(data []byte) (*fxstakingtypes.RedelegateArgs, error)
func (*RedelegationMethod) UnpackOutput ¶
func (m *RedelegationMethod) UnpackOutput(data []byte) (bool, error)
type StakingKeeper ¶
type StakingKeeper interface { GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation stakingtypes.Delegation, found bool) SetDelegation(ctx sdk.Context, delegation stakingtypes.Delegation) RemoveDelegation(ctx sdk.Context, delegation stakingtypes.Delegation) error GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) Delegate(ctx sdk.Context, delAddr sdk.AccAddress, bondAmt sdkmath.Int, tokenSrc stakingtypes.BondStatus, validator stakingtypes.Validator, subtractAccount bool) (newShares sdk.Dec, err error) HasMaxUnbondingDelegationEntries(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress) bool Unbond(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, shares sdk.Dec) (amount sdkmath.Int, err error) UnbondingTime(ctx sdk.Context) (res time.Duration) SetUnbondingDelegationEntry(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, creationHeight int64, minTime time.Time, balance sdkmath.Int) stakingtypes.UnbondingDelegation InsertUBDQueue(ctx sdk.Context, ubd stakingtypes.UnbondingDelegation, completionTime time.Time) GetAllowance(ctx sdk.Context, valAddr sdk.ValAddress, owner, spender sdk.AccAddress) *big.Int SetAllowance(ctx sdk.Context, valAddr sdk.ValAddress, owner, spender sdk.AccAddress, shares *big.Int) HasReceivingRedelegation(ctx sdk.Context, delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) bool BeginRedelegation( ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, sharesAmount sdk.Dec, ) (completionTime time.Time, err error) }
type TransferFromShares ¶
type TransferFromShares struct {
}func NewTransferFromSharesMethod ¶
func NewTransferFromSharesMethod(keeper *Keeper) *TransferFromShares
func (*TransferFromShares) GetMethodId ¶
func (m *TransferFromShares) GetMethodId() []byte
func (*TransferFromShares) IsReadonly ¶
func (m *TransferFromShares) IsReadonly() bool
func (*TransferFromShares) PackInput ¶
func (m *TransferFromShares) PackInput(args fxstakingtypes.TransferFromSharesArgs) ([]byte, error)
func (*TransferFromShares) RequiredGas ¶
func (m *TransferFromShares) RequiredGas() uint64
func (*TransferFromShares) UnpackInput ¶
func (m *TransferFromShares) UnpackInput(data []byte) (*fxstakingtypes.TransferFromSharesArgs, error)
type TransferShare ¶
type TransferShare struct {}
func (*TransferShare) NewTransferShareEvent ¶
func (*TransferShare) PackOutput ¶
func (m *TransferShare) PackOutput(amount, reward *big.Int) ([]byte, error)
func (*TransferShare) UnpackEvent ¶
func (m *TransferShare) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingTransferShares, error)
func (*TransferShare) UnpackOutput ¶
type TransferShares ¶
type TransferShares struct {
}func NewTransferSharesMethod ¶
func NewTransferSharesMethod(keeper *Keeper) *TransferShares
func (*TransferShares) GetMethodId ¶
func (m *TransferShares) GetMethodId() []byte
func (*TransferShares) IsReadonly ¶
func (m *TransferShares) IsReadonly() bool
func (*TransferShares) PackInput ¶
func (m *TransferShares) PackInput(args fxstakingtypes.TransferSharesArgs) ([]byte, error)
func (*TransferShares) RequiredGas ¶
func (m *TransferShares) RequiredGas() uint64
func (*TransferShares) UnpackInput ¶
func (m *TransferShares) UnpackInput(data []byte) (*fxstakingtypes.TransferSharesArgs, error)
type UndelegateMethod ¶
func NewUndelegateMethod ¶
func NewUndelegateMethod(keeper *Keeper) *UndelegateMethod
func (*UndelegateMethod) GetMethodId ¶
func (m *UndelegateMethod) GetMethodId() []byte
func (*UndelegateMethod) IsReadonly ¶
func (m *UndelegateMethod) IsReadonly() bool
func (*UndelegateMethod) NewUndelegateEvent ¶
func (*UndelegateMethod) PackInput ¶
func (m *UndelegateMethod) PackInput(args fxstakingtypes.UndelegateArgs) ([]byte, error)
func (*UndelegateMethod) PackOutput ¶
func (*UndelegateMethod) RequiredGas ¶
func (m *UndelegateMethod) RequiredGas() uint64
func (*UndelegateMethod) UnpackEvent ¶
func (m *UndelegateMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingUndelegate, error)
func (*UndelegateMethod) UnpackInput ¶
func (m *UndelegateMethod) UnpackInput(data []byte) (*fxstakingtypes.UndelegateArgs, error)
func (*UndelegateMethod) UnpackOutput ¶
func (m *UndelegateMethod) UnpackOutput(data []byte) (bool, error)
type UndelegateV2Method ¶
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 (*UndelegateV2Method) PackInput ¶
func (m *UndelegateV2Method) PackInput(args fxstakingtypes.UndelegateV2Args) ([]byte, error)
func (*UndelegateV2Method) PackOutput ¶
func (m *UndelegateV2Method) PackOutput(result bool) ([]byte, error)
func (*UndelegateV2Method) RequiredGas ¶
func (m *UndelegateV2Method) RequiredGas() uint64
func (*UndelegateV2Method) UnpackEvent ¶
func (m *UndelegateV2Method) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingUndelegateV2, error)
func (*UndelegateV2Method) UnpackInput ¶
func (m *UndelegateV2Method) UnpackInput(data []byte) (*fxstakingtypes.UndelegateV2Args, error)
func (*UndelegateV2Method) UnpackOutput ¶
func (m *UndelegateV2Method) UnpackOutput(data []byte) (bool, error)
type WithdrawMethod ¶
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) NewWithdrawEvent ¶
func (*WithdrawMethod) PackInput ¶
func (m *WithdrawMethod) PackInput(args fxstakingtypes.WithdrawArgs) ([]byte, error)
func (*WithdrawMethod) PackOutput ¶
func (m *WithdrawMethod) PackOutput(reward *big.Int) ([]byte, error)
func (*WithdrawMethod) RequiredGas ¶
func (m *WithdrawMethod) RequiredGas() uint64
func (*WithdrawMethod) UnpackEvent ¶
func (m *WithdrawMethod) UnpackEvent(log *ethtypes.Log) (*fxcontract.IStakingWithdraw, error)
func (*WithdrawMethod) UnpackInput ¶
func (m *WithdrawMethod) UnpackInput(data []byte) (*fxstakingtypes.WithdrawArgs, error)
func (*WithdrawMethod) UnpackOutput ¶
func (m *WithdrawMethod) UnpackOutput(data []byte) (bool, error)
Click to show internal directories.
Click to hide internal directories.