keeper

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: GPL-3.0 Imports: 29 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 added in v0.1.2

type Hooks struct{}

Hooks implements the staking hooks. It just logs at this point.

func (Hooks) AfterDelegationModified added in v0.1.2

func (Hooks) AfterDelegationModified(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error

func (Hooks) AfterUnbondingInitiated added in v0.1.2

func (Hooks) AfterUnbondingInitiated(ctx context.Context, id uint64) error

func (Hooks) AfterValidatorBeginUnbonding added in v0.1.2

func (Hooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error

func (Hooks) AfterValidatorBonded added in v0.1.2

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 added in v0.1.2

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

AfterValidatorCreated adds the address-pubkey relation when a validator is created.

func (Hooks) AfterValidatorRemoved added in v0.1.2

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 added in v0.1.2

func (Hooks) BeforeDelegationCreated(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error

func (Hooks) BeforeDelegationRemoved added in v0.1.2

func (Hooks) BeforeDelegationRemoved(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error

func (Hooks) BeforeDelegationSharesModified added in v0.1.2

func (Hooks) BeforeDelegationSharesModified(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error

func (Hooks) BeforeValidatorModified added in v0.1.2

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

func (Hooks) BeforeValidatorSlashed added in v0.1.2

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,
) *Keeper

func (*Keeper) AddEventProcessor added in v0.1.2

func (k *Keeper) AddEventProcessor(p types.EvmEventProcessor)

TODO(corver): Figure out how to use depinject for this.

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) SetAddressProvider

func (k *Keeper) SetAddressProvider(p types.AddressProvider)

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 added in v0.1.1

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