Documentation ¶
Index ¶
- func CampaignCurrentAmountSumCheckInvariant(k Keeper) sdk.Invariant
- func CreateFeegrantAccountAddress(campaignId uint64) (string, sdk.AccAddress)
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- type Keeper
- func (k Keeper) AddClaimRecords(ctx sdk.Context, owner string, campaignId uint64, ...) error
- func (k Keeper) AddMission(ctx sdk.Context, owner string, campaignId uint64, name string, ...) (*types.Mission, error)
- func (k Keeper) AllMissionForCampaign(ctx sdk.Context, campaignId uint64) (list []types.Mission, weightSum sdk.Dec)
- func (k Keeper) AppendNewCampaign(ctx sdk.Context, campaign types.Campaign) uint64
- func (k Keeper) AppendNewMission(ctx sdk.Context, campaignId uint64, mission types.Mission) uint64
- func (k Keeper) Campaign(goCtx context.Context, req *types.QueryCampaignRequest) (*types.QueryCampaignResponse, error)
- func (k Keeper) CampaignMissions(c context.Context, req *types.QueryCampaignMissionsRequest) (*types.QueryCampaignMissionsResponse, error)
- func (k Keeper) Campaigns(goCtx context.Context, req *types.QueryCampaignsRequest) (*types.QueryCampaignsResponse, error)
- func (k Keeper) Claim(ctx sdk.Context, campaignId uint64, missionId uint64, claimer string) (sdk.Coins, error)
- func (k Keeper) CloseCampaign(ctx sdk.Context, owner string, campaignId uint64) error
- func (k Keeper) CompleteMissionFromHook(ctx sdk.Context, campaignId uint64, missionId uint64, address string) error
- func (k Keeper) CreateCampaign(ctx sdk.Context, owner string, name string, description string, ...) (*types.Campaign, error)
- func (k Keeper) DeleteClaimRecord(ctx sdk.Context, owner string, campaignId uint64, userAddress string) error
- func (k Keeper) EnableCampaign(ctx sdk.Context, owner string, campaignId uint64, startTime *time.Time, ...) error
- func (k Keeper) GetAccountAddressModuleAccount(ctx sdk.Context, accountName string) sdk.AccAddress
- func (k Keeper) GetAccountCoins(ctx sdk.Context, account sdk.AccAddress) sdk.Coins
- func (k Keeper) GetAccountCoinsForModuleAccount(ctx sdk.Context, accountName string) sdk.Coins
- func (k Keeper) GetAllCampaigns(ctx sdk.Context) (list []types.Campaign)
- func (k Keeper) GetAllMission(ctx sdk.Context) (list []types.Mission)
- func (k Keeper) GetAllMissionCount(ctx sdk.Context) (missionCounts []*types.MissionCount)
- func (k Keeper) GetAllUsersEntries(ctx sdk.Context) (list []types.UserEntry)
- func (k Keeper) GetCampaign(ctx sdk.Context, campaignId uint64) (val types.Campaign, found bool)
- func (k Keeper) GetCampaignCount(ctx sdk.Context) uint64
- func (k Keeper) GetMission(ctx sdk.Context, campaignId uint64, missionId uint64) (val types.Mission, found bool)
- func (k Keeper) GetMissionCount(ctx sdk.Context, campaignId uint64) uint64
- func (k Keeper) GetUserEntry(ctx sdk.Context, address string) (val types.UserEntry, found bool)
- func (k Keeper) InitialClaim(ctx sdk.Context, claimer string, campaignId uint64, destinationAddress string) (sdk.Coins, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Mission(c context.Context, req *types.QueryMissionRequest) (*types.QueryMissionResponse, error)
- func (k Keeper) Missions(c context.Context, req *types.QueryMissionsRequest) (*types.QueryMissionsResponse, error)
- func (k Keeper) MustGetCampaign(ctx sdk.Context, campaignId uint64) (*types.Campaign, error)
- func (k Keeper) MustGetMission(ctx sdk.Context, campaignId uint64, missionId uint64) (*types.Mission, error)
- func (k Keeper) MustGetUserEntry(ctx sdk.Context, userAddress string) (types.UserEntry, error)
- func (k Keeper) NewMissionDelegationHooks() MissionDelegationHooks
- func (k Keeper) NewMissionVoteHooks() MissionVoteHooks
- func (k Keeper) RemoveAllMissionForCampaign(ctx sdk.Context, campaignId uint64)
- func (k Keeper) RemoveCampaign(ctx sdk.Context, owner string, campaignId uint64) error
- func (k Keeper) RemoveMissionCount(ctx sdk.Context, campaignId uint64)
- func (k Keeper) SetCampaign(ctx sdk.Context, campaign types.Campaign)
- func (k Keeper) SetCampaignCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetMission(ctx sdk.Context, mission types.Mission)
- func (k Keeper) SetMissionCount(ctx sdk.Context, campaignId uint64, count uint64)
- func (k Keeper) SetUserEntry(ctx sdk.Context, userEntry types.UserEntry)
- func (k Keeper) SetupNewFeegrantAccount(ctx sdk.Context, campaignId uint64) sdk.AccAddress
- func (k Keeper) UserEntry(c context.Context, req *types.QueryUserEntryRequest) (*types.QueryUserEntryResponse, error)
- func (k Keeper) UsersEntries(c context.Context, req *types.QueryUsersEntriesRequest) (*types.QueryUsersEntriesResponse, error)
- func (k Keeper) ValidateAddClaimRecords(ctx sdk.Context, owner string, campaignId uint64, ...) (*types.Campaign, error)
- func (k Keeper) ValidateAddMission(ctx sdk.Context, owner string, campaignId uint64, name string, ...) (*types.Campaign, error)
- func (k Keeper) ValidateCampaignParams(ctx sdk.Context, name string, feegrantAmount math.Int, ...) error
- func (k Keeper) ValidateMissionsWeightAndType(ctx sdk.Context, campaignId uint64, newMissionWeight sdk.Dec, ...) error
- func (k Keeper) ValidateVestingPoolCampaign(ctx sdk.Context, owner string, vestingPoolName string, ...) error
- type MissionDelegationHooks
- func (h MissionDelegationHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, _ sdk.ValAddress) error
- func (h MissionDelegationHooks) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error
- func (h MissionDelegationHooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h MissionDelegationHooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h MissionDelegationHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error
- func (h MissionDelegationHooks) AfterValidatorRemoved(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
- func (h MissionDelegationHooks) BeforeDelegationCreated(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h MissionDelegationHooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h MissionDelegationHooks) BeforeDelegationSharesModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
- func (h MissionDelegationHooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error
- func (h MissionDelegationHooks) BeforeValidatorSlashed(_ sdk.Context, _ sdk.ValAddress, _ sdk.Dec) error
- type MissionVoteHooks
- func (h MissionVoteHooks) AfterProposalDeposit(_ sdk.Context, _ uint64, _ sdk.AccAddress)
- func (h MissionVoteHooks) AfterProposalFailedMinDeposit(_ sdk.Context, _ uint64)
- func (h MissionVoteHooks) AfterProposalSubmission(_ sdk.Context, _ uint64)
- func (h MissionVoteHooks) AfterProposalVote(ctx sdk.Context, _ uint64, voterAddr sdk.AccAddress)
- func (h MissionVoteHooks) AfterProposalVotingPeriodEnded(_ sdk.Context, _ uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CampaignCurrentAmountSumCheckInvariant ¶
CampaignCurrentAmountSumCheckInvariant checks that sum of claim claims left is equal to cfeaidrop module account balance
func CreateFeegrantAccountAddress ¶
func CreateFeegrantAccountAddress(campaignId uint64) (string, sdk.AccAddress)
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
RegisterInvariants register cfedistribution invariants
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, feeGrantKeeper types.FeeGrantKeeper, stakingKeeper types.StakingKeeper, vestingKeeper types.CfeVestingKeeper, ) *Keeper
func (Keeper) AddClaimRecords ¶
func (Keeper) AddMission ¶
func (Keeper) AllMissionForCampaign ¶
func (k Keeper) AllMissionForCampaign(ctx sdk.Context, campaignId uint64) (list []types.Mission, weightSum sdk.Dec)
AllMissionForCampaign returns all mission for campaign
func (Keeper) AppendNewCampaign ¶
AppendNewCampaign appends a campaign in the store with a new id and update the count
func (Keeper) AppendNewMission ¶
func (Keeper) Campaign ¶
func (k Keeper) Campaign(goCtx context.Context, req *types.QueryCampaignRequest) (*types.QueryCampaignResponse, error)
func (Keeper) CampaignMissions ¶
func (k Keeper) CampaignMissions(c context.Context, req *types.QueryCampaignMissionsRequest) (*types.QueryCampaignMissionsResponse, error)
func (Keeper) Campaigns ¶
func (k Keeper) Campaigns(goCtx context.Context, req *types.QueryCampaignsRequest) (*types.QueryCampaignsResponse, error)
func (Keeper) CloseCampaign ¶
func (Keeper) CompleteMissionFromHook ¶
func (Keeper) CreateCampaign ¶
func (k Keeper) CreateCampaign(ctx sdk.Context, owner string, name string, description string, campaignType types.CampaignType, removableClaimRecords bool, feegrantAmount math.Int, initialClaimFreeAmount math.Int, free sdk.Dec, startTime time.Time, endTime time.Time, lockupPeriod time.Duration, vestingPeriod time.Duration, vestingPoolName string) (*types.Campaign, error)
func (Keeper) DeleteClaimRecord ¶
func (Keeper) EnableCampaign ¶
func (Keeper) GetAccountAddressModuleAccount ¶
func (Keeper) GetAccountCoins ¶
func (Keeper) GetAccountCoinsForModuleAccount ¶
func (Keeper) GetAllCampaigns ¶
GetAllCampaigns returns all campaignO
func (Keeper) GetAllMission ¶
GetAllMission returns all mission
func (Keeper) GetAllMissionCount ¶
func (k Keeper) GetAllMissionCount(ctx sdk.Context) (missionCounts []*types.MissionCount)
GetAllMissionCount returns all mission count
func (Keeper) GetAllUsersEntries ¶
GetAllUsersEntries returns all UserEntries
func (Keeper) GetCampaign ¶
GetCampaign returns a campaignO from its index
func (Keeper) GetMission ¶
func (k Keeper) GetMission( ctx sdk.Context, campaignId uint64, missionId uint64, ) (val types.Mission, found bool)
GetMission returns a mission from its index
func (Keeper) GetMissionCount ¶
func (Keeper) GetUserEntry ¶
GetUserEntry returns a claimRecordXX from its index
func (Keeper) InitialClaim ¶
func (Keeper) Mission ¶
func (k Keeper) Mission(c context.Context, req *types.QueryMissionRequest) (*types.QueryMissionResponse, error)
func (Keeper) Missions ¶
func (k Keeper) Missions(c context.Context, req *types.QueryMissionsRequest) (*types.QueryMissionsResponse, error)
func (Keeper) MustGetCampaign ¶
func (Keeper) MustGetMission ¶
func (k Keeper) MustGetMission( ctx sdk.Context, campaignId uint64, missionId uint64, ) (*types.Mission, error)
MustGetMission returns a mission from its index
func (Keeper) MustGetUserEntry ¶
func (Keeper) NewMissionDelegationHooks ¶
func (k Keeper) NewMissionDelegationHooks() MissionDelegationHooks
NewMissionDelegationHooks returns a StakingHooks that triggers mission completion on delegation for an account
func (Keeper) NewMissionVoteHooks ¶
func (k Keeper) NewMissionVoteHooks() MissionVoteHooks
NewMissionVoteHooks returns a GovHooks that triggers mission completion on voting for a proposal
func (Keeper) RemoveAllMissionForCampaign ¶
RemoveAllMissionForCampaign removes all mission for campaign
func (Keeper) RemoveCampaign ¶
func (Keeper) RemoveMissionCount ¶
func (Keeper) SetCampaign ¶
SetCampaign set a specific campaignO in the store from its index
func (Keeper) SetMission ¶
SetMission set a specific mission in the store from its index
func (Keeper) SetMissionCount ¶
func (Keeper) SetUserEntry ¶
SetUserEntry set a specific claimRecordXX in the store from its index
func (Keeper) SetupNewFeegrantAccount ¶
func (Keeper) UserEntry ¶
func (k Keeper) UserEntry(c context.Context, req *types.QueryUserEntryRequest) (*types.QueryUserEntryResponse, error)
func (Keeper) UsersEntries ¶
func (k Keeper) UsersEntries(c context.Context, req *types.QueryUsersEntriesRequest) (*types.QueryUsersEntriesResponse, error)
func (Keeper) ValidateAddClaimRecords ¶
func (Keeper) ValidateAddMission ¶
func (Keeper) ValidateCampaignParams ¶
func (k Keeper) ValidateCampaignParams(ctx sdk.Context, name string, feegrantAmount math.Int, inititalClaimFreeAmount math.Int, free sdk.Dec, startTime time.Time, endTime time.Time, campaignType types.CampaignType, owner string, vestingPoolName string, lockupPeriod time.Duration, vestingPeriod time.Duration) error
func (Keeper) ValidateMissionsWeightAndType ¶
type MissionDelegationHooks ¶
type MissionDelegationHooks struct {
// contains filtered or unexported fields
}
func (MissionDelegationHooks) AfterDelegationModified ¶
func (h MissionDelegationHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, _ sdk.ValAddress) error
AfterDelegationModified implements StakingHooks
func (MissionDelegationHooks) AfterUnbondingInitiated ¶
func (h MissionDelegationHooks) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error
func (MissionDelegationHooks) AfterValidatorBeginUnbonding ¶
func (h MissionDelegationHooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
AfterValidatorBeginUnbonding implements StakingHooks
func (MissionDelegationHooks) AfterValidatorBonded ¶
func (h MissionDelegationHooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
AfterValidatorBonded implements StakingHooks
func (MissionDelegationHooks) AfterValidatorCreated ¶
func (h MissionDelegationHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error
AfterValidatorCreated implements StakingHooks
func (MissionDelegationHooks) AfterValidatorRemoved ¶
func (h MissionDelegationHooks) AfterValidatorRemoved(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error
AfterValidatorRemoved implements StakingHooks
func (MissionDelegationHooks) BeforeDelegationCreated ¶
func (h MissionDelegationHooks) BeforeDelegationCreated(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
BeforeDelegationCreated completes mission when a delegation is performed
func (MissionDelegationHooks) BeforeDelegationRemoved ¶
func (h MissionDelegationHooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
BeforeDelegationRemoved implements StakingHooks
func (MissionDelegationHooks) BeforeDelegationSharesModified ¶
func (h MissionDelegationHooks) BeforeDelegationSharesModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error
BeforeDelegationSharesModified implements StakingHooks
func (MissionDelegationHooks) BeforeValidatorModified ¶
func (h MissionDelegationHooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error
BeforeValidatorModified implements StakingHooks
func (MissionDelegationHooks) BeforeValidatorSlashed ¶
func (h MissionDelegationHooks) BeforeValidatorSlashed(_ sdk.Context, _ sdk.ValAddress, _ sdk.Dec) error
BeforeValidatorSlashed implements StakingHooks
type MissionVoteHooks ¶
type MissionVoteHooks struct {
// contains filtered or unexported fields
}
func (MissionVoteHooks) AfterProposalDeposit ¶
func (h MissionVoteHooks) AfterProposalDeposit(_ sdk.Context, _ uint64, _ sdk.AccAddress)
AfterProposalDeposit implements GovHooks
func (MissionVoteHooks) AfterProposalFailedMinDeposit ¶
func (h MissionVoteHooks) AfterProposalFailedMinDeposit(_ sdk.Context, _ uint64)
AfterProposalFailedMinDeposit implements GovHooks
func (MissionVoteHooks) AfterProposalSubmission ¶
func (h MissionVoteHooks) AfterProposalSubmission(_ sdk.Context, _ uint64)
AfterProposalSubmission implements GovHooks
func (MissionVoteHooks) AfterProposalVote ¶
func (h MissionVoteHooks) AfterProposalVote(ctx sdk.Context, _ uint64, voterAddr sdk.AccAddress)
AfterProposalVote completes mission when a vote is cast
func (MissionVoteHooks) AfterProposalVotingPeriodEnded ¶
func (h MissionVoteHooks) AfterProposalVotingPeriodEnded(_ sdk.Context, _ uint64)
AfterProposalVotingPeriodEnded implements GovHooks
Source Files ¶
- campaign.go
- campaign_store.go
- claim.go
- claim_record.go
- claim_record_store.go
- feegrant.go
- grpc_query.go
- grpc_query_campaign.go
- grpc_query_mission.go
- grpc_query_users_entry.go
- invariants.go
- keeper.go
- mission.go
- mission_delegation_hooks.go
- mission_store.go
- mission_vote_hooks.go
- msg_server.go
- msg_server_campaign.go
- msg_server_claim.go
- msg_server_claim_record.go
- msg_server_mission.go