Documentation ¶
Index ¶
- type Hooks
- func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) AfterProposalActive(ctx sdk.Context, proposalID uint64)
- func (h Hooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress)
- func (h Hooks) AfterProposalFailedMinDeposit(ctx sdk.Context, proposalID uint64)
- func (h Hooks) AfterProposalInactive(ctx sdk.Context, proposalID uint64)
- func (h Hooks) AfterProposalSubmission(ctx sdk.Context, proposalID uint64)
- func (h Hooks) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress)
- func (h Hooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID uint64)
- func (h Hooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
- func (h Hooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
- func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress)
- func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
- func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress)
- func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec)
- func (h Hooks) PostTxProcessing(ctx sdk.Context, from common.Address, to *common.Address, ...) error
- func (h Hooks) SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, ...) error
- type Keeper
- func (k Keeper) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (k Keeper) AfterEVMStateTransition(ctx sdk.Context, from common.Address, to *common.Address, ...) error
- func (k Keeper) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress)
- func (k Keeper) ClaimCoinsForAction(ctx sdk.Context, addr sdk.AccAddress, claimsRecord types.ClaimsRecord, ...) (sdk.Int, error)
- func (k Keeper) ClaimsRecord(goCtx context.Context, req *types.QueryClaimsRecordRequest) (*types.QueryClaimsRecordResponse, error)
- func (k Keeper) ClaimsRecords(goCtx context.Context, req *types.QueryClaimsRecordsRequest) (*types.QueryClaimsRecordsResponse, error)
- func (k Keeper) ClawbackEmptyAccounts(ctx sdk.Context, claimsDenom string)
- func (k Keeper) ClawbackEscrowedTokens(ctx sdk.Context) error
- func (k Keeper) DeleteClaimsRecord(ctx sdk.Context, addr sdk.AccAddress)
- func (k Keeper) EndAirdrop(ctx sdk.Context, params types.Params) error
- func (k Keeper) EndBlocker(ctx sdk.Context)
- func (k Keeper) GetClaimableAmountForAction(ctx sdk.Context, claimsRecord types.ClaimsRecord, action types.Action, ...) sdk.Int
- func (k Keeper) GetClaimsRecord(ctx sdk.Context, addr sdk.AccAddress) (types.ClaimsRecord, bool)
- func (k Keeper) GetClaimsRecords(ctx sdk.Context) []types.ClaimsRecordAddress
- func (k Keeper) GetModuleAccountAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetModuleAccountAddress(ctx sdk.Context) sdk.AccAddress
- func (k Keeper) GetModuleAccountBalances(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetUserTotalClaimable(ctx sdk.Context, addr sdk.AccAddress) sdk.Int
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IterateClaimsRecords(ctx sdk.Context, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MergeClaimsRecords(ctx sdk.Context, recipient sdk.AccAddress, ...) (mergedRecord types.ClaimsRecord, err error)
- func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte) error
- func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, ack exported.Acknowledgement) exported.Acknowledgement
- func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetClaimsRecord(ctx sdk.Context, addr sdk.AccAddress, claimsRecord types.ClaimsRecord)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) TotalUnclaimed(c context.Context, _ *types.QueryTotalUnclaimedRequest) (*types.QueryTotalUnclaimedResponse, error)
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 wrapper struct for the claim keeper
func (Hooks) AfterDelegationModified ¶
func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Hooks) AfterProposalActive ¶
func (Hooks) AfterProposalDeposit ¶
func (Hooks) AfterProposalFailedMinDeposit ¶
governance hooks
func (Hooks) AfterProposalInactive ¶
func (Hooks) AfterProposalSubmission ¶
func (Hooks) AfterProposalVote ¶
func (Hooks) AfterProposalVotingPeriodEnded ¶
func (Hooks) AfterValidatorBeginUnbonding ¶
func (h Hooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
func (Hooks) AfterValidatorBonded ¶
func (h Hooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
func (Hooks) AfterValidatorCreated ¶
func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress)
func (Hooks) AfterValidatorRemoved ¶
func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
func (Hooks) BeforeDelegationCreated ¶
func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Hooks) BeforeDelegationRemoved ¶
func (h Hooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Hooks) BeforeDelegationSharesModified ¶
func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Hooks) BeforeValidatorModified ¶
func (h Hooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress)
func (Hooks) BeforeValidatorSlashed ¶
func (Hooks) PostTxProcessing ¶
func (h Hooks) PostTxProcessing(ctx sdk.Context, from common.Address, to *common.Address, receipt *ethtypes.Receipt) error
evm hook
func (Hooks) SendPacket ¶
func (h Hooks) SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet exported.PacketI) error
SendPacket implements the ICS4Wrapper interface from the transfer module. It calls the underlying SendPacket function directly to move down the middleware stack.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper struct
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeKey sdk.StoreKey, ps paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper, dk types.DistrKeeper, ics4Wrapper transfertypes.ICS4Wrapper, ) *Keeper
NewKeeper returns keeper
func (Keeper) AfterDelegationModified ¶
func (k Keeper) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Keeper) AfterEVMStateTransition ¶
func (Keeper) AfterProposalVote ¶
func (Keeper) ClaimCoinsForAction ¶
func (k Keeper) ClaimCoinsForAction( ctx sdk.Context, addr sdk.AccAddress, claimsRecord types.ClaimsRecord, action types.Action, params types.Params, ) (sdk.Int, error)
ClaimCoinsForAction remove claimable amount entry and transfer it to user's account
func (Keeper) ClaimsRecord ¶
func (k Keeper) ClaimsRecord( goCtx context.Context, req *types.QueryClaimsRecordRequest, ) (*types.QueryClaimsRecordResponse, error)
ClaimsRecord returns initial claimable amount per user and the claims per action
func (Keeper) ClaimsRecords ¶
func (k Keeper) ClaimsRecords( goCtx context.Context, req *types.QueryClaimsRecordsRequest, ) (*types.QueryClaimsRecordsResponse, error)
ClaimsRecords returns all the the claimable records
func (Keeper) ClawbackEmptyAccounts ¶
ClawbackEmptyAccounts performs the a clawback off all the allocated tokens from airdrop recipient accounts with a sequence number of 0 (i.e the account hasn't performed a single tx during the claim window). Once the account is clawbacked, the claim record is deleted from state.
func (Keeper) ClawbackEscrowedTokens ¶
ClawbackEscrowedTokens transfers all the escrowed airdrop tokens on the ModuleAccount to the community pool.
func (Keeper) DeleteClaimsRecord ¶
func (k Keeper) DeleteClaimsRecord(ctx sdk.Context, addr sdk.AccAddress)
DeleteClaimsRecord deletes a claim record from the store
func (Keeper) EndAirdrop ¶
EndAirdrop transfers the unclaimed tokens from the airdrop to the community pool, then clears the state by removing all the entries
func (Keeper) EndBlocker ¶
EndBlocker checks if the airdrop claiming period has ended
func (Keeper) GetClaimableAmountForAction ¶
func (k Keeper) GetClaimableAmountForAction( ctx sdk.Context, claimsRecord types.ClaimsRecord, action types.Action, params types.Params, ) sdk.Int
GetClaimableAmountForAction returns claimable amount for a specific action done by an address
func (Keeper) GetClaimsRecord ¶
func (k Keeper) GetClaimsRecord(ctx sdk.Context, addr sdk.AccAddress) (types.ClaimsRecord, bool)
GetClaimsRecord returns the claim record for a specific address
func (Keeper) GetClaimsRecords ¶
func (k Keeper) GetClaimsRecords(ctx sdk.Context) []types.ClaimsRecordAddress
GetClaimsRecords get claimables for genesis export
func (Keeper) GetModuleAccountAccount ¶
func (k Keeper) GetModuleAccountAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetModuleAccountAccount returns the module account for the claim module
func (Keeper) GetModuleAccountAddress ¶
func (k Keeper) GetModuleAccountAddress(ctx sdk.Context) sdk.AccAddress
GetModuleAccountAddress gets the airdrop coin balance of module account
func (Keeper) GetModuleAccountBalances ¶
GetModuleAccountBalances gets the balances of module account that escrows the airdrop tokens
func (Keeper) GetUserTotalClaimable ¶
GetUserTotalClaimable returns claimable amount for a specific action done by an address
func (Keeper) IterateClaimsRecords ¶
func (k Keeper) IterateClaimsRecords(ctx sdk.Context, handlerFn func(addr sdk.AccAddress, cr types.ClaimsRecord) (stop bool))
func (Keeper) MergeClaimsRecords ¶
func (k Keeper) MergeClaimsRecords( ctx sdk.Context, recipient sdk.AccAddress, senderClaimsRecord, recipientClaimsRecord types.ClaimsRecord, params types.Params, ) (mergedRecord types.ClaimsRecord, err error)
MergeClaimsRecords merges two claim records from the sender and recipient of the IBC transfer while claiming the amount for the all the sender actions on behalf of the recipient.
func (Keeper) OnAcknowledgementPacket ¶
func (k Keeper) OnAcknowledgementPacket( ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, ) error
OnAcknowledgementPacket claims the amount from the `ActionIBCTransfer` for the sender of the IBC transfer. The function performs a no-op if claims are disabled globally, acknowledgment failed, or if sender the sender has no claims record.
func (Keeper) OnRecvPacket ¶
func (k Keeper) OnRecvPacket( ctx sdk.Context, packet channeltypes.Packet, ack exported.Acknowledgement, ) exported.Acknowledgement
OnRecvPacket performs an IBC receive callback. It performs a no-op if claims are inactive
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params returns params of the claim module.
func (Keeper) SetClaimsRecord ¶
func (k Keeper) SetClaimsRecord(ctx sdk.Context, addr sdk.AccAddress, claimsRecord types.ClaimsRecord)
SetClaimsRecord sets a claim record for an address in store
func (Keeper) TotalUnclaimed ¶
func (k Keeper) TotalUnclaimed(c context.Context, _ *types.QueryTotalUnclaimedRequest) (*types.QueryTotalUnclaimedResponse, error)
TotalUnclaimed returns the total amount unclaimed from the airdrop.