keeper

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

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) AfterUnbondingInitiated(ctx context.Context, id uint64) error

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

func (Hooks) AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error

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) BeforeValidatorModified(ctx context.Context, valAddr sdk.ValAddress) error

func (Hooks) BeforeValidatorSlashed

func (Hooks) BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, amount sdkmath.LegacyDec) error

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

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

func (k *Keeper) RegisterProposalService(server grpc1.Server)

RegisterProposalService registers the proposal service on the provided router. This implements abci.ProcessProposal verification of new proposals.

func (*Keeper) SetBuildDelay

func (k *Keeper) SetBuildDelay(d time.Duration)

SetBuildDelay sets the build delay parameter.

func (*Keeper) SetBuildOptimistic

func (k *Keeper) SetBuildOptimistic(b bool)

SetBuildOptimistic sets the optimistic build parameter.

func (*Keeper) SetCometAPI

func (k *Keeper) SetCometAPI(c comet.API)

SetCometAPI sets the comet API client.

func (*Keeper) SetVoteProvider

func (k *Keeper) SetVoteProvider(p types.VoteExtensionProvider)

Jump to

Keyboard shortcuts

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