Documentation
¶
Index ¶
- Variables
- func NewMsgServerImpl(keeper *Keeper) types.MsgServer
- func NewQueryServer(keeper *Keeper) types.QueryServer
- type Keeper
- func (k Keeper) AddNewWithdrawalWithNextID(ctx sdk.Context, withdrawal *types.Withdrawal)
- func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx context.Context) ([]abci.ValidatorUpdate, error)
- func (k Keeper) ConsensusAddressCodec() address.Codec
- func (k Keeper) DeleteCollateralOwnership(ctx sdk.Context, valAddr mitotypes.EthAddress, owner mitotypes.EthAddress)
- func (k Keeper) DeleteLastValidatorPower(ctx sdk.Context, valAddr mitotypes.EthAddress)
- func (k Keeper) DeleteValidatorByPowerIndex(ctx sdk.Context, power int64, valAddr mitotypes.EthAddress)
- func (k Keeper) DeleteWithdrawal(ctx sdk.Context, withdrawal types.Withdrawal)
- func (k *Keeper) Deliver(ctx context.Context, blockHash common.Hash, elog evmengtypes.EVMEvent) error
- func (k Keeper) DepositCollateral(ctx sdk.Context, validator *types.Validator, owner mitotypes.EthAddress, ...)
- func (k Keeper) EndBlocker(ctx sdk.Context) ([]abci.ValidatorUpdate, error)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k *Keeper) FallbackDepositCollateral(ctx sdk.Context, ...) error
- func (k *Keeper) FallbackRegisterValidator(ctx sdk.Context, ...) error
- func (k *Keeper) FilterParams(ctx context.Context) ([]common.Address, [][]common.Hash)
- func (k Keeper) GetAllCollateralOwnerships(ctx sdk.Context) []types.CollateralOwnership
- func (k Keeper) GetAllValidators(ctx sdk.Context) []types.Validator
- func (k Keeper) GetAllWithdrawals(ctx sdk.Context) []types.Withdrawal
- func (k Keeper) GetCollateralOwnership(ctx sdk.Context, valAddr mitotypes.EthAddress, owner mitotypes.EthAddress) (ownership types.CollateralOwnership, found bool)
- func (k Keeper) GetLastValidatorPower(ctx sdk.Context, valAddr mitotypes.EthAddress) (power int64, found bool)
- func (k Keeper) GetLastValidatorPowers(ctx sdk.Context) []types.LastValidatorPower
- func (k Keeper) GetNotJailedValidatorsByPower(ctx sdk.Context, maxValidators uint32) []types.Validator
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetValidator(ctx sdk.Context, valAddr mitotypes.EthAddress) (validator types.Validator, found bool)
- func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (types.Validator, bool)
- func (k Keeper) GetValidatorByPowerIndex(ctx sdk.Context, power int64, valAddr mitotypes.EthAddress) (mitotypes.EthAddress, bool)
- func (k Keeper) GetValidatorEntrypointContractAddr(ctx sdk.Context) mitotypes.EthAddress
- func (k Keeper) GetValidatorsByPowerIndexIterator(ctx sdk.Context) storetypes.Iterator
- func (k Keeper) GetWithdrawalLastID(ctx sdk.Context) uint64
- func (k Keeper) HasValidator(ctx sdk.Context, valAddr mitotypes.EthAddress) bool
- func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) ([]abci.ValidatorUpdate, error)
- func (k Keeper) IsValidatorJailed(ctx context.Context, addr sdk.ConsAddress) (bool, error)
- func (k Keeper) IterateCollateralOwnerships(ctx sdk.Context, cb func(ownership types.CollateralOwnership) (stop bool))
- func (k Keeper) IterateCollateralOwnershipsByValidator(ctx sdk.Context, valAddr mitotypes.EthAddress, ...)
- func (k Keeper) IterateLastValidatorPowers(ctx sdk.Context, ...)
- func (k Keeper) IterateLastValidators(ctx sdk.Context, cb func(index int64, validator types.Validator) (stop bool)) error
- func (k Keeper) IterateValidators(ctx context.Context, ...) error
- func (k Keeper) IterateValidators_(ctx sdk.Context, fn func(index int64, validator types.Validator) (stop bool))
- func (k Keeper) IterateWithdrawalsByMaturesAt(ctx sdk.Context, cb func(withdrawal types.Withdrawal) (stop bool))
- func (k Keeper) IterateWithdrawalsForValidator(ctx sdk.Context, valAddr mitotypes.EthAddress, ...)
- func (k *Keeper) Jail(ctx context.Context, consAddress sdk.ConsAddress) error
- func (k Keeper) Jail_(ctx sdk.Context, validator *types.Validator, reason string)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MaxValidators(ctx context.Context) (uint32, error)
- func (*Keeper) Name() string
- func (k *Keeper) ProcessDepositCollateral(ctx sdk.Context, ...) (error, bool)
- func (k *Keeper) ProcessEvent(originCtx sdk.Context, blockHash common.Hash, elog evmengtypes.EVMEvent) (error, bool)
- func (k Keeper) ProcessMaturedWithdrawals(ctx sdk.Context) error
- func (k *Keeper) ProcessRegisterValidator(ctx sdk.Context, ...) (error, bool)
- func (k *Keeper) ProcessTransferCollateralOwnership(ctx sdk.Context, ...) (error, bool)
- func (k *Keeper) ProcessUnjail(ctx sdk.Context, event *bindings.ConsensusValidatorEntrypointMsgUnjail) (error, bool)
- func (k *Keeper) ProcessUpdateExtraVotingPower(ctx sdk.Context, ...) (error, bool)
- func (k *Keeper) ProcessWithdrawCollateral(ctx sdk.Context, ...) (error, bool)
- func (k Keeper) RegisterValidator(ctx sdk.Context, valAddr mitotypes.EthAddress, pubkey []byte, ...) error
- func (k Keeper) SetCollateralOwnership(ctx sdk.Context, ownership types.CollateralOwnership)
- func (k *Keeper) SetEvmEngineKeeper(evmEngKeeper types.EvmEngineKeeper)
- func (k Keeper) SetLastValidatorPower(ctx sdk.Context, valAddr mitotypes.EthAddress, power int64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k *Keeper) SetSlashingKeeper(slashingKeeper types.SlashingKeeper)
- func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator)
- func (k Keeper) SetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr mitotypes.EthAddress)
- func (k Keeper) SetValidatorByPowerIndex(ctx sdk.Context, power int64, valAddr mitotypes.EthAddress)
- func (k Keeper) SetValidatorEntrypointContractAddr(ctx sdk.Context, addr mitotypes.EthAddress)
- func (k Keeper) SetWithdrawal(ctx sdk.Context, withdrawal types.Withdrawal)
- func (k Keeper) SetWithdrawalLastID(ctx sdk.Context, lastID uint64)
- func (k *Keeper) Slash(ctx context.Context, consAddress sdk.ConsAddress, infractionHeight int64, ...) (math.Int, error)
- func (k Keeper) SlashWithInfractionReason(ctx context.Context, consAddr sdk.ConsAddress, infractionHeight int64, ...) (math.Int, error)
- func (k Keeper) Slash_(ctx sdk.Context, validator *types.Validator, infractionHeight int64, ...) (sdkmath.Uint, error)
- func (k Keeper) TransferCollateralOwnership(ctx sdk.Context, validator *types.Validator, ...)
- func (k *Keeper) Unjail(ctx context.Context, consAddress sdk.ConsAddress) error
- func (k Keeper) Unjail_(ctx sdk.Context, validator *types.Validator) error
- func (k Keeper) UpdateExtraVotingPower(ctx sdk.Context, validator *types.Validator, extraVotingPower sdkmath.Uint)
- func (k Keeper) UpdateValidatorState(ctx sdk.Context, validator *types.Validator, context string)
- func (k Keeper) ValidatorAddressCodec() address.Codec
- func (k *Keeper) ValidatorByConsAddr(ctx context.Context, consAddress sdk.ConsAddress) (slashingtypes.ValidatorI, error)
- func (k Keeper) WithdrawCollateral(ctx sdk.Context, validator *types.Validator, owner mitotypes.EthAddress, ...) error
- func (k Keeper) WriteValidators(ctx sdk.Context) (vals []cmttypes.GenesisValidator, returnErr error)
- type KeeperWrapperForEvidence
- type QueryServer
- func (q QueryServer) CollateralOwnership(ctx context.Context, req *types.QueryCollateralOwnershipRequest) (*types.QueryCollateralOwnershipResponse, error)
- func (q QueryServer) CollateralOwnerships(ctx context.Context, req *types.QueryCollateralOwnershipsRequest) (*types.QueryCollateralOwnershipsResponse, error)
- func (q QueryServer) CollateralOwnershipsByValidator(ctx context.Context, req *types.QueryCollateralOwnershipsByValidatorRequest) (*types.QueryCollateralOwnershipsByValidatorResponse, error)
- func (q QueryServer) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (q QueryServer) Validator(ctx context.Context, req *types.QueryValidatorRequest) (*types.QueryValidatorResponse, error)
- func (q QueryServer) ValidatorByConsAddr(ctx context.Context, req *types.QueryValidatorByConsAddrRequest) (*types.QueryValidatorByConsAddrResponse, error)
- func (q QueryServer) ValidatorEntrypointContractAddr(ctx context.Context, req *types.QueryValidatorEntrypointContractAddrRequest) (*types.QueryValidatorEntrypointContractAddrResponse, error)
- func (q QueryServer) Validators(ctx context.Context, req *types.QueryValidatorsRequest) (*types.QueryValidatorsResponse, error)
- func (q QueryServer) Withdrawal(ctx context.Context, req *types.QueryWithdrawalRequest) (*types.QueryWithdrawalResponse, error)
- func (q QueryServer) Withdrawals(ctx context.Context, req *types.QueryWithdrawalsRequest) (*types.QueryWithdrawalsResponse, error)
- func (q QueryServer) WithdrawalsByValidator(ctx context.Context, req *types.QueryWithdrawalsByValidatorRequest) (*types.QueryWithdrawalsByValidatorResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( ABI = mustGetABI(bindings.ConsensusValidatorEntrypointMetaData) EventMsgRegisterValidator = mustGetEvent(ABI, "MsgRegisterValidator") EventMsgDepositCollateral = mustGetEvent(ABI, "MsgDepositCollateral") EventMsgWithdrawCollateral = mustGetEvent(ABI, "MsgWithdrawCollateral") EventMsgTransferCollateralOwnership = mustGetEvent(ABI, "MsgTransferCollateralOwnership") EventMsgUnjail = mustGetEvent(ABI, "MsgUnjail") EventMsgUpdateExtraVotingPower = mustGetEvent(ABI, "MsgUpdateExtraVotingPower") EventsByID = map[common.Hash]abi.Event{ EventMsgRegisterValidator.ID: EventMsgRegisterValidator, EventMsgDepositCollateral.ID: EventMsgDepositCollateral, EventMsgWithdrawCollateral.ID: EventMsgWithdrawCollateral, EventMsgTransferCollateralOwnership.ID: EventMsgTransferCollateralOwnership, EventMsgUnjail.ID: EventMsgUnjail, EventMsgUpdateExtraVotingPower.ID: EventMsgUpdateExtraVotingPower, } )
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the evmvalidator MsgServer interface for the provided Keeper.
func NewQueryServer ¶
func NewQueryServer(keeper *Keeper) types.QueryServer
NewQueryServer creates a new QueryServer instance
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the evmvalidator store
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, validatorAddressCodec address.Codec, consensusAddressCodec address.Codec, authority string, ) *Keeper
NewKeeper creates a new keeper
func (Keeper) AddNewWithdrawalWithNextID ¶
func (k Keeper) AddNewWithdrawalWithNextID(ctx sdk.Context, withdrawal *types.Withdrawal)
AddNewWithdrawalWithNextID adds a new withdrawal with the next ID
func (Keeper) ApplyAndReturnValidatorSetUpdates ¶
func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx context.Context) ([]abci.ValidatorUpdate, error)
ApplyAndReturnValidatorSetUpdates applies and returns accumulated updates to the validator set.
func (Keeper) ConsensusAddressCodec ¶
ConsensusAddressCodec returns the address codec for consensus nodes
func (Keeper) DeleteCollateralOwnership ¶
func (k Keeper) DeleteCollateralOwnership( ctx sdk.Context, valAddr mitotypes.EthAddress, owner mitotypes.EthAddress, )
DeleteCollateralOwnership deletes collateral ownership
func (Keeper) DeleteLastValidatorPower ¶
func (k Keeper) DeleteLastValidatorPower(ctx sdk.Context, valAddr mitotypes.EthAddress)
DeleteLastValidatorPower deletes the last validator power for a validator
func (Keeper) DeleteValidatorByPowerIndex ¶
func (k Keeper) DeleteValidatorByPowerIndex(ctx sdk.Context, power int64, valAddr mitotypes.EthAddress)
DeleteValidatorByPowerIndex deletes a validator from the power index
func (Keeper) DeleteWithdrawal ¶
func (k Keeper) DeleteWithdrawal(ctx sdk.Context, withdrawal types.Withdrawal)
DeleteWithdrawal deletes the withdrawal
func (*Keeper) Deliver ¶
func (k *Keeper) Deliver(ctx context.Context, blockHash common.Hash, elog evmengtypes.EVMEvent) error
Deliver delivers related EVM log events
func (Keeper) DepositCollateral ¶
func (Keeper) EndBlocker ¶
EndBlocker is called at the end of every block
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the evmvalidator module's exported genesis state
func (*Keeper) FallbackDepositCollateral ¶
func (k *Keeper) FallbackDepositCollateral(ctx sdk.Context, event *bindings.ConsensusValidatorEntrypointMsgDepositCollateral) error
FallbackDepositCollateral handles the case when the MsgDepositCollateral event fails to process
func (*Keeper) FallbackRegisterValidator ¶
func (k *Keeper) FallbackRegisterValidator(ctx sdk.Context, event *bindings.ConsensusValidatorEntrypointMsgRegisterValidator) error
FallbackRegisterValidator handles the case when the MsgRegisterValidator event fails to process
func (*Keeper) FilterParams ¶
FilterParams defines the matching EVM log events
func (Keeper) GetAllCollateralOwnerships ¶
func (k Keeper) GetAllCollateralOwnerships(ctx sdk.Context) []types.CollateralOwnership
GetAllCollateralOwnerships gets all collateral ownerships
func (Keeper) GetAllValidators ¶
GetAllValidators gets all validators
func (Keeper) GetAllWithdrawals ¶
func (k Keeper) GetAllWithdrawals(ctx sdk.Context) []types.Withdrawal
GetAllWithdrawals gets all withdrawals
func (Keeper) GetCollateralOwnership ¶
func (k Keeper) GetCollateralOwnership( ctx sdk.Context, valAddr mitotypes.EthAddress, owner mitotypes.EthAddress, ) (ownership types.CollateralOwnership, found bool)
GetCollateralOwnership gets collateral ownership by validator and owner
func (Keeper) GetLastValidatorPower ¶
func (k Keeper) GetLastValidatorPower(ctx sdk.Context, valAddr mitotypes.EthAddress) (power int64, found bool)
GetLastValidatorPower gets the last validator power for a validator
func (Keeper) GetLastValidatorPowers ¶
func (k Keeper) GetLastValidatorPowers(ctx sdk.Context) []types.LastValidatorPower
GetLastValidatorPowers gets all last validator powers
func (Keeper) GetNotJailedValidatorsByPower ¶
func (k Keeper) GetNotJailedValidatorsByPower(ctx sdk.Context, maxValidators uint32) []types.Validator
GetNotJailedValidatorsByPower gets not jailed validators sorted by power
func (Keeper) GetValidator ¶
func (k Keeper) GetValidator(ctx sdk.Context, valAddr mitotypes.EthAddress) (validator types.Validator, found bool)
GetValidator gets a validator by address
func (Keeper) GetValidatorByConsAddr ¶
func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (types.Validator, bool)
GetValidatorByConsAddr returns a validator by consensus address
func (Keeper) GetValidatorByPowerIndex ¶
func (k Keeper) GetValidatorByPowerIndex(ctx sdk.Context, power int64, valAddr mitotypes.EthAddress) (mitotypes.EthAddress, bool)
GetValidatorByPowerIndex returns a validator by power and address
func (Keeper) GetValidatorEntrypointContractAddr ¶
func (k Keeper) GetValidatorEntrypointContractAddr(ctx sdk.Context) mitotypes.EthAddress
GetValidatorEntrypointContractAddr gets the ConsensusValidatorEntrypoint contract address
func (Keeper) GetValidatorsByPowerIndexIterator ¶
func (k Keeper) GetValidatorsByPowerIndexIterator(ctx sdk.Context) storetypes.Iterator
GetValidatorsByPowerIndexIterator returns an iterator for the power index (starting from the most powerful)
func (Keeper) HasValidator ¶
HasValidator checks if a validator exists
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) ([]abci.ValidatorUpdate, error)
InitGenesis initializes the evmvalidator module's state from a provided genesis state
func (Keeper) IsValidatorJailed ¶
IsValidatorJailed implements the StakingKeeper interface
func (Keeper) IterateCollateralOwnerships ¶
func (k Keeper) IterateCollateralOwnerships( ctx sdk.Context, cb func(ownership types.CollateralOwnership) (stop bool), )
IterateCollateralOwnerships iterates over all collateral ownerships
func (Keeper) IterateCollateralOwnershipsByValidator ¶
func (k Keeper) IterateCollateralOwnershipsByValidator( ctx sdk.Context, valAddr mitotypes.EthAddress, cb func(ownership types.CollateralOwnership) (stop bool), )
IterateCollateralOwnershipsByValidator iterates over all collateral ownerships for a validator
func (Keeper) IterateLastValidatorPowers ¶
func (k Keeper) IterateLastValidatorPowers(ctx sdk.Context, cb func(valAddr mitotypes.EthAddress, power int64) (stop bool))
IterateLastValidatorPowers iterates through all last validator powers
func (Keeper) IterateLastValidators ¶
func (k Keeper) IterateLastValidators(ctx sdk.Context, cb func(index int64, validator types.Validator) (stop bool)) error
IterateLastValidators iterates through the active validator set and perform the provided function
func (Keeper) IterateValidators ¶
func (k Keeper) IterateValidators(ctx context.Context, fn func(index int64, validator slashingtypes.ValidatorI) (stop bool)) error
IterateValidators implements the StakingKeeper interface It iterates through validators and executes the provided function for each validator
func (Keeper) IterateValidators_ ¶
func (k Keeper) IterateValidators_(ctx sdk.Context, fn func(index int64, validator types.Validator) (stop bool))
IterateValidators_ iterates through all validators and performs the provided function
func (Keeper) IterateWithdrawalsByMaturesAt ¶
func (k Keeper) IterateWithdrawalsByMaturesAt(ctx sdk.Context, cb func(withdrawal types.Withdrawal) (stop bool))
IterateWithdrawalsByMaturesAt iterates through all withdrawals by maturesAt (sorted by maturesAt)
func (Keeper) IterateWithdrawalsForValidator ¶
func (k Keeper) IterateWithdrawalsForValidator( ctx sdk.Context, valAddr mitotypes.EthAddress, cb func(withdrawal types.Withdrawal) (stop bool), )
func (Keeper) MaxValidators ¶
MaxValidators implements the StakingKeeper interface
func (*Keeper) ProcessDepositCollateral ¶
func (k *Keeper) ProcessDepositCollateral(ctx sdk.Context, event *bindings.ConsensusValidatorEntrypointMsgDepositCollateral) (error, bool)
ProcessDepositCollateral processes MsgDepositCollateral event The second return value indicates whether it is okay to ignore the error
func (*Keeper) ProcessEvent ¶
func (k *Keeper) ProcessEvent(originCtx sdk.Context, blockHash common.Hash, elog evmengtypes.EVMEvent) (error, bool)
ProcessEvent parses the provided event and processes it. If the second return value is true, the error will be ignored.
func (Keeper) ProcessMaturedWithdrawals ¶
ProcessMaturedWithdrawals processes withdrawals that have matured
func (*Keeper) ProcessRegisterValidator ¶
func (k *Keeper) ProcessRegisterValidator(ctx sdk.Context, event *bindings.ConsensusValidatorEntrypointMsgRegisterValidator) (error, bool)
ProcessRegisterValidator processes MsgRegisterValidator event The second return value indicates whether it is okay to ignore the error
func (*Keeper) ProcessTransferCollateralOwnership ¶
func (k *Keeper) ProcessTransferCollateralOwnership(ctx sdk.Context, event *bindings.ConsensusValidatorEntrypointMsgTransferCollateralOwnership) (error, bool)
ProcessTransferCollateralOwnership processes MsgTransferCollateralOwnership event The second return value indicates whether it is okay to ignore the error
func (*Keeper) ProcessUnjail ¶
func (k *Keeper) ProcessUnjail(ctx sdk.Context, event *bindings.ConsensusValidatorEntrypointMsgUnjail) (error, bool)
ProcessUnjail processes MsgUnjail event The second return value indicates whether it is okay to ignore the error
func (*Keeper) ProcessUpdateExtraVotingPower ¶
func (k *Keeper) ProcessUpdateExtraVotingPower(ctx sdk.Context, event *bindings.ConsensusValidatorEntrypointMsgUpdateExtraVotingPower) (error, bool)
ProcessUpdateExtraVotingPower processes MsgUpdateExtraVotingPower event The second return value indicates whether it is okay to ignore the error
func (*Keeper) ProcessWithdrawCollateral ¶
func (k *Keeper) ProcessWithdrawCollateral(ctx sdk.Context, event *bindings.ConsensusValidatorEntrypointMsgWithdrawCollateral) (error, bool)
ProcessWithdrawCollateral processes MsgWithdrawCollateral event The second return value indicates whether it is okay to ignore the error
func (Keeper) RegisterValidator ¶
func (Keeper) SetCollateralOwnership ¶
func (k Keeper) SetCollateralOwnership(ctx sdk.Context, ownership types.CollateralOwnership)
SetCollateralOwnership sets collateral ownership for validator and owner
func (*Keeper) SetEvmEngineKeeper ¶
func (k *Keeper) SetEvmEngineKeeper(evmEngKeeper types.EvmEngineKeeper)
SetEvmEngineKeeper sets the evm engine keeper
func (Keeper) SetLastValidatorPower ¶
SetLastValidatorPower sets the last validator power for a validator
func (*Keeper) SetSlashingKeeper ¶
func (k *Keeper) SetSlashingKeeper(slashingKeeper types.SlashingKeeper)
SetSlashingKeeper sets the slashing keeper
func (Keeper) SetValidator ¶
SetValidator sets a validator and updates the consensus address mapping
func (Keeper) SetValidatorByConsAddr ¶
func (k Keeper) SetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr mitotypes.EthAddress)
SetValidatorByConsAddr sets a validator EVM address by consensus address
func (Keeper) SetValidatorByPowerIndex ¶
func (k Keeper) SetValidatorByPowerIndex(ctx sdk.Context, power int64, valAddr mitotypes.EthAddress)
SetValidatorByPowerIndex sets a validator in the power index
func (Keeper) SetValidatorEntrypointContractAddr ¶
func (k Keeper) SetValidatorEntrypointContractAddr(ctx sdk.Context, addr mitotypes.EthAddress)
SetValidatorEntrypointContractAddr sets the ConsensusValidatorEntrypoint contract address
func (Keeper) SetWithdrawal ¶
func (k Keeper) SetWithdrawal(ctx sdk.Context, withdrawal types.Withdrawal)
SetWithdrawal set the withdrawal
func (Keeper) SetWithdrawalLastID ¶
func (Keeper) SlashWithInfractionReason ¶
func (k Keeper) SlashWithInfractionReason( ctx context.Context, consAddr sdk.ConsAddress, infractionHeight int64, power int64, slashFraction math.LegacyDec, _ stakingtypes.Infraction, ) (math.Int, error)
SlashWithInfractionReason implements the StakingKeeper interface It slashes a validator for an infraction committed at a specific height with a specific reason
func (Keeper) Slash_ ¶
func (k Keeper) Slash_(ctx sdk.Context, validator *types.Validator, infractionHeight int64, power int64, slashFraction sdkmath.LegacyDec) (sdkmath.Uint, error)
Slash_ slashes a validator's collateral by a fraction
func (Keeper) TransferCollateralOwnership ¶
func (k Keeper) TransferCollateralOwnership( ctx sdk.Context, validator *types.Validator, prevOwnership types.CollateralOwnership, newOwner mitotypes.EthAddress, )
TransferCollateralOwnership transfers collateral ownership from one owner to another
func (Keeper) UpdateExtraVotingPower ¶
func (Keeper) UpdateValidatorState ¶
func (Keeper) ValidatorAddressCodec ¶
ValidatorAddressCodec returns the address codec for validators
func (*Keeper) ValidatorByConsAddr ¶
func (k *Keeper) ValidatorByConsAddr(ctx context.Context, consAddress sdk.ConsAddress) (slashingtypes.ValidatorI, error)
func (Keeper) WithdrawCollateral ¶
func (k Keeper) WithdrawCollateral( ctx sdk.Context, validator *types.Validator, owner mitotypes.EthAddress, withdrawal *types.Withdrawal, ) error
func (Keeper) WriteValidators ¶
func (k Keeper) WriteValidators(ctx sdk.Context) (vals []cmttypes.GenesisValidator, returnErr error)
WriteValidators returns a slice of bonded genesis validators.
type KeeperWrapperForEvidence ¶
type KeeperWrapperForEvidence struct {
K *Keeper
}
func (KeeperWrapperForEvidence) ConsensusAddressCodec ¶
func (k KeeperWrapperForEvidence) ConsensusAddressCodec() address.Codec
func (KeeperWrapperForEvidence) ValidatorByConsAddr ¶
func (k KeeperWrapperForEvidence) ValidatorByConsAddr(ctx context.Context, consAddress sdk.ConsAddress) (evidencetypes.ValidatorI, error)
type QueryServer ¶
type QueryServer struct {
// contains filtered or unexported fields
}
QueryServer implements the QueryServer interface for the evmvalidator module
func (QueryServer) CollateralOwnership ¶
func (q QueryServer) CollateralOwnership(ctx context.Context, req *types.QueryCollateralOwnershipRequest) (*types.QueryCollateralOwnershipResponse, error)
CollateralOwnership returns the collateral ownership for a specific validator and owner
func (QueryServer) CollateralOwnerships ¶
func (q QueryServer) CollateralOwnerships(ctx context.Context, req *types.QueryCollateralOwnershipsRequest) (*types.QueryCollateralOwnershipsResponse, error)
CollateralOwnerships returns all collateral ownerships with withdrawable amounts
func (QueryServer) CollateralOwnershipsByValidator ¶
func (q QueryServer) CollateralOwnershipsByValidator(ctx context.Context, req *types.QueryCollateralOwnershipsByValidatorRequest) (*types.QueryCollateralOwnershipsByValidatorResponse, error)
CollateralOwnershipsByValidator returns all collateral ownerships for a specific validator
func (QueryServer) Params ¶
func (q QueryServer) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params returns the module's parameters
func (QueryServer) Validator ¶
func (q QueryServer) Validator(ctx context.Context, req *types.QueryValidatorRequest) (*types.QueryValidatorResponse, error)
Validator returns a specific validator by validator address
func (QueryServer) ValidatorByConsAddr ¶
func (q QueryServer) ValidatorByConsAddr(ctx context.Context, req *types.QueryValidatorByConsAddrRequest) (*types.QueryValidatorByConsAddrResponse, error)
ValidatorByConsAddr returns a validator by consensus address
func (QueryServer) ValidatorEntrypointContractAddr ¶
func (q QueryServer) ValidatorEntrypointContractAddr(ctx context.Context, req *types.QueryValidatorEntrypointContractAddrRequest) (*types.QueryValidatorEntrypointContractAddrResponse, error)
ValidatorEntrypointContractAddr returns the address of the ConsensusValidatorEntrypoint contract
func (QueryServer) Validators ¶
func (q QueryServer) Validators(ctx context.Context, req *types.QueryValidatorsRequest) (*types.QueryValidatorsResponse, error)
Validators returns all validators
func (QueryServer) Withdrawal ¶
func (q QueryServer) Withdrawal(ctx context.Context, req *types.QueryWithdrawalRequest) (*types.QueryWithdrawalResponse, error)
Withdrawal returns a specific withdrawal by ID
func (QueryServer) Withdrawals ¶
func (q QueryServer) Withdrawals(ctx context.Context, req *types.QueryWithdrawalsRequest) (*types.QueryWithdrawalsResponse, error)
Withdrawals returns all withdrawals
func (QueryServer) WithdrawalsByValidator ¶
func (q QueryServer) WithdrawalsByValidator(ctx context.Context, req *types.QueryWithdrawalsByValidatorRequest) (*types.QueryWithdrawalsByValidatorResponse, error)
WithdrawalsByValidator returns withdrawals for a specific validator