Documentation
¶
Index ¶
- func AccountWithoutCampaignInvariant(k Keeper) sdk.Invariant
- func AllInvariants(k Keeper) sdk.Invariant
- func CampaignSharesInvariant(k Keeper) sdk.Invariant
- func GetCampaignIDBytes(id uint64) []byte
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- func VestingAccountWithoutCampaignInvariant(k Keeper) sdk.Invariant
- type Keeper
- func (k Keeper) AddChainToCampaign(ctx sdk.Context, campaignID, launchID uint64) error
- func (k Keeper) AppendCampaign(ctx sdk.Context, campaign types.Campaign) uint64
- func (k Keeper) Campaign(c context.Context, req *types.QueryGetCampaignRequest) (*types.QueryGetCampaignResponse, error)
- func (k Keeper) CampaignAll(c context.Context, req *types.QueryAllCampaignRequest) (*types.QueryAllCampaignResponse, error)
- func (k Keeper) CampaignChains(c context.Context, req *types.QueryGetCampaignChainsRequest) (*types.QueryGetCampaignChainsResponse, error)
- func (k Keeper) CampaignCreationFee(ctx sdk.Context) (campaignCreationFee sdk.Coins)
- func (k Keeper) CampaignSummaries(goCtx context.Context, req *types.QueryCampaignSummariesRequest) (*types.QueryCampaignSummariesResponse, error)
- func (k Keeper) CampaignSummary(goCtx context.Context, req *types.QueryCampaignSummaryRequest) (*types.QueryCampaignSummaryResponse, error)
- func (k Keeper) GetAllCampaign(ctx sdk.Context) (list []types.Campaign)
- func (k Keeper) GetAllCampaignChains(ctx sdk.Context) (list []types.CampaignChains)
- func (k Keeper) GetAllMainnetAccount(ctx sdk.Context) (list []types.MainnetAccount)
- func (k Keeper) GetAllMainnetVestingAccount(ctx sdk.Context) (list []types.MainnetVestingAccount)
- func (k Keeper) GetCampaign(ctx sdk.Context, id uint64) (val types.Campaign, found bool)
- func (k Keeper) GetCampaignChains(ctx sdk.Context, campaignID uint64) (val types.CampaignChains, found bool)
- func (k Keeper) GetCampaignCounter(ctx sdk.Context) uint64
- func (k Keeper) GetCampaignSummary(ctx sdk.Context, campaign types.Campaign) (cs types.CampaignSummary, err error)
- func (k Keeper) GetMainnetAccount(ctx sdk.Context, campaignID uint64, address string) (val types.MainnetAccount, found bool)
- func (k Keeper) GetMainnetVestingAccount(ctx sdk.Context, campaignID uint64, address string) (val types.MainnetVestingAccount, found bool)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetTotalShares(ctx sdk.Context) uint64
- func (k Keeper) IsCampaignMainnetLaunchTriggered(ctx sdk.Context, campaignID uint64) (bool, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MainnetAccount(c context.Context, req *types.QueryGetMainnetAccountRequest) (*types.QueryGetMainnetAccountResponse, error)
- func (k Keeper) MainnetAccountAll(c context.Context, req *types.QueryAllMainnetAccountRequest) (*types.QueryAllMainnetAccountResponse, error)
- func (k Keeper) MainnetVestingAccount(c context.Context, req *types.QueryGetMainnetVestingAccountRequest) (*types.QueryGetMainnetVestingAccountResponse, error)
- func (k Keeper) MainnetVestingAccountAll(c context.Context, req *types.QueryAllMainnetVestingAccountRequest) (*types.QueryAllMainnetVestingAccountResponse, error)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RemoveMainnetAccount(ctx sdk.Context, campaignID uint64, address string)
- func (k Keeper) RemoveMainnetVestingAccount(ctx sdk.Context, campaignID uint64, address string)
- func (k Keeper) SetCampaign(ctx sdk.Context, campaign types.Campaign)
- func (k Keeper) SetCampaignChains(ctx sdk.Context, campaignChains types.CampaignChains)
- func (k Keeper) SetCampaignCounter(ctx sdk.Context, counter uint64)
- func (k Keeper) SetMainnetAccount(ctx sdk.Context, mainnetAccount types.MainnetAccount)
- func (k Keeper) SetMainnetVestingAccount(ctx sdk.Context, mainnetVestingAccount types.MainnetVestingAccount)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetTotalShares(ctx sdk.Context, numShares uint64)
- func (k Keeper) TotalShares(goCtx context.Context, req *types.QueryTotalSharesRequest) (*types.QueryTotalSharesResponse, error)
- func (k Keeper) TotalSupplyRange(ctx sdk.Context) (totalSupplyRange types.TotalSupplyRange)
- type LaunchKeeper
- type RewardKeeper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountWithoutCampaignInvariant ¶
AccountWithoutCampaignInvariant invariant that checks if the `MainnetAccount` campaign exist.
func AllInvariants ¶
AllInvariants runs all invariants of the module.
func CampaignSharesInvariant ¶
CampaignSharesInvariant invariant that checks, for all campaigns, if the amount of allocated shares is equal to the sum of `MainnetVestingAccount` and `MainnetAccount` shares plus the amount of vouchers in circulation
func GetCampaignIDBytes ¶
GetCampaignIDBytes returns the byte representation of the ID
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
RegisterInvariants registers all module invariants
func VestingAccountWithoutCampaignInvariant ¶
VestingAccountWithoutCampaignInvariant invariant that checks if the `MainnetVestingAccount` campaign exist.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey sdk.StoreKey, paramSpace paramtypes.Subspace, launchKeeper LaunchKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistributionKeeper, profileKeeper types.ProfileKeeper, rewardKeeper RewardKeeper, ) *Keeper
func (Keeper) AddChainToCampaign ¶
AddChainToCampaign adds a new chain into an existing campaign
func (Keeper) AppendCampaign ¶
AppendCampaign appends a campaign in the store with a new id and update the count
func (Keeper) Campaign ¶
func (k Keeper) Campaign(c context.Context, req *types.QueryGetCampaignRequest) (*types.QueryGetCampaignResponse, error)
func (Keeper) CampaignAll ¶
func (k Keeper) CampaignAll(c context.Context, req *types.QueryAllCampaignRequest) (*types.QueryAllCampaignResponse, error)
func (Keeper) CampaignChains ¶
func (k Keeper) CampaignChains(c context.Context, req *types.QueryGetCampaignChainsRequest) (*types.QueryGetCampaignChainsResponse, error)
func (Keeper) CampaignCreationFee ¶
CampaignCreationFee returns the campaign creation fee param
func (Keeper) CampaignSummaries ¶
func (k Keeper) CampaignSummaries(goCtx context.Context, req *types.QueryCampaignSummariesRequest) (*types.QueryCampaignSummariesResponse, error)
func (Keeper) CampaignSummary ¶
func (k Keeper) CampaignSummary(goCtx context.Context, req *types.QueryCampaignSummaryRequest) (*types.QueryCampaignSummaryResponse, error)
func (Keeper) GetAllCampaign ¶
GetAllCampaign returns all campaign
func (Keeper) GetAllCampaignChains ¶
func (k Keeper) GetAllCampaignChains(ctx sdk.Context) (list []types.CampaignChains)
GetAllCampaignChains returns all campaignChains
func (Keeper) GetAllMainnetAccount ¶
func (k Keeper) GetAllMainnetAccount(ctx sdk.Context) (list []types.MainnetAccount)
GetAllMainnetAccount returns all mainnetAccount
func (Keeper) GetAllMainnetVestingAccount ¶
func (k Keeper) GetAllMainnetVestingAccount(ctx sdk.Context) (list []types.MainnetVestingAccount)
GetAllMainnetVestingAccount returns all mainnetVestingAccount
func (Keeper) GetCampaign ¶
GetCampaign returns a campaign from its id
func (Keeper) GetCampaignChains ¶
func (k Keeper) GetCampaignChains(ctx sdk.Context, campaignID uint64) (val types.CampaignChains, found bool)
GetCampaignChains returns a campaignChains from its index
func (Keeper) GetCampaignCounter ¶
GetCampaignCounter get the counter for campaign
func (Keeper) GetCampaignSummary ¶
func (k Keeper) GetCampaignSummary(ctx sdk.Context, campaign types.Campaign) (cs types.CampaignSummary, err error)
GetCampaignSummary returns the campaign with summary attached to it like most recent chain and rewards attached to it TODO: add tests https://github.com/tendermint/spn/issues/650
func (Keeper) GetMainnetAccount ¶
func (k Keeper) GetMainnetAccount( ctx sdk.Context, campaignID uint64, address string, ) (val types.MainnetAccount, found bool)
GetMainnetAccount returns a mainnetAccount from its index
func (Keeper) GetMainnetVestingAccount ¶
func (k Keeper) GetMainnetVestingAccount( ctx sdk.Context, campaignID uint64, address string, ) (val types.MainnetVestingAccount, found bool)
GetMainnetVestingAccount returns a mainnetVestingAccount from its index
func (Keeper) GetTotalShares ¶
GetTotalShares gets the total shares value
func (Keeper) IsCampaignMainnetLaunchTriggered ¶
IsCampaignMainnetLaunchTriggered returns true if the provided campaign has an associated mainnet chain whose launch has been already triggered
func (Keeper) MainnetAccount ¶
func (k Keeper) MainnetAccount(c context.Context, req *types.QueryGetMainnetAccountRequest) (*types.QueryGetMainnetAccountResponse, error)
func (Keeper) MainnetAccountAll ¶
func (k Keeper) MainnetAccountAll(c context.Context, req *types.QueryAllMainnetAccountRequest) (*types.QueryAllMainnetAccountResponse, error)
func (Keeper) MainnetVestingAccount ¶
func (k Keeper) MainnetVestingAccount(c context.Context, req *types.QueryGetMainnetVestingAccountRequest) (*types.QueryGetMainnetVestingAccountResponse, error)
func (Keeper) MainnetVestingAccountAll ¶
func (k Keeper) MainnetVestingAccountAll(c context.Context, req *types.QueryAllMainnetVestingAccountRequest) (*types.QueryAllMainnetVestingAccountResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) RemoveMainnetAccount ¶
RemoveMainnetAccount removes a mainnetAccount from the store
func (Keeper) RemoveMainnetVestingAccount ¶
RemoveMainnetVestingAccount removes a mainnetVestingAccount from the store
func (Keeper) SetCampaign ¶
SetCampaign set a specific campaign in the store
func (Keeper) SetCampaignChains ¶
func (k Keeper) SetCampaignChains(ctx sdk.Context, campaignChains types.CampaignChains)
SetCampaignChains set a specific campaignChains in the store from its index
func (Keeper) SetCampaignCounter ¶
SetCampaignCounter set the counter for campaign
func (Keeper) SetMainnetAccount ¶
func (k Keeper) SetMainnetAccount(ctx sdk.Context, mainnetAccount types.MainnetAccount)
SetMainnetAccount set a specific mainnetAccount in the store from its index
func (Keeper) SetMainnetVestingAccount ¶
func (k Keeper) SetMainnetVestingAccount(ctx sdk.Context, mainnetVestingAccount types.MainnetVestingAccount)
SetMainnetVestingAccount set a specific mainnetVestingAccount in the store from its index
func (Keeper) SetTotalShares ¶
SetTotalShares sets the total shares value
func (Keeper) TotalShares ¶
func (k Keeper) TotalShares(goCtx context.Context, req *types.QueryTotalSharesRequest) (*types.QueryTotalSharesResponse, error)
func (Keeper) TotalSupplyRange ¶
func (k Keeper) TotalSupplyRange(ctx sdk.Context) (totalSupplyRange types.TotalSupplyRange)
TotalSupplyRange returns the param that defines the allowed range for total supply
type LaunchKeeper ¶
type LaunchKeeper interface {
GetChain(ctx sdk.Context, launchID uint64) (val launchtypes.Chain, found bool)
GetRequestCounter(ctx sdk.Context, launchID uint64) (count uint64)
GetGenesisValidatorCount(ctx sdk.Context, launchID uint64) (count uint64)
CreateNewChain(
ctx sdk.Context,
coordinatorID uint64,
genesisChainID,
sourceURL,
sourceHash,
genesisURL,
genesisHash string,
hasCampaign bool,
campaignID uint64,
isMainnet bool,
metadata []byte,
) (uint64, error)
}
type RewardKeeper ¶
type RewardKeeper interface {
GetRewardPool(ctx sdk.Context, launchID uint64) (val rewardtypes.RewardPool, found bool)
}
Source Files
¶
- campaign.go
- campaign_chains.go
- campaign_mainnet.go
- grpc.go
- grpc_campaign.go
- grpc_campaign_chains.go
- grpc_campaign_summary.go
- grpc_mainnet_account.go
- grpc_mainnet_vesting_account.go
- grpc_params.go
- grpc_total_shares.go
- invariants.go
- keeper.go
- mainnet_account.go
- mainnet_vesting_account.go
- msg.go
- msg_add_shares.go
- msg_add_vesting_options.go
- msg_burn_vouchers.go
- msg_create_campaign.go
- msg_edit_campaign.go
- msg_initialize_mainnet.go
- msg_mint_vouchers.go
- msg_redeem_vouchers.go
- msg_unredeem_vouchers.go
- msg_update_total_supply.go
- params.go
- total_shares.go