keeper

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleAddManagedCellarsProposal

func HandleAddManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.AddManagedCellarsProposal) error

HandleAddManagedCellarsProposal is a handler for executing a passed community cellar addition proposal

func HandleRemoveManagedCellarsProposal

func HandleRemoveManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.RemoveManagedCellarsProposal) error

HandleRemoveManagedCellarsProposal is a handler for executing a passed community cellar removal proposal

Types

type Hooks

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

func (Hooks) AfterBatchExecutedEvent

func (h Hooks) AfterBatchExecutedEvent(ctx sdk.Context, event gravitytypes.BatchExecutedEvent)

func (Hooks) AfterContractCallExecutedEvent

func (h Hooks) AfterContractCallExecutedEvent(ctx sdk.Context, event gravitytypes.ContractCallExecutedEvent)

func (Hooks) AfterERC20DeployedEvent

func (h Hooks) AfterERC20DeployedEvent(ctx sdk.Context, event gravitytypes.ERC20DeployedEvent)

func (Hooks) AfterSendToCosmosEvent

func (h Hooks) AfterSendToCosmosEvent(ctx sdk.Context, event gravitytypes.SendToCosmosEvent)

func (Hooks) AfterSignerSetExecutedEvent

func (h Hooks) AfterSignerSetExecutedEvent(ctx sdk.Context, event gravitytypes.SignerSetTxExecutedEvent)

type Keeper

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

Keeper of the oracle store

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace,
	stakingKeeper types.StakingKeeper, gravityKeeper types.GravityKeeper,
) Keeper

NewKeeper creates a new distribution Keeper instance

func (Keeper) AllocationCommit

AllocationCommit implements types.MsgServer

func (Keeper) AllocationPrecommit

AllocationPrecommit implements types.MsgServer

func (Keeper) BeginBlocker

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

BeginBlocker is called at the beginning of every block

func (Keeper) CommitCellarUpdate

func (k Keeper) CommitCellarUpdate(ctx sdk.Context, invalidationNonce uint64, invalidationScope tmbytes.HexBytes)

func (Keeper) DelegateAllocations

DelegateAllocations implements types.MsgServer

func (Keeper) DeleteAllPrecommits

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

DeleteAllPrecommits removes all the prevotes for the current block iteration

func (Keeper) DeleteAllocationCommit

func (k Keeper) DeleteAllocationCommit(ctx sdk.Context, val sdk.ValAddress, cel common.Address)

DeleteAllocationCommit deletes the prevote for a given validator CONTRACT: must provide the validator address here not the delegate address

func (Keeper) DeleteAllocationPrecommit

func (k Keeper) DeleteAllocationPrecommit(ctx sdk.Context, val sdk.ValAddress, cel common.Address)

DeleteAllocationPrecommit deletes the prevote for a given validator CONTRACT: must provide the validator address here not the delegate address

func (Keeper) DeleteCellar

func (k Keeper) DeleteCellar(ctx sdk.Context, cellarAddr common.Address)

func (Keeper) EndBlocker

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

func (Keeper) GetAllAllocationDelegations

func (k Keeper) GetAllAllocationDelegations(ctx sdk.Context) []types.MsgDelegateAllocations

GetAllAllocationDelegations returns all the delegations for allocations

func (Keeper) GetAllocationCommit

func (k Keeper) GetAllocationCommit(ctx sdk.Context, val sdk.ValAddress, cel common.Address) (types.Allocation, bool)

GetAllocationCommit gets the prevote for a given validator CONTRACT: must provide the validator address here not the delegate address

func (Keeper) GetAllocationPrecommit

func (k Keeper) GetAllocationPrecommit(ctx sdk.Context, val sdk.ValAddress, cel common.Address) (types.AllocationPrecommit, bool)

GetAllocationPrecommit gets the prevote for a given validator CONTRACT: must provide the validator address here not the delegate address

func (Keeper) GetCellarByID

func (k Keeper) GetCellarByID(ctx sdk.Context, id common.Address) (cellar types.Cellar, found bool)

func (Keeper) GetCellars

func (k Keeper) GetCellars(ctx sdk.Context) (cellars []types.Cellar)

func (Keeper) GetCommitPeriodStart

func (k Keeper) GetCommitPeriodStart(ctx sdk.Context) (int64, bool)

GetCommitPeriodStart returns the vote period start height

func (Keeper) GetDelegateAddressFromValidator

func (k Keeper) GetDelegateAddressFromValidator(ctx sdk.Context, val sdk.ValAddress) sdk.AccAddress

GetDelegateAddressFromValidator returns the validator address for a given delegate

func (Keeper) GetLatestInvalidationNonce

func (k Keeper) GetLatestInvalidationNonce(ctx sdk.Context) uint64

func (Keeper) GetParamSet

func (k Keeper) GetParamSet(ctx sdk.Context) types.Params

GetParamSet returns the vote period from the parameters

func (Keeper) GetPendingCellarUpdate

func (k Keeper) GetPendingCellarUpdate(ctx sdk.Context, invalidationNonce uint64) (types.CellarUpdate, bool)

func (Keeper) GetValidatorAddressFromDelegate

func (k Keeper) GetValidatorAddressFromDelegate(ctx sdk.Context, del sdk.AccAddress) sdk.ValAddress

GetValidatorAddressFromDelegate returns the delegate address for a given validator

func (Keeper) HasAllocationCommit

func (k Keeper) HasAllocationCommit(ctx sdk.Context, val sdk.ValAddress) bool

HasAllocationCommit gets the existence of any commit for a given validator CONTRACT: must provide the validator address here not the delegate address

func (Keeper) HasAllocationCommitForCellar

func (k Keeper) HasAllocationCommitForCellar(ctx sdk.Context, val sdk.ValAddress, cel common.Address) bool

HasAllocationCommitForCellar gets the prevote for a given validator CONTRACT: must provide the validator address here not the delegate address

func (Keeper) HasAllocationPrecommit

func (k Keeper) HasAllocationPrecommit(ctx sdk.Context, val sdk.ValAddress, cel common.Address) bool

HasAllocationPrecommit gets the precommit for a given validator CONTRACT: must provide the validator address here not the delegate address

func (Keeper) HasCommitPeriodStart

func (k Keeper) HasCommitPeriodStart(ctx sdk.Context) bool

HasCommitPeriodStart returns true if the vote period start has been set

func (Keeper) HasPendingCellarUpdate

func (k Keeper) HasPendingCellarUpdate(ctx sdk.Context, invalidationNonce uint64) bool

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

Hooks Return the wrapper struct

func (Keeper) IncrementInvalidationNonce

func (k Keeper) IncrementInvalidationNonce(ctx sdk.Context) uint64

func (Keeper) IsDelegateAddress

func (k Keeper) IsDelegateAddress(ctx sdk.Context, del sdk.AccAddress) bool

IsDelegateAddress returns true if the validator has delegated their feed to an address

func (Keeper) IterateAllocationCommitValidators

func (k Keeper) IterateAllocationCommitValidators(ctx sdk.Context, handler func(val sdk.ValAddress) (stop bool))

IterateAllocationCommitValidators iterates over all validators who have committed allocations

func (Keeper) IterateAllocationCommits

func (k Keeper) IterateAllocationCommits(ctx sdk.Context, handler func(val sdk.ValAddress, cel common.Address, commit types.Allocation) (stop bool))

IterateAllocationCommits iterates over all votes in the store

func (Keeper) IterateAllocationPrecommits

func (k Keeper) IterateAllocationPrecommits(ctx sdk.Context, cb func(val sdk.ValAddress, cel common.Address, precommit types.AllocationPrecommit) (stop bool))

IterateAllocationPrecommits iterates over all prevotes in the store

func (Keeper) IterateCellars

func (k Keeper) IterateCellars(ctx sdk.Context, cb func(cellar types.Cellar) (stop bool))

func (Keeper) IterateDelegateAddresses

func (k Keeper) IterateDelegateAddresses(ctx sdk.Context, handler func(del sdk.AccAddress, val sdk.ValAddress) (stop bool))

IterateDelegateAddresses iterates over all delegate address pairs in the store

func (Keeper) IterateValidatorAllocationCommits

func (k Keeper) IterateValidatorAllocationCommits(ctx sdk.Context, val sdk.ValAddress, handler func(cellar common.Address, commit types.Allocation) (stop bool))

IterateValidatorAllocationCommits Iterates all of the commits for a provided validator

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) QueryAllocationCommit

QueryAllocationCommit implements QueryServer

func (Keeper) QueryAllocationPrecommit

QueryAllocationPrecommit implements QueryServer

func (Keeper) QueryCommitPeriod

QueryCommitPeriod implements QueryServer

func (Keeper) QueryDelegateAddress

QueryDelegateAddress implements QueryServer

func (Keeper) QueryParams

QueryParams implements QueryServer

func (Keeper) QueryValidatorAddress

QueryValidatorAddress implements QueryServer

func (Keeper) SetAllocationCommit

func (k Keeper) SetAllocationCommit(ctx sdk.Context, val sdk.ValAddress, cel common.Address, allocationCommit types.Allocation)

SetAllocationCommit sets the prevote for a given validator CONTRACT: must provide the validator address here not the delegate address

func (Keeper) SetAllocationPrecommit

func (k Keeper) SetAllocationPrecommit(ctx sdk.Context, validatorAddr sdk.ValAddress, cellarAddr common.Address, precommit types.AllocationPrecommit)

SetAllocationPrecommit sets the precommit for a given validator CONTRACT: must provide the validator address here not the delegate address

func (Keeper) SetCellar

func (k Keeper) SetCellar(ctx sdk.Context, c types.Cellar)

func (Keeper) SetCommitPeriodStart

func (k Keeper) SetCommitPeriodStart(ctx sdk.Context, height int64)

SetCommitPeriodStart sets the current vote period start height

func (Keeper) SetLatestInvalidationNonce

func (k Keeper) SetLatestInvalidationNonce(ctx sdk.Context, invalidationNonce uint64)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the parameters in the store

func (Keeper) SetPendingCellarUpdate

func (k Keeper) SetPendingCellarUpdate(ctx sdk.Context, cellarUpdate types.CellarUpdate)

func (Keeper) SetValidatorDelegateAddress

func (k Keeper) SetValidatorDelegateAddress(ctx sdk.Context, del sdk.AccAddress, val sdk.ValAddress)

SetValidatorDelegateAddress sets a new address that will have the power to send data on behalf of the validator

Jump to

Keyboard shortcuts

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