Documentation ¶
Index ¶
- func AccountWithoutProjectInvariant(k Keeper) sdk.Invariant
- func AllInvariants(k Keeper) sdk.Invariant
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQueryServerImpl(k Keeper) types.QueryServer
- func ProjectSharesInvariant(k Keeper) sdk.Invariant
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- type Keeper
- func (k Keeper) AddChainToProject(ctx context.Context, projectID, launchID uint64) error
- func (k Keeper) AddressCodec() address.Codec
- func (k Keeper) AppendProject(ctx context.Context, project types.Project) (uint64, error)
- func (k Keeper) EmitProjectAuctionCreated(ctx context.Context, auctionID uint64, auctioneer string, sellingCoin sdk.Coin) (bool, error)
- func (k Keeper) GetAllMainnetAccount(ctx context.Context) ([]types.MainnetAccount, error)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetMainnetAccount(ctx context.Context, projectID uint64, address sdk.AccAddress) (types.MainnetAccount, error)
- func (k Keeper) GetProject(ctx context.Context, projectID uint64) (types.Project, error)
- func (k Keeper) GetProjectChains(ctx context.Context, projectID uint64) (types.ProjectChains, error)
- func (k Keeper) IsProjectMainnetLaunchTriggered(ctx context.Context, projectID uint64) (bool, error)
- func (k Keeper) ListMainnetAccountBalance(ctx context.Context, projectID uint64) ([]types.MainnetAccountBalance, error)
- func (k Keeper) Logger() log.Logger
- func (k Keeper) MainnetAccountBalance(ctx context.Context, projectID uint64, address sdk.AccAddress) (types.MainnetAccountBalance, error)
- func (k Keeper) ProjectAuctionEventHooks() ProjectAuctionEventHooks
- func (k Keeper) Projects(ctx context.Context) ([]types.Project, error)
- type LaunchKeeper
- type ProjectAuctionEventHooks
- func (h ProjectAuctionEventHooks) AfterBatchAuctionCreated(ctx context.Context, auctionID uint64, auctioneer string, _ sdkmath.LegacyDec, ...) error
- func (h ProjectAuctionEventHooks) AfterFixedPriceAuctionCreated(ctx context.Context, auctionID uint64, auctioneer string, _ sdkmath.LegacyDec, ...) error
- func (h ProjectAuctionEventHooks) BeforeAllowedBidderUpdated(_ context.Context, _ uint64, _ sdk.AccAddress, _ sdkmath.Int) error
- func (h ProjectAuctionEventHooks) BeforeAllowedBiddersAdded(_ context.Context, _ []fundraisingtypes.AllowedBidder) error
- func (h ProjectAuctionEventHooks) BeforeAuctionCanceled(_ context.Context, _ uint64, _ string) error
- func (h ProjectAuctionEventHooks) BeforeBatchAuctionCreated(_ context.Context, _ string, _ sdkmath.LegacyDec, _ sdkmath.LegacyDec, ...) error
- func (h ProjectAuctionEventHooks) BeforeBidModified(_ context.Context, _ uint64, _ uint64, _ string, _ fundraisingtypes.BidType, ...) error
- func (h ProjectAuctionEventHooks) BeforeBidPlaced(_ context.Context, _ uint64, _ uint64, _ string, _ fundraisingtypes.BidType, ...) error
- func (h ProjectAuctionEventHooks) BeforeFixedPriceAuctionCreated(_ context.Context, _ string, _ sdkmath.LegacyDec, _ sdk.Coin, _ string, ...) error
- func (h ProjectAuctionEventHooks) BeforeSellingCoinsAllocated(_ context.Context, _ uint64, _ map[string]sdkmath.Int, ...) error
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 NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func NewQueryServerImpl ¶
func NewQueryServerImpl(k Keeper) types.QueryServer
NewQueryServerImpl returns an implementation of the QueryServer 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 { Schema collections.Schema Params collections.Item[types.Params] MainnetAccount collections.Map[collections.Pair[uint64, sdk.AccAddress], types.MainnetAccount] ProjectSeq collections.Sequence Project collections.Map[uint64, types.Project] ProjectChains collections.Map[uint64, types.ProjectChains] // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, addressCodec address.Codec, storeService store.KVStoreService, logger log.Logger, authority string, distributionKeeper types.DistributionKeeper, profileKeeper types.ProfileKeeper, bankKeeper types.BankKeeper, launchKeeper LaunchKeeper, ) Keeper
func (Keeper) AddChainToProject ¶
AddChainToProject adds a new chain into an existing project.
func (Keeper) AddressCodec ¶
AddressCodec returns the address codec.
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 context.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 ¶
GetAllMainnetAccount returns all MainnetAccount
func (Keeper) GetAuthority ¶
GetAuthority returns the module's authority.
func (Keeper) GetMainnetAccount ¶
func (k Keeper) GetMainnetAccount(ctx context.Context, projectID uint64, address sdk.AccAddress) (types.MainnetAccount, error)
func (Keeper) GetProject ¶
func (Keeper) GetProjectChains ¶
func (Keeper) IsProjectMainnetLaunchTriggered ¶
func (k Keeper) IsProjectMainnetLaunchTriggered(ctx context.Context, projectID uint64) (bool, error)
IsProjectMainnetLaunchTriggered returns true if the provided project has an associated mainnet chain whose launch has been already triggered
func (Keeper) ListMainnetAccountBalance ¶
func (Keeper) MainnetAccountBalance ¶
func (k Keeper) MainnetAccountBalance(ctx context.Context, projectID uint64, address sdk.AccAddress) (types.MainnetAccountBalance, error)
func (Keeper) ProjectAuctionEventHooks ¶
func (k Keeper) ProjectAuctionEventHooks() ProjectAuctionEventHooks
ProjectAuctionEventHooks returns a ProjectAuctionEventHooks associated with the project keeper
type LaunchKeeper ¶
type LaunchKeeper interface { GetChain(ctx context.Context, launchID uint64) (launchtypes.Chain, error) CreateNewChain( ctx context.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 context.Context, auctionID uint64, auctioneer string, _ sdkmath.LegacyDec, _ sdkmath.LegacyDec, sellingCoin sdk.Coin, _ string, _ []fundraisingtypes.VestingSchedule, _ uint32, _ sdkmath.LegacyDec, _ time.Time, _ time.Time, ) error
AfterBatchAuctionCreated emits a ProjectAuctionCreated event if created for a project
func (ProjectAuctionEventHooks) AfterFixedPriceAuctionCreated ¶
func (h ProjectAuctionEventHooks) AfterFixedPriceAuctionCreated( ctx context.Context, auctionID uint64, auctioneer string, _ sdkmath.LegacyDec, sellingCoin sdk.Coin, _ string, _ []fundraisingtypes.VestingSchedule, _ time.Time, _ time.Time, ) error
AfterFixedPriceAuctionCreated emits a ProjectAuctionCreated event if created for a project
func (ProjectAuctionEventHooks) BeforeAllowedBidderUpdated ¶
func (h ProjectAuctionEventHooks) BeforeAllowedBidderUpdated( _ context.Context, _ uint64, _ sdk.AccAddress, _ sdkmath.Int, ) error
BeforeAllowedBidderUpdated implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeAllowedBiddersAdded ¶
func (h ProjectAuctionEventHooks) BeforeAllowedBiddersAdded( _ context.Context, _ []fundraisingtypes.AllowedBidder, ) error
BeforeAllowedBiddersAdded implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeAuctionCanceled ¶
func (h ProjectAuctionEventHooks) BeforeAuctionCanceled( _ context.Context, _ uint64, _ string, ) error
BeforeAuctionCanceled implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeBatchAuctionCreated ¶
func (h ProjectAuctionEventHooks) BeforeBatchAuctionCreated( _ context.Context, _ string, _ sdkmath.LegacyDec, _ sdkmath.LegacyDec, _ sdk.Coin, _ string, _ []fundraisingtypes.VestingSchedule, _ uint32, _ sdkmath.LegacyDec, _ time.Time, _ time.Time, ) error
BeforeBatchAuctionCreated implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeBidModified ¶
func (h ProjectAuctionEventHooks) BeforeBidModified( _ context.Context, _ uint64, _ uint64, _ string, _ fundraisingtypes.BidType, _ sdkmath.LegacyDec, _ sdk.Coin, ) error
BeforeBidModified implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeBidPlaced ¶
func (h ProjectAuctionEventHooks) BeforeBidPlaced( _ context.Context, _ uint64, _ uint64, _ string, _ fundraisingtypes.BidType, _ sdkmath.LegacyDec, _ sdk.Coin, ) error
BeforeBidPlaced implements FundraisingHooks
func (ProjectAuctionEventHooks) BeforeFixedPriceAuctionCreated ¶
func (h ProjectAuctionEventHooks) BeforeFixedPriceAuctionCreated( _ context.Context, _ string, _ sdkmath.LegacyDec, _ sdk.Coin, _ string, _ []fundraisingtypes.VestingSchedule, _ time.Time, _ time.Time, ) error
BeforeFixedPriceAuctionCreated implements FundraisingHooks
Source Files ¶
- invariants.go
- keeper.go
- mainnet_account.go
- msg_server.go
- msg_server_burn_vouchers.go
- msg_server_create_project.go
- msg_server_edit_project.go
- msg_server_initialize_mainnet.go
- msg_server_mint_vouchers.go
- msg_server_redeem_vouchers.go
- msg_server_unredeem_vouchers.go
- msg_server_update_special_allocations.go
- msg_server_update_total_supply.go
- msg_update_params.go
- project.go
- project_auction_event_hooks.go
- project_chains.go
- project_mainnet.go
- query.go
- query_mainnet_account.go
- query_mainnet_account_balance.go
- query_params.go
- query_project.go
- query_project_chains.go
- query_special_allocations_balance.go
- query_total_shares.go