Documentation ¶
Index ¶
- func AccountWithoutProjectInvariant(k Keeper) sdk.Invariant
- func AllInvariants(k Keeper) sdk.Invariant
- func GetProjectIDBytes(id uint64) []byte
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func ProjectSharesInvariant(k Keeper) sdk.Invariant
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- type Keeper
- func (k Keeper) AddChainToProject(ctx sdk.Context, projectID, launchID uint64) error
- func (k Keeper) AppendProject(ctx sdk.Context, project types.Project) uint64
- func (k Keeper) EmitProjectAuctionCreated(ctx sdk.Context, auctionID uint64, auctioneer string, sellingCoin sdk.Coin) (bool, error)
- func (k Keeper) GetAllMainnetAccount(ctx sdk.Context) (list []types.MainnetAccount)
- func (k Keeper) GetAllProject(ctx sdk.Context) (list []types.Project)
- func (k Keeper) GetAllProjectChains(ctx sdk.Context) (list []types.ProjectChains)
- func (k Keeper) GetMainnetAccount(ctx sdk.Context, projectID uint64, address string) (val types.MainnetAccount, found bool)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetProject(ctx sdk.Context, id uint64) (val types.Project, found bool)
- func (k Keeper) GetProjectChains(ctx sdk.Context, projectID uint64) (val types.ProjectChains, found bool)
- func (k Keeper) GetProjectCounter(ctx sdk.Context) uint64
- func (k Keeper) GetTotalShares(ctx sdk.Context) uint64
- func (k Keeper) IsProjectMainnetLaunchTriggered(ctx sdk.Context, projectID 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) MainnetAccountBalance(c context.Context, req *types.QueryGetMainnetAccountBalanceRequest) (*types.QueryGetMainnetAccountBalanceResponse, error)
- func (k Keeper) MainnetAccountBalanceAll(c context.Context, req *types.QueryAllMainnetAccountBalanceRequest) (*types.QueryAllMainnetAccountBalanceResponse, error)
- func (k Keeper) MaxMetadataLength(ctx sdk.Context) (maxMetadataLength uint64)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) Project(c context.Context, req *types.QueryGetProjectRequest) (*types.QueryGetProjectResponse, error)
- func (k Keeper) ProjectAll(c context.Context, req *types.QueryAllProjectRequest) (*types.QueryAllProjectResponse, error)
- func (k Keeper) ProjectAuctionEventHooks() ProjectAuctionEventHooks
- func (k Keeper) ProjectChains(c context.Context, req *types.QueryGetProjectChainsRequest) (*types.QueryGetProjectChainsResponse, error)
- func (k Keeper) ProjectCreationFee(ctx sdk.Context) (projectCreationFee sdk.Coins)
- func (k Keeper) RemoveMainnetAccount(ctx sdk.Context, projectID uint64, address string)
- func (k Keeper) RemoveProject(ctx sdk.Context, id uint64)
- func (k Keeper) SetMainnetAccount(ctx sdk.Context, mainnetAccount types.MainnetAccount)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetProject(ctx sdk.Context, project types.Project)
- func (k Keeper) SetProjectChains(ctx sdk.Context, projectChains types.ProjectChains)
- func (k Keeper) SetProjectCounter(ctx sdk.Context, counter uint64)
- func (k Keeper) SetTotalShares(ctx sdk.Context, numShares uint64)
- func (k Keeper) SpecialAllocationsBalance(goCtx context.Context, req *types.QuerySpecialAllocationsBalanceRequest) (*types.QuerySpecialAllocationsBalanceResponse, error)
- 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 ProjectAuctionEventHooks
- func (h ProjectAuctionEventHooks) AfterBatchAuctionCreated(ctx sdk.Context, auctionID uint64, auctioneer string, _ sdk.Dec, _ sdk.Dec, ...)
- func (h ProjectAuctionEventHooks) AfterFixedPriceAuctionCreated(ctx sdk.Context, auctionID uint64, auctioneer string, _ sdk.Dec, ...)
- func (h ProjectAuctionEventHooks) BeforeAllowedBidderUpdated(_ sdk.Context, _ uint64, _ sdk.AccAddress, _ sdkmath.Int)
- func (h ProjectAuctionEventHooks) BeforeAllowedBiddersAdded(_ sdk.Context, _ []fundraisingtypes.AllowedBidder)
- func (h ProjectAuctionEventHooks) BeforeAuctionCanceled(_ sdk.Context, _ uint64, _ string)
- func (h ProjectAuctionEventHooks) BeforeBatchAuctionCreated(_ sdk.Context, _ string, _ sdk.Dec, _ sdk.Dec, _ sdk.Coin, _ string, ...)
- func (h ProjectAuctionEventHooks) BeforeBidModified(_ sdk.Context, _ uint64, _ uint64, _ string, _ fundraisingtypes.BidType, ...)
- func (h ProjectAuctionEventHooks) BeforeBidPlaced(_ sdk.Context, _ uint64, _ uint64, _ string, _ fundraisingtypes.BidType, ...)
- func (h ProjectAuctionEventHooks) BeforeFixedPriceAuctionCreated(_ sdk.Context, _ string, _ sdk.Dec, _ sdk.Coin, _ string, ...)
- func (h ProjectAuctionEventHooks) BeforeSellingCoinsAllocated(_ sdk.Context, _ uint64, _ map[string]sdkmath.Int, _ map[string]sdkmath.Int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountWithoutProjectInvariant ¶
AccountWithoutProjectInvariant invariant that checks if the `MainnetAccount` project exist.
func AllInvariants ¶
AllInvariants runs all invariants of the module.
func GetProjectIDBytes ¶
GetProjectIDBytes returns the byte representation of the ID
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func ProjectSharesInvariant ¶
ProjectSharesInvariant invariant that checks, for all projects, if the amount of allocated shares is equal to the sum of `MainnetVestingAccount` and `MainnetAccount` shares plus the amount of vouchers in circulation plus the total shares of special allocations
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
RegisterInvariants registers all module invariants
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, paramSpace paramtypes.Subspace, launchKeeper LaunchKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistributionKeeper, profileKeeper types.ProfileKeeper, ) *Keeper
func (Keeper) AddChainToProject ¶
AddChainToProject adds a new chain into an existing project
func (Keeper) AppendProject ¶
AppendProject appends a project in the store with a new id and update the count
func (Keeper) EmitProjectAuctionCreated ¶
func (k Keeper) EmitProjectAuctionCreated( ctx sdk.Context, auctionID uint64, auctioneer string, sellingCoin sdk.Coin, ) (bool, error)
EmitProjectAuctionCreated emits EventProjectAuctionCreated event if an auction is created for a project from a coordinator
func (Keeper) GetAllMainnetAccount ¶
func (k Keeper) GetAllMainnetAccount(ctx sdk.Context) (list []types.MainnetAccount)
GetAllMainnetAccount returns all mainnetAccount
func (Keeper) GetAllProject ¶
GetAllProject returns all project
func (Keeper) GetAllProjectChains ¶
func (k Keeper) GetAllProjectChains(ctx sdk.Context) (list []types.ProjectChains)
GetAllProjectChains returns all projectChains
func (Keeper) GetMainnetAccount ¶
func (k Keeper) GetMainnetAccount( ctx sdk.Context, projectID uint64, address string, ) (val types.MainnetAccount, found bool)
GetMainnetAccount returns a mainnetAccount from its index
func (Keeper) GetProject ¶
GetProject returns a project from its id
func (Keeper) GetProjectChains ¶
func (k Keeper) GetProjectChains(ctx sdk.Context, projectID uint64) (val types.ProjectChains, found bool)
GetProjectChains returns a projectChains from its index
func (Keeper) GetProjectCounter ¶
GetProjectCounter get the counter for project
func (Keeper) GetTotalShares ¶
GetTotalShares gets the total shares value
func (Keeper) IsProjectMainnetLaunchTriggered ¶
IsProjectMainnetLaunchTriggered returns true if the provided project 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) MainnetAccountBalance ¶
func (k Keeper) MainnetAccountBalance(c context.Context, req *types.QueryGetMainnetAccountBalanceRequest) (*types.QueryGetMainnetAccountBalanceResponse, error)
func (Keeper) MainnetAccountBalanceAll ¶
func (k Keeper) MainnetAccountBalanceAll(c context.Context, req *types.QueryAllMainnetAccountBalanceRequest) (*types.QueryAllMainnetAccountBalanceResponse, error)
func (Keeper) MaxMetadataLength ¶
MaxMetadataLength returns the param that defines the max metadata length
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) Project ¶
func (k Keeper) Project(c context.Context, req *types.QueryGetProjectRequest) (*types.QueryGetProjectResponse, error)
func (Keeper) ProjectAll ¶
func (k Keeper) ProjectAll(c context.Context, req *types.QueryAllProjectRequest) (*types.QueryAllProjectResponse, error)
func (Keeper) ProjectAuctionEventHooks ¶
func (k Keeper) ProjectAuctionEventHooks() ProjectAuctionEventHooks
ProjectAuctionEventHooks returns a ProjectAuctionEventHooks associated with the project keeper
func (Keeper) ProjectChains ¶
func (k Keeper) ProjectChains(c context.Context, req *types.QueryGetProjectChainsRequest) (*types.QueryGetProjectChainsResponse, error)
func (Keeper) ProjectCreationFee ¶
ProjectCreationFee returns the project creation fee param
func (Keeper) RemoveMainnetAccount ¶
RemoveMainnetAccount removes a mainnetAccount from the store
func (Keeper) RemoveProject ¶
RemoveProject removes a project from the store
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) SetProject ¶
SetProject set a specific project in the store
func (Keeper) SetProjectChains ¶
func (k Keeper) SetProjectChains(ctx sdk.Context, projectChains types.ProjectChains)
SetProjectChains set a specific projectChains in the store from its index
func (Keeper) SetProjectCounter ¶
SetProjectCounter set the counter for project
func (Keeper) SetTotalShares ¶
SetTotalShares sets the total shares value
func (Keeper) SpecialAllocationsBalance ¶
func (k Keeper) SpecialAllocationsBalance( goCtx context.Context, req *types.QuerySpecialAllocationsBalanceRequest, ) (*types.QuerySpecialAllocationsBalanceResponse, error)
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) CreateNewChain( ctx sdk.Context, coordinatorID uint64, genesisChainID, sourceURL, sourceHash string, initialGenesis launchtypes.InitialGenesis, hasProject bool, projectID uint64, isMainnet bool, accountBalance sdk.Coins, metadata []byte, ) (uint64, error) }
type ProjectAuctionEventHooks ¶
type ProjectAuctionEventHooks struct {
// contains filtered or unexported fields
}
ProjectAuctionEventHooks implements fundraising hooks and emit events on auction creation
func (ProjectAuctionEventHooks) AfterBatchAuctionCreated ¶
func (h ProjectAuctionEventHooks) AfterBatchAuctionCreated( ctx sdk.Context, auctionID uint64, auctioneer string, _ sdk.Dec, _ sdk.Dec, sellingCoin sdk.Coin, _ string, _ []fundraisingtypes.VestingSchedule, _ uint32, _ sdk.Dec, _ time.Time, _ time.Time, )
AfterBatchAuctionCreated emits a ProjectAuctionCreated event if created for a project
func (ProjectAuctionEventHooks) AfterFixedPriceAuctionCreated ¶
func (h ProjectAuctionEventHooks) AfterFixedPriceAuctionCreated( ctx sdk.Context, auctionID uint64, auctioneer string, _ sdk.Dec, sellingCoin sdk.Coin, _ string, _ []fundraisingtypes.VestingSchedule, _ time.Time, _ time.Time, )
AfterFixedPriceAuctionCreated emits a ProjectAuctionCreated event if created for a project
func (ProjectAuctionEventHooks) BeforeAllowedBidderUpdated ¶
func (h ProjectAuctionEventHooks) BeforeAllowedBidderUpdated( _ sdk.Context, _ uint64, _ sdk.AccAddress, _ sdkmath.Int, )
BeforeAllowedBidderUpdated implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeAllowedBiddersAdded ¶
func (h ProjectAuctionEventHooks) BeforeAllowedBiddersAdded( _ sdk.Context, _ []fundraisingtypes.AllowedBidder, )
BeforeAllowedBiddersAdded implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeAuctionCanceled ¶
func (h ProjectAuctionEventHooks) BeforeAuctionCanceled( _ sdk.Context, _ uint64, _ string, )
BeforeAuctionCanceled implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeBatchAuctionCreated ¶
func (h ProjectAuctionEventHooks) BeforeBatchAuctionCreated( _ sdk.Context, _ string, _ sdk.Dec, _ sdk.Dec, _ sdk.Coin, _ string, _ []fundraisingtypes.VestingSchedule, _ uint32, _ sdk.Dec, _ time.Time, _ time.Time, )
BeforeBatchAuctionCreated implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeBidModified ¶
func (h ProjectAuctionEventHooks) BeforeBidModified( _ sdk.Context, _ uint64, _ uint64, _ string, _ fundraisingtypes.BidType, _ sdk.Dec, _ sdk.Coin, )
BeforeBidModified implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeBidPlaced ¶
func (h ProjectAuctionEventHooks) BeforeBidPlaced( _ sdk.Context, _ uint64, _ uint64, _ string, _ fundraisingtypes.BidType, _ sdk.Dec, _ sdk.Coin, )
BeforeBidPlaced implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeFixedPriceAuctionCreated ¶
func (h ProjectAuctionEventHooks) BeforeFixedPriceAuctionCreated( _ sdk.Context, _ string, _ sdk.Dec, _ sdk.Coin, _ string, _ []fundraisingtypes.VestingSchedule, _ time.Time, _ time.Time, )
BeforeFixedPriceAuctionCreated implements FundraisingHooks
Source Files ¶
- grpc.go
- grpc_mainnet_account.go
- grpc_params.go
- grpc_project.go
- grpc_project_chains.go
- grpc_special_allocations_balance.go
- grpc_total_shares.go
- invariants.go
- keeper.go
- mainnet_account.go
- msg.go
- msg_burn_vouchers.go
- msg_create_project.go
- msg_edit_project.go
- msg_initialize_mainnet.go
- msg_mint_vouchers.go
- msg_redeem_vouchers.go
- msg_unredeem_vouchers.go
- msg_update_special_allocations.go
- msg_update_total_supply.go
- params.go
- project.go
- project_auction_event_hooks.go
- project_chains.go
- project_mainnet.go
- total_shares.go