keeper

package
v1.0.3-prerelease Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateClaimTypedDataBytes

func GenerateClaimTypedDataBytes(ethAddress, arkeoAddress, amount string) ([]byte, error)

func IsValidClaimSignature

func IsValidClaimSignature(ethAddress, arkeoAdddress, amount, signature string) (bool, error)

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Hooks

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

Hooks wrapper struct

func (Hooks) AfterDelegationModified

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

func (Hooks) AfterProposalDeposit

func (h Hooks) AfterProposalDeposit(ctx context.Context, proposalID uint64, depositorAddr sdk.AccAddress) error

func (Hooks) AfterProposalFailedMinDeposit

func (h Hooks) AfterProposalFailedMinDeposit(ctx context.Context, proposalID uint64) error

func (Hooks) AfterProposalSubmission

func (h Hooks) AfterProposalSubmission(ctx context.Context, proposalID uint64) error

governance hooks

func (Hooks) AfterProposalVote

func (h Hooks) AfterProposalVote(ctx context.Context, proposalID uint64, voterAddr sdk.AccAddress) error

func (Hooks) AfterProposalVotingPeriodEnded

func (h Hooks) AfterProposalVotingPeriodEnded(ctx context.Context, proposalID uint64) error

func (Hooks) AfterUnbondingInitiated

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

func (Hooks) AfterValidatorBeginUnbonding

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

func (Hooks) AfterValidatorBonded

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

func (Hooks) AfterValidatorCreated

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

staking hooks

func (Hooks) AfterValidatorRemoved

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

func (Hooks) BeforeDelegationCreated

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

func (Hooks) BeforeDelegationRemoved

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

func (Hooks) BeforeDelegationSharesModified

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

func (Hooks) BeforeValidatorModified

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

func (Hooks) BeforeValidatorSlashed

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

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	logger log.Logger,
) Keeper

func (Keeper) AfterDelegationModified

func (k Keeper) AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

func (Keeper) AfterProposalVote

func (k Keeper) AfterProposalVote(ctx context.Context, proposalID uint64, voterAddr sdk.AccAddress)

func (Keeper) AirdropStartTime

func (k Keeper) AirdropStartTime(ctx sdk.Context) (res time.Time)

func (Keeper) ClaimCoinsForAction

func (k Keeper) ClaimCoinsForAction(ctx sdk.Context, addr string, action types.Action) (sdk.Coin, error)

ClaimCoins remove claimable amount entry and transfer it to user's account

func (Keeper) ClaimDenom

func (k Keeper) ClaimDenom(ctx sdk.Context) (res string)

ClaimDenom returns the ClaimDenom param

func (Keeper) DurationOfDecay

func (k Keeper) DurationOfDecay(ctx sdk.Context) (res time.Duration)

DurationOfDecay returns the DurationOfDecay param

func (Keeper) DurationUntilDecay

func (k Keeper) DurationUntilDecay(ctx sdk.Context) (res time.Duration)

DurationUntilDecay returns the DurationUntilDecay param

func (Keeper) GetAllClaimRecords

func (k Keeper) GetAllClaimRecords(ctx sdk.Context) ([]types.ClaimRecord, error)

func (Keeper) GetClaimRecord

func (k Keeper) GetClaimRecord(ctx sdk.Context, addr string, chain types.Chain) (types.ClaimRecord, error)

GetClaimRecord returns the claim record for a specific address

func (Keeper) GetClaimRecords

func (k Keeper) GetClaimRecords(ctx sdk.Context, chain types.Chain) ([]types.ClaimRecord, error)

GetClaimables get claimables for genesis export

func (Keeper) GetClaimableAmountForAction

func (k Keeper) GetClaimableAmountForAction(ctx sdk.Context, addr string, action types.Action, chain types.Chain) (sdk.Coin, error)

GetClaimable returns claimable amount for a specific action done by an address

func (Keeper) GetModuleAccountAddress

func (k Keeper) GetModuleAccountAddress(ctx sdk.Context) sdk.AccAddress

GetModuleAccountBalance gets the airdrop coin balance of module account

func (Keeper) GetModuleAccountBalance

func (k Keeper) GetModuleAccountBalance(ctx sdk.Context) sdk.Coin

GetModuleAccountBalance gets the airdrop coin balance of module account

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetUserTotalClaimable

func (k Keeper) GetUserTotalClaimable(ctx sdk.Context, addr string, chain types.Chain) (sdk.Coin, error)

GetUserTotalClaimable returns the total claimable amount for an address across all actions

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

Return the wrapper struct

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) SetClaimRecord

func (k Keeper) SetClaimRecord(ctx sdk.Context, claimRecord types.ClaimRecord) error

SetClaimRecord sets a claim record for an address in store

func (Keeper) SetClaimRecords

func (k Keeper) SetClaimRecords(ctx sdk.Context, claimRecords []types.ClaimRecord) error

SetClaimables set claimable amount from balances object

func (Keeper) SetParams

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

SetParams set the params

Jump to

Keyboard shortcuts

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