Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper *Keeper) types.MsgServiceServer
- func NewProposalServer(keeper *Keeper) types.MsgServiceServer
- type Hooks
- func (Hooks) AfterDelegationModified(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (Hooks) AfterUnbondingInitiated(ctx context.Context, id uint64) error
- func (Hooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (Hooks) AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (Hooks) AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error
- func (Hooks) AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (Hooks) BeforeDelegationCreated(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (Hooks) BeforeDelegationRemoved(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (Hooks) BeforeDelegationSharesModified(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (Hooks) BeforeValidatorModified(ctx context.Context, valAddr sdk.ValAddress) error
- func (Hooks) BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, amount sdkmath.LegacyDec) error
- type Keeper
- func (k *Keeper) AddEventProcessor(p types.EvmEventProcessor)
- func (k *Keeper) Finalize(ctx context.Context, req *abci.RequestFinalizeBlock, ...) error
- func (k *Keeper) PrepareProposal(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error)
- func (k *Keeper) RegisterProposalService(server grpc1.Server)
- func (k *Keeper) SetBuildDelay(d time.Duration)
- func (k *Keeper) SetBuildOptimistic(b bool)
- func (k *Keeper) SetCometAPI(c comet.API)
- func (k *Keeper) SetVoteProvider(p types.VoteExtensionProvider)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
func NewMsgServerImpl(keeper *Keeper) types.MsgServiceServer
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func NewProposalServer ¶
func NewProposalServer(keeper *Keeper) types.MsgServiceServer
NewProposalServer returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Hooks ¶
type Hooks struct{}
Hooks implements the staking hooks. It just logs at this point.
func (Hooks) AfterDelegationModified ¶
func (Hooks) AfterDelegationModified(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Hooks) AfterUnbondingInitiated ¶
func (Hooks) AfterValidatorBeginUnbonding ¶
func (Hooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
func (Hooks) AfterValidatorBonded ¶
func (Hooks) AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
AfterValidatorBonded updates the signing info start height or create a new signing info.
func (Hooks) AfterValidatorCreated ¶
AfterValidatorCreated adds the address-pubkey relation when a validator is created.
func (Hooks) AfterValidatorRemoved ¶
func (Hooks) AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
AfterValidatorRemoved deletes the address-pubkey relation when a validator is removed,.
func (Hooks) BeforeDelegationCreated ¶
func (Hooks) BeforeDelegationCreated(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Hooks) BeforeDelegationRemoved ¶
func (Hooks) BeforeDelegationRemoved(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Hooks) BeforeDelegationSharesModified ¶
func (Hooks) BeforeDelegationSharesModified(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Hooks) BeforeValidatorModified ¶
func (Hooks) BeforeValidatorSlashed ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, engineCl ethclient.EngineClient, txConfig client.TxConfig, addrProvider types.AddressProvider, feeRecProvider types.FeeRecipientProvider, ) *Keeper
func (*Keeper) AddEventProcessor ¶
func (k *Keeper) AddEventProcessor(p types.EvmEventProcessor)
TODO(corver): Figure out how to use depinject for this.
func (*Keeper) Finalize ¶
func (k *Keeper) Finalize(ctx context.Context, req *abci.RequestFinalizeBlock, resp *abci.ResponseFinalizeBlock) error
Finalize is called by our custom ABCI wrapper after a block is finalized. It starts an optimistic build if enabled and if we are the next proposer.
This custom ABCI callback is used since we need to trigger optimistic builds immediately after FinalizeBlock with the latest app hash which isn't available from cosmosSDK otherwise.
func (*Keeper) PrepareProposal ¶
func (k *Keeper) PrepareProposal(ctx sdk.Context, req *abci.RequestPrepareProposal) ( *abci.ResponsePrepareProposal, error, )
PrepareProposal returns a proposal for the next block. Note returning an error results in a panic cometbft and CONSENSUS_FAILURE log.
func (*Keeper) RegisterProposalService ¶
RegisterProposalService registers the proposal service on the provided router. This implements abci.ProcessProposal verification of new proposals.
func (*Keeper) SetBuildDelay ¶
SetBuildDelay sets the build delay parameter.
func (*Keeper) SetBuildOptimistic ¶
SetBuildOptimistic sets the optimistic build parameter.
func (*Keeper) SetCometAPI ¶
SetCometAPI sets the comet API client.
func (*Keeper) SetVoteProvider ¶
func (k *Keeper) SetVoteProvider(p types.VoteExtensionProvider)