keeper

package
v0.0.0-...-3a28d7b Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hooks

type Hooks struct {
	// contains filtered or unexported fields
}

Hooks are utilized to monitor and capture the events of validator addition and removal on the consumer chain.

func (Hooks) AfterDelegationModified

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

AfterDelegationModified implements types.StakingHooks.

func (Hooks) AfterUnbondingInitiated

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

AfterUnbondingInitiated implements types.StakingHooks.

func (Hooks) AfterValidatorBeginUnbonding

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

AfterValidatorBeginUnbonding implements types.StakingHooks.

func (Hooks) AfterValidatorBonded

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

AfterValidatorBonded implements types.StakingHooks.

func (Hooks) AfterValidatorCreated

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

AfterValidatorCreated implements types.StakingHooks.

func (Hooks) AfterValidatorRemoved

func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error

AfterValidatorRemoved implements types.StakingHooks.

func (Hooks) BeforeDelegationCreated

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

BeforeDelegationCreated implements types.StakingHooks.

func (Hooks) BeforeDelegationRemoved

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

BeforeDelegationRemoved implements types.StakingHooks.

func (Hooks) BeforeDelegationSharesModified

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

BeforeDelegationSharesModified implements types.StakingHooks.

func (Hooks) BeforeValidatorModified

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

BeforeValidatorModified implements types.StakingHooks.

func (Hooks) BeforeValidatorSlashed

func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error

BeforeValidatorSlashed implements types.StakingHooks.

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	storeKey storetypes.StoreKey,
	cdc codec.Codec,
	scopedKeeper restaking.ScopedKeeper,
	channelKeeper restaking.ChannelKeeper,
	portKeeper restaking.PortKeeper,
	connectionKeeper restaking.ConnectionKeeper,
	clientKeeper restaking.ClientKeeper,
	ibcTransferKeeper restaking.IBCTransferKeeper,
	bankKeeper restaking.BankKeeper,
	standaloneStakingKeeper restaking.StakingKeeper,
	slashingKeeper restaking.SlashingKeeper,
	authKeeper restaking.AccountKeeper,
	multiStakingKeeper restaking.MTStakingKeeper,
) Keeper

func (Keeper) AppendPendingConsumerSlash

func (k Keeper) AppendPendingConsumerSlash(ctx sdk.Context, addedSlashes ...restaking.ConsumerSlash)

func (Keeper) AppendPendingVSC

func (k Keeper) AppendPendingVSC(ctx sdk.Context, addedPackets ...restaking.ValidatorSetChange)

func (Keeper) BindPort

func (k Keeper) BindPort(ctx sdk.Context, portID string) error

BindPort defines a wrapper function for the ort Keeper's function in order to expose it to module's InitGenesis function

func (Keeper) ClaimCapability

func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error

func (Keeper) DeletePendingConsumerSlashList

func (k Keeper) DeletePendingConsumerSlashList(ctx sdk.Context)

func (Keeper) DeletePendingVSCList

func (k Keeper) DeletePendingVSCList(ctx sdk.Context)

func (Keeper) EndBlock

func (k Keeper) EndBlock(ctx sdk.Context)

func (Keeper) GenerateOperatorAccount

func (k Keeper) GenerateOperatorAccount(
	ctx sdk.Context, channel, portID string, operatorAccAddr sdk.AccAddress, valAddr sdk.ValAddress,
) authtypes.AccountI

func (Keeper) GetAllValidators

func (k Keeper) GetAllValidators(ctx sdk.Context) []stakingtypes.Validator

func (Keeper) GetCoordinatorChannelID

func (k Keeper) GetCoordinatorChannelID(ctx sdk.Context) (string, error)

func (Keeper) GetInitialValidator

func (k Keeper) GetInitialValidator(ctx sdk.Context) abci.ValidatorUpdates

func (Keeper) GetOperatorLocalAddress

func (k Keeper) GetOperatorLocalAddress(ctx sdk.Context, operatorAddress sdk.AccAddress, valAddr sdk.ValAddress) (addr sdk.AccAddress, found bool)

func (Keeper) GetOrCreateOperatorLocalAddress

func (k Keeper) GetOrCreateOperatorLocalAddress(
	ctx sdk.Context, srcChannel, srcPort string, operatorAddress sdk.AccAddress, valAddr sdk.ValAddress,
) sdk.AccAddress

func (Keeper) GetPendingConsumerSlashList

func (k Keeper) GetPendingConsumerSlashList(ctx sdk.Context) []restaking.ConsumerSlash

func (Keeper) GetPendingVSCList

func (k Keeper) GetPendingVSCList(ctx sdk.Context) []restaking.ValidatorSetChange

func (Keeper) GetValidatorSetUpdateID

func (k Keeper) GetValidatorSetUpdateID(ctx sdk.Context) (validatorSetUpdateID uint64)

func (Keeper) HandleRestakingDelegationPacket

func (k Keeper) HandleRestakingDelegationPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	delegation *restaking.DelegationPacket,
) error

func (Keeper) HandleRestakingSlashPacket

func (k Keeper) HandleRestakingSlashPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	slash *restaking.SlashPacket,
) error

func (Keeper) HandleRestakingUndelegationPacket

func (k Keeper) HandleRestakingUndelegationPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	delegation *restaking.UndelegationPacket,
) error

func (*Keeper) Hooks

func (k *Keeper) Hooks() Hooks

Returns new provider hooks

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, state *types.GenesisState) []abci.ValidatorUpdate

func (Keeper) IsBound

func (k Keeper) IsBound(ctx sdk.Context, portID string) bool

func (Keeper) OnRecvPacket

func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, coordinatorPacket *restaking.CoordinatorPacket) exported.Acknowledgement

func (Keeper) QueueInitialVSC

func (k Keeper) QueueInitialVSC(ctx sdk.Context) error

func (Keeper) QueueVSC

func (k Keeper) QueueVSC(ctx sdk.Context, vsc restaking.ValidatorSetChange)

func (Keeper) SendConsumerPendingPacket

func (k Keeper) SendConsumerPendingPacket(ctx sdk.Context)

func (Keeper) SetCoordinatorChannelID

func (k Keeper) SetCoordinatorChannelID(ctx sdk.Context, channelID string)

func (Keeper) SetOperatorLocalAddress

func (k Keeper) SetOperatorLocalAddress(ctx sdk.Context, operatorAddress sdk.AccAddress, valAddr sdk.ValAddress, localAddress sdk.AccAddress)

func (Keeper) SetValidatorSetUpdateID

func (k Keeper) SetValidatorSetUpdateID(ctx sdk.Context, valUpdateID uint64)

func (Keeper) ValidatorsOperatorStoreIterator

func (k Keeper) ValidatorsOperatorStoreIterator(ctx sdk.Context, valAddr string) sdk.Iterator

Jump to

Keyboard shortcuts

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