Documentation
¶
Index ¶
- Constants
- Variables
- func NewCommunityPoolRequest(args []interface{}) (*distributiontypes.QueryCommunityPoolRequest, error)
- func NewDelegationRewardsRequest(args []interface{}, addrCdc address.Codec) (*distributiontypes.QueryDelegationRewardsRequest, error)
- func NewDelegationTotalRewardsRequest(args []interface{}, addrCdc address.Codec) (*distributiontypes.QueryDelegationTotalRewardsRequest, error)
- func NewDelegatorValidatorsRequest(args []interface{}, addrCdc address.Codec) (*distributiontypes.QueryDelegatorValidatorsRequest, error)
- func NewDelegatorWithdrawAddressRequest(args []interface{}, addrCdc address.Codec) (*distributiontypes.QueryDelegatorWithdrawAddressRequest, error)
- func NewMsgDepositValidatorRewardsPool(args []interface{}, addrCdc address.Codec) (*distributiontypes.MsgDepositValidatorRewardsPool, common.Address, error)
- func NewMsgFundCommunityPool(args []interface{}, addrCdc address.Codec) (*distributiontypes.MsgFundCommunityPool, common.Address, error)
- func NewMsgSetWithdrawAddress(args []interface{}, addrCdc address.Codec) (*distributiontypes.MsgSetWithdrawAddress, common.Address, error)
- func NewMsgWithdrawDelegatorReward(args []interface{}, addrCdc address.Codec) (*distributiontypes.MsgWithdrawDelegatorReward, common.Address, error)
- func NewMsgWithdrawValidatorCommission(args []interface{}) (*distributiontypes.MsgWithdrawValidatorCommission, common.Address, error)
- func NewValidatorCommissionRequest(args []interface{}) (*distributiontypes.QueryValidatorCommissionRequest, error)
- func NewValidatorDistributionInfoRequest(args []interface{}) (*distributiontypes.QueryValidatorDistributionInfoRequest, error)
- func NewValidatorOutstandingRewardsRequest(args []interface{}) (*distributiontypes.QueryValidatorOutstandingRewardsRequest, error)
- func NewValidatorSlashesRequest(method *abi.Method, args []interface{}) (*distributiontypes.QueryValidatorSlashesRequest, error)
- type CommunityPoolOutput
- type DelegationDelegatorReward
- type DelegationTotalRewardsOutput
- type EventClaimRewards
- type EventDepositValidatorRewardsPool
- type EventFundCommunityPool
- type EventSetWithdrawAddress
- type EventWithdrawDelegatorReward
- type EventWithdrawValidatorRewards
- type Precompile
- func (p *Precompile) ClaimRewards(ctx sdk.Context, contract *vm.Contract, stateDB vm.StateDB, method *abi.Method, ...) ([]byte, error)
- func (p Precompile) CommunityPool(ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}) ([]byte, error)
- func (p Precompile) DelegationRewards(ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}) ([]byte, error)
- func (p Precompile) DelegationTotalRewards(ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}) ([]byte, error)
- func (p Precompile) DelegatorValidators(ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}) ([]byte, error)
- func (p Precompile) DelegatorWithdrawAddress(ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}) ([]byte, error)
- func (p *Precompile) DepositValidatorRewardsPool(ctx sdk.Context, contract *vm.Contract, stateDB vm.StateDB, method *abi.Method, ...) ([]byte, error)
- func (p Precompile) EmitClaimRewardsEvent(ctx sdk.Context, stateDB vm.StateDB, delegatorAddress common.Address, ...) error
- func (p Precompile) EmitDepositValidatorRewardsPoolEvent(ctx sdk.Context, stateDB vm.StateDB, depositor common.Address, ...) error
- func (p Precompile) EmitFundCommunityPoolEvent(ctx sdk.Context, stateDB vm.StateDB, depositor common.Address, coins sdk.Coins) error
- func (p Precompile) EmitSetWithdrawAddressEvent(ctx sdk.Context, stateDB vm.StateDB, caller common.Address, ...) error
- func (p Precompile) EmitWithdrawDelegatorRewardEvent(ctx sdk.Context, stateDB vm.StateDB, delegatorAddress common.Address, ...) error
- func (p Precompile) EmitWithdrawValidatorCommissionEvent(ctx sdk.Context, stateDB vm.StateDB, validatorAddress string, coins sdk.Coins) error
- func (p Precompile) Execute(ctx sdk.Context, stateDB vm.StateDB, contract *vm.Contract, readOnly bool) ([]byte, error)
- func (p *Precompile) FundCommunityPool(ctx sdk.Context, contract *vm.Contract, stateDB vm.StateDB, method *abi.Method, ...) ([]byte, error)
- func (Precompile) IsTransaction(method *abi.Method) bool
- func (p Precompile) RequiredGas(input []byte) uint64
- func (p Precompile) Run(evm *vm.EVM, contract *vm.Contract, readonly bool) ([]byte, error)
- func (p Precompile) SetWithdrawAddress(ctx sdk.Context, contract *vm.Contract, stateDB vm.StateDB, method *abi.Method, ...) ([]byte, error)
- func (p Precompile) ValidatorCommission(ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}) ([]byte, error)
- func (p Precompile) ValidatorDistributionInfo(ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}) ([]byte, error)
- func (p Precompile) ValidatorOutstandingRewards(ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}) ([]byte, error)
- func (p Precompile) ValidatorSlashes(ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}) ([]byte, error)
- func (p *Precompile) WithdrawDelegatorReward(ctx sdk.Context, contract *vm.Contract, stateDB vm.StateDB, method *abi.Method, ...) ([]byte, error)
- func (p *Precompile) WithdrawValidatorCommission(ctx sdk.Context, contract *vm.Contract, stateDB vm.StateDB, method *abi.Method, ...) ([]byte, error)
- type ValidatorDistributionInfo
- type ValidatorDistributionInfoOutput
- type ValidatorSlashEvent
- type ValidatorSlashesInput
- type ValidatorSlashesOutput
Constants ¶
const ( // ErrDifferentValidator is raised when the origin address is not the same as the validator address. ErrDifferentValidator = "origin address %s is not the same as validator address %s" // ErrInvalidAmount is raised when the given sdk coins amount is invalid ErrInvalidAmount = "invalid amount %s" )
const ( // EventTypeSetWithdrawAddress defines the event type for the distribution SetWithdrawAddressMethod transaction. EventTypeSetWithdrawAddress = "SetWithdrawerAddress" // EventTypeWithdrawDelegatorReward defines the event type for the distribution WithdrawDelegatorRewardMethod transaction. EventTypeWithdrawDelegatorReward = "WithdrawDelegatorReward" // EventTypeWithdrawValidatorCommission defines the event type for the distribution WithdrawValidatorCommissionMethod transaction. EventTypeWithdrawValidatorCommission = "WithdrawValidatorCommission" // EventTypeFundCommunityPool defines the event type for the distribution FundCommunityPoolMethod transaction. EventTypeFundCommunityPool = "FundCommunityPool" // EventTypeClaimRewards defines the event type for the distribution ClaimRewardsMethod transaction. EventTypeClaimRewards = "ClaimRewards" // EventTypeDepositValidatorRewardsPool defines the event type for the distribution DepositValidatorRewardsPoolMethod transaction. EventTypeDepositValidatorRewardsPool = "DepositValidatorRewardsPool" )
const ( // ValidatorDistributionInfoMethod defines the ABI method name for the // ValidatorDistributionInfo query. ValidatorDistributionInfoMethod = "validatorDistributionInfo" // ValidatorOutstandingRewardsMethod defines the ABI method name for the // ValidatorOutstandingRewards query. ValidatorOutstandingRewardsMethod = "validatorOutstandingRewards" // ValidatorCommissionMethod defines the ABI method name for the // ValidatorCommission query. ValidatorCommissionMethod = "validatorCommission" // ValidatorSlashesMethod defines the ABI method name for the // ValidatorSlashes query. ValidatorSlashesMethod = "validatorSlashes" // DelegationRewardsMethod defines the ABI method name for the // DelegationRewards query. DelegationRewardsMethod = "delegationRewards" // DelegationTotalRewardsMethod defines the ABI method name for the // DelegationTotalRewards query. DelegationTotalRewardsMethod = "delegationTotalRewards" // DelegatorValidatorsMethod defines the ABI method name for the // DelegatorValidators query. DelegatorValidatorsMethod = "delegatorValidators" // DelegatorWithdrawAddressMethod defines the ABI method name for the // DelegatorWithdrawAddress query. DelegatorWithdrawAddressMethod = "delegatorWithdrawAddress" // CommunityPoolMethod defines the ABI method name for the // CommunityPool query. CommunityPoolMethod = "communityPool" )
const ( // SetWithdrawAddressMethod defines the ABI method name for the distribution // SetWithdrawAddress transaction. SetWithdrawAddressMethod = "setWithdrawAddress" // WithdrawDelegatorRewardMethod defines the ABI method name for the distribution // WithdrawDelegatorReward transaction. WithdrawDelegatorRewardMethod = "withdrawDelegatorRewards" // WithdrawValidatorCommissionMethod defines the ABI method name for the distribution // WithdrawValidatorCommission transaction. WithdrawValidatorCommissionMethod = "withdrawValidatorCommission" // FundCommunityPoolMethod defines the ABI method name for the fundCommunityPool transaction FundCommunityPoolMethod = "fundCommunityPool" // ClaimRewardsMethod defines the ABI method name for the custom ClaimRewards transaction ClaimRewardsMethod = "claimRewards" // DepositValidatorRewardsPoolMethod defines the ABI method name for the distribution // DepositValidatorRewardsPool transaction DepositValidatorRewardsPoolMethod = "depositValidatorRewardsPool" )
Variables ¶
var (
ABI abi.ABI
)
Functions ¶
func NewCommunityPoolRequest ¶ added in v0.3.0
func NewCommunityPoolRequest(args []interface{}) (*distributiontypes.QueryCommunityPoolRequest, error)
NewCommunityPoolRequest creates a new QueryCommunityPoolRequest instance and does sanity checks on the provided arguments.
func NewDelegationRewardsRequest ¶
func NewDelegationRewardsRequest(args []interface{}, addrCdc address.Codec) (*distributiontypes.QueryDelegationRewardsRequest, error)
NewDelegationRewardsRequest creates a new QueryDelegationRewardsRequest instance and does sanity checks on the provided arguments.
func NewDelegationTotalRewardsRequest ¶
func NewDelegationTotalRewardsRequest(args []interface{}, addrCdc address.Codec) (*distributiontypes.QueryDelegationTotalRewardsRequest, error)
NewDelegationTotalRewardsRequest creates a new QueryDelegationTotalRewardsRequest instance and does sanity checks on the provided arguments.
func NewDelegatorValidatorsRequest ¶
func NewDelegatorValidatorsRequest(args []interface{}, addrCdc address.Codec) (*distributiontypes.QueryDelegatorValidatorsRequest, error)
NewDelegatorValidatorsRequest creates a new QueryDelegatorValidatorsRequest instance and does sanity checks on the provided arguments.
func NewDelegatorWithdrawAddressRequest ¶
func NewDelegatorWithdrawAddressRequest(args []interface{}, addrCdc address.Codec) (*distributiontypes.QueryDelegatorWithdrawAddressRequest, error)
NewDelegatorWithdrawAddressRequest creates a new QueryDelegatorWithdrawAddressRequest instance and does sanity checks on the provided arguments.
func NewMsgDepositValidatorRewardsPool ¶ added in v0.3.0
func NewMsgDepositValidatorRewardsPool(args []interface{}, addrCdc address.Codec) (*distributiontypes.MsgDepositValidatorRewardsPool, common.Address, error)
NewMsgDepositValidatorRewardsPool creates a new MsgDepositValidatorRewardsPool message.
func NewMsgFundCommunityPool ¶
func NewMsgFundCommunityPool(args []interface{}, addrCdc address.Codec) (*distributiontypes.MsgFundCommunityPool, common.Address, error)
NewMsgFundCommunityPool creates a new NewMsgFundCommunityPool message.
func NewMsgSetWithdrawAddress ¶
func NewMsgSetWithdrawAddress(args []interface{}, addrCdc address.Codec) (*distributiontypes.MsgSetWithdrawAddress, common.Address, error)
NewMsgSetWithdrawAddress creates a new MsgSetWithdrawAddress instance.
func NewMsgWithdrawDelegatorReward ¶
func NewMsgWithdrawDelegatorReward(args []interface{}, addrCdc address.Codec) (*distributiontypes.MsgWithdrawDelegatorReward, common.Address, error)
NewMsgWithdrawDelegatorReward creates a new MsgWithdrawDelegatorReward instance.
func NewMsgWithdrawValidatorCommission ¶
func NewMsgWithdrawValidatorCommission(args []interface{}) (*distributiontypes.MsgWithdrawValidatorCommission, common.Address, error)
NewMsgWithdrawValidatorCommission creates a new MsgWithdrawValidatorCommission message.
func NewValidatorCommissionRequest ¶
func NewValidatorCommissionRequest(args []interface{}) (*distributiontypes.QueryValidatorCommissionRequest, error)
NewValidatorCommissionRequest creates a new QueryValidatorCommissionRequest instance and does sanity checks on the provided arguments.
func NewValidatorDistributionInfoRequest ¶
func NewValidatorDistributionInfoRequest(args []interface{}) (*distributiontypes.QueryValidatorDistributionInfoRequest, error)
NewValidatorDistributionInfoRequest creates a new QueryValidatorDistributionInfoRequest instance and does sanity checks on the provided arguments.
func NewValidatorOutstandingRewardsRequest ¶
func NewValidatorOutstandingRewardsRequest(args []interface{}) (*distributiontypes.QueryValidatorOutstandingRewardsRequest, error)
NewValidatorOutstandingRewardsRequest creates a new QueryValidatorOutstandingRewardsRequest instance and does sanity checks on the provided arguments.
func NewValidatorSlashesRequest ¶
func NewValidatorSlashesRequest(method *abi.Method, args []interface{}) (*distributiontypes.QueryValidatorSlashesRequest, error)
NewValidatorSlashesRequest creates a new QueryValidatorSlashesRequest instance and does sanity checks on the provided arguments.
Types ¶
type CommunityPoolOutput ¶ added in v0.3.0
CommunityPoolOutput is a struct to represent the key information from a CommunityPool response.
func (*CommunityPoolOutput) FromResponse ¶ added in v0.3.0
func (cp *CommunityPoolOutput) FromResponse(res *distributiontypes.QueryCommunityPoolResponse) *CommunityPoolOutput
FromResponse populates the CommunityPoolOutput from a QueryCommunityPoolResponse.
type DelegationDelegatorReward ¶
DelegationDelegatorReward is a struct to represent the key information from a query for the rewards of a delegation to a given validator.
type DelegationTotalRewardsOutput ¶
type DelegationTotalRewardsOutput struct {
Rewards []DelegationDelegatorReward
Total []cmn.DecCoin
}
DelegationTotalRewardsOutput is a struct to represent the key information from a DelegationTotalRewards response.
func (*DelegationTotalRewardsOutput) FromResponse ¶
func (dtr *DelegationTotalRewardsOutput) FromResponse(res *distributiontypes.QueryDelegationTotalRewardsResponse) *DelegationTotalRewardsOutput
FromResponse populates the DelegationTotalRewardsOutput from a QueryDelegationTotalRewardsResponse.
type EventClaimRewards ¶
EventClaimRewards defines the event data for the ClaimRewards transaction.
type EventDepositValidatorRewardsPool ¶ added in v0.3.0
type EventDepositValidatorRewardsPool struct {
Depositor common.Address
ValidatorAddress common.Address
Denom string
Amount *big.Int
}
EventDepositValidatorRewardsPool defines the event data for the DepositValidatorRewardsPool transaction.
type EventFundCommunityPool ¶
EventFundCommunityPool defines the event data for the FundCommunityPool transaction.
type EventSetWithdrawAddress ¶
EventSetWithdrawAddress defines the event data for the SetWithdrawAddress transaction.
type EventWithdrawDelegatorReward ¶ added in v0.3.0
type EventWithdrawDelegatorReward struct {
DelegatorAddress common.Address
ValidatorAddress common.Address
Amount *big.Int
}
EventWithdrawDelegatorReward defines the event data for the WithdrawDelegatorReward transaction.
type EventWithdrawValidatorRewards ¶
EventWithdrawValidatorRewards defines the event data for the WithdrawValidatorRewards transaction.
type Precompile ¶
type Precompile struct {
cmn.Precompile
abi.ABI
// contains filtered or unexported fields
}
Precompile defines the precompiled contract for distribution.
func NewPrecompile ¶
func NewPrecompile( distributionKeeper cmn.DistributionKeeper, distributionMsgServer distributiontypes.MsgServer, distributionQuerier distributiontypes.QueryServer, stakingKeeper cmn.StakingKeeper, bankKeeper cmn.BankKeeper, addrCdc address.Codec, ) *Precompile
NewPrecompile creates a new distribution Precompile instance as a PrecompiledContract interface.
func (*Precompile) ClaimRewards ¶
func (p *Precompile) ClaimRewards( ctx sdk.Context, contract *vm.Contract, stateDB vm.StateDB, method *abi.Method, args []interface{}, ) ([]byte, error)
ClaimRewards claims the rewards accumulated by a delegator from multiple or all validators.
func (Precompile) CommunityPool ¶ added in v0.3.0
func (p Precompile) CommunityPool( ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}, ) ([]byte, error)
CommunityPool returns the community pool coins.
func (Precompile) DelegationRewards ¶
func (p Precompile) DelegationRewards( ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}, ) ([]byte, error)
DelegationRewards returns the total rewards accrued by a delegation.
func (Precompile) DelegationTotalRewards ¶
func (p Precompile) DelegationTotalRewards( ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}, ) ([]byte, error)
DelegationTotalRewards returns the total rewards accrued by a delegation.
func (Precompile) DelegatorValidators ¶
func (p Precompile) DelegatorValidators( ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}, ) ([]byte, error)
DelegatorValidators returns the validators a delegator is bonded to.
func (Precompile) DelegatorWithdrawAddress ¶
func (p Precompile) DelegatorWithdrawAddress( ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}, ) ([]byte, error)
DelegatorWithdrawAddress returns the withdraw address for a delegator.
func (*Precompile) DepositValidatorRewardsPool ¶ added in v0.3.0
func (p *Precompile) DepositValidatorRewardsPool( ctx sdk.Context, contract *vm.Contract, stateDB vm.StateDB, method *abi.Method, args []interface{}, ) ([]byte, error)
DepositValidatorRewardsPool deposits rewards into the validator rewards pool for a specific validator.
func (Precompile) EmitClaimRewardsEvent ¶
func (p Precompile) EmitClaimRewardsEvent(ctx sdk.Context, stateDB vm.StateDB, delegatorAddress common.Address, totalCoins sdk.Coins) error
EmitClaimRewardsEvent creates a new event emitted on a ClaimRewards transaction.
func (Precompile) EmitDepositValidatorRewardsPoolEvent ¶ added in v0.3.0
func (p Precompile) EmitDepositValidatorRewardsPoolEvent(ctx sdk.Context, stateDB vm.StateDB, depositor common.Address, validatorAddress string, coins sdk.Coins) error
EmitDepositValidatorRewardsPoolEvent creates a new event emitted on a DepositValidatorRewardsPool transaction.
func (Precompile) EmitFundCommunityPoolEvent ¶
func (p Precompile) EmitFundCommunityPoolEvent(ctx sdk.Context, stateDB vm.StateDB, depositor common.Address, coins sdk.Coins) error
EmitFundCommunityPoolEvent creates a new event emitted per Coin on a FundCommunityPool transaction.
func (Precompile) EmitSetWithdrawAddressEvent ¶
func (p Precompile) EmitSetWithdrawAddressEvent(ctx sdk.Context, stateDB vm.StateDB, caller common.Address, withdrawerAddress string) error
EmitSetWithdrawAddressEvent creates a new event emitted on a SetWithdrawAddressMethod transaction.
func (Precompile) EmitWithdrawDelegatorRewardEvent ¶ added in v0.3.0
func (p Precompile) EmitWithdrawDelegatorRewardEvent(ctx sdk.Context, stateDB vm.StateDB, delegatorAddress common.Address, validatorAddress string, coins sdk.Coins) error
EmitWithdrawDelegatorRewardEvent creates a new event emitted on a WithdrawDelegatorReward transaction.
func (Precompile) EmitWithdrawValidatorCommissionEvent ¶
func (p Precompile) EmitWithdrawValidatorCommissionEvent(ctx sdk.Context, stateDB vm.StateDB, validatorAddress string, coins sdk.Coins) error
EmitWithdrawValidatorCommissionEvent creates a new event emitted on a WithdrawValidatorCommission transaction.
func (*Precompile) FundCommunityPool ¶
func (p *Precompile) FundCommunityPool( ctx sdk.Context, contract *vm.Contract, stateDB vm.StateDB, method *abi.Method, args []interface{}, ) ([]byte, error)
FundCommunityPool directly fund the community pool
func (Precompile) IsTransaction ¶
func (Precompile) IsTransaction(method *abi.Method) bool
IsTransaction checks if the given method name corresponds to a transaction or query.
Available distribution transactions are:
- ClaimRewards
- SetWithdrawAddress
- WithdrawDelegatorReward
- WithdrawValidatorCommission
- FundCommunityPool
- DepositValidatorRewardsPool
func (Precompile) RequiredGas ¶
func (p Precompile) RequiredGas(input []byte) uint64
RequiredGas calculates the precompiled contract's base gas rate.
func (Precompile) SetWithdrawAddress ¶
func (p Precompile) SetWithdrawAddress( ctx sdk.Context, contract *vm.Contract, stateDB vm.StateDB, method *abi.Method, args []interface{}, ) ([]byte, error)
SetWithdrawAddress sets the withdrawal address for a delegator (or validator self-delegation).
func (Precompile) ValidatorCommission ¶
func (p Precompile) ValidatorCommission( ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}, ) ([]byte, error)
ValidatorCommission returns the commission for a validator.
func (Precompile) ValidatorDistributionInfo ¶
func (p Precompile) ValidatorDistributionInfo( ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}, ) ([]byte, error)
ValidatorDistributionInfo returns the distribution info for a validator.
func (Precompile) ValidatorOutstandingRewards ¶
func (p Precompile) ValidatorOutstandingRewards( ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}, ) ([]byte, error)
ValidatorOutstandingRewards returns the outstanding rewards for a validator.
func (Precompile) ValidatorSlashes ¶
func (p Precompile) ValidatorSlashes( ctx sdk.Context, _ *vm.Contract, method *abi.Method, args []interface{}, ) ([]byte, error)
ValidatorSlashes returns the slashes for a validator.
func (*Precompile) WithdrawDelegatorReward ¶ added in v0.3.0
func (p *Precompile) WithdrawDelegatorReward( ctx sdk.Context, contract *vm.Contract, stateDB vm.StateDB, method *abi.Method, args []interface{}, ) ([]byte, error)
WithdrawDelegatorReward withdraws the rewards of a delegator from a single validator.
type ValidatorDistributionInfo ¶
type ValidatorDistributionInfo struct {
OperatorAddress string `abi:"operatorAddress"`
SelfBondRewards []cmn.DecCoin `abi:"selfBondRewards"`
Commission []cmn.DecCoin `abi:"commission"`
}
ValidatorDistributionInfo is a struct to represent the key information from a ValidatorDistributionInfoResponse.
type ValidatorDistributionInfoOutput ¶
type ValidatorDistributionInfoOutput struct {
DistributionInfo ValidatorDistributionInfo `abi:"distributionInfo"`
}
ValidatorDistributionInfoOutput is a wrapper for ValidatorDistributionInfo to return in the response.
func (*ValidatorDistributionInfoOutput) FromResponse ¶
func (o *ValidatorDistributionInfoOutput) FromResponse(res *distributiontypes.QueryValidatorDistributionInfoResponse) ValidatorDistributionInfoOutput
FromResponse converts a response to a ValidatorDistributionInfo.
type ValidatorSlashEvent ¶
type ValidatorSlashEvent struct {
ValidatorPeriod uint64 `abi:"validatorPeriod"`
Fraction cmn.Dec `abi:"fraction"`
}
ValidatorSlashEvent is a struct to represent the key information from a ValidatorSlashEvent response.
type ValidatorSlashesInput ¶
type ValidatorSlashesInput struct {
ValidatorAddress string
StartingHeight uint64
EndingHeight uint64
PageRequest query.PageRequest
}
ValidatorSlashesInput is a struct to represent the key information to perform a ValidatorSlashes query.
type ValidatorSlashesOutput ¶
type ValidatorSlashesOutput struct {
Slashes []ValidatorSlashEvent
PageResponse query.PageResponse
}
ValidatorSlashesOutput is a struct to represent the key information from a ValidatorSlashes response.
func (*ValidatorSlashesOutput) FromResponse ¶
func (vs *ValidatorSlashesOutput) FromResponse(res *distributiontypes.QueryValidatorSlashesResponse) *ValidatorSlashesOutput
FromResponse populates the ValidatorSlashesOutput from a QueryValidatorSlashesResponse.