keeper

package
v0.0.0-...-abdbe5d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllInvariants

func AllInvariants(k *Keeper) sdk.Invariant

AllInvariants runs all invariants of the module.

func ApplyRequest

func ApplyRequest(
	ctx context.Context,
	k *Keeper,
	chain types.Chain,
	request types.Request,
	coord profiletypes.Coordinator,
) error

ApplyRequest approves the request and performs the launch information changes

func CheckAccount

func CheckAccount(ctx context.Context, k *Keeper, launchID uint64, address string) (bool, error)

CheckAccount check account inconsistency and return if an account exists for genesis or vesting accounts

func CheckRequest

func CheckRequest(
	ctx context.Context,
	k *Keeper,
	launchID uint64,
	request types.Request,
) error

CheckRequest verifies that a request can be applied

func DuplicatedAccountInvariant

func DuplicatedAccountInvariant(k *Keeper) sdk.Invariant

DuplicatedAccountInvariant invariant that checks if the `GenesisAccount` exists into the `VestingAccount` store

func InvalidChainInvariant

func InvalidChainInvariant(k *Keeper) sdk.Invariant

InvalidChainInvariant invariant that checks all chain in the store are valid

func NewMsgServerImpl

func NewMsgServerImpl(keeper *Keeper) types.MsgServer

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 RegisterInvariants

func RegisterInvariants(ir sdk.InvariantRegistry, k *Keeper)

RegisterInvariants registers all module invariants

func UnknownRequestTypeInvariant

func UnknownRequestTypeInvariant(k *Keeper) sdk.Invariant

UnknownRequestTypeInvariant invariant that checks if the Request type is valid

Types

type Keeper

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	addressCodec address.Codec,
	storeService store.KVStoreService,
	logger log.Logger,
	authority string,
	distributionKeeper types.DistributionKeeper,
	profileKeeper types.ProfileKeeper,
) *Keeper

func (Keeper) AddressCodec

func (k Keeper) AddressCodec() address.Codec

AddressCodec returns the address codec.

func (Keeper) AllGenesisAccount

func (k Keeper) AllGenesisAccount(ctx context.Context) ([]types.GenesisAccount, error)

AllGenesisAccount returns all GenesisAccount.

func (Keeper) AllGenesisValidator

func (k Keeper) AllGenesisValidator(ctx context.Context) ([]types.GenesisValidator, error)

AllGenesisValidator returns all GenesisValidator.

func (Keeper) AllVestingAccount

func (k Keeper) AllVestingAccount(ctx context.Context) ([]types.VestingAccount, error)

AllVestingAccount returns all VestingAccount.

func (Keeper) AppendChain

func (k Keeper) AppendChain(ctx context.Context, chain types.Chain) (uint64, error)

AppendChain appends a chain in the store with a new launch id and update the count

func (Keeper) AppendRequest

func (k Keeper) AppendRequest(ctx context.Context, request types.Request) (uint64, error)

AppendRequest appends a Request in the store with a new launch id and update the count

func (Keeper) Chains

func (k Keeper) Chains(ctx context.Context) ([]types.Chain, error)

Chains returns all Chain.

func (Keeper) CheckValidatorSet

func (k Keeper) CheckValidatorSet(
	ctx context.Context,
	launchID uint64,
	chainID string,
	validatorSet tmtypes.ValidatorSet,
) error

CheckValidatorSet checks the information about a validator set (used to create an IBC client) is valid

func (Keeper) CreateNewChain

func (k Keeper) CreateNewChain(
	ctx context.Context,
	coordinatorID uint64,
	genesisChainID,
	sourceURL,
	sourceHash string,
	initialGenesis types.InitialGenesis,
	hasProject bool,
	projectID uint64,
	isMainnet bool,
	accountBalance sdk.Coins,
	metadata []byte,
) (uint64, error)

CreateNewChain creates a new chain in the store from the provided information

func (Keeper) EnableMonitoringConnection

func (k Keeper) EnableMonitoringConnection(ctx context.Context, launchID uint64) error

EnableMonitoringConnection sets a chain with MonitoringConnected set to true

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (Keeper) GetChain

func (k Keeper) GetChain(ctx context.Context, launchID uint64) (types.Chain, error)

func (*Keeper) GetMonitoringcKeeper

func (k *Keeper) GetMonitoringcKeeper() types.MonitoringConsumerKeeper

GetMonitoringcKeeper gets the monitoring consumer keeper interface of the module

func (Keeper) GetNextRequestIDWithUpdate

func (k Keeper) GetNextRequestIDWithUpdate(ctx context.Context, launchID uint64) (uint64, error)

GetNextRequestIDWithUpdate increments bid id by one and set it.

func (*Keeper) GetProfileKeeper

func (k *Keeper) GetProfileKeeper() types.ProfileKeeper

GetProfileKeeper gets the profile keeper interface of the module

func (*Keeper) GetProjectKeeper

func (k *Keeper) GetProjectKeeper() types.ProjectKeeper

GetProjectKeeper gets the project keeper interface of the module

func (Keeper) GetRequestCounter

func (k Keeper) GetRequestCounter(ctx context.Context, launchID uint64) (uint64, error)

GetRequestCounter get request counter for a specific chain ID

func (Keeper) GetValidatorsAndTotalDelegation

func (k Keeper) GetValidatorsAndTotalDelegation(
	ctx context.Context,
	launchID uint64,
) (map[string]types.GenesisValidator, sdkmath.LegacyDec, error)

GetValidatorsAndTotalDelegation returns the genesisValidator map by consensus address and total of self delegation

func (Keeper) Logger

func (k Keeper) Logger() log.Logger

Logger returns a module-specific logger.

func (Keeper) RequestCreated

func (k Keeper) RequestCreated(
	ctx context.Context,
	creator string,
	launchID,
	requestID uint64,
	content types.RequestContent,
) error

RequestCreated calls associated hook if registered

func (Keeper) Requests

func (k Keeper) Requests(ctx context.Context) ([]types.Request, error)

Requests returns all request.

func (*Keeper) SetHooks

func (k *Keeper) SetHooks(hooks types.LaunchHooks) error

SetHooks sets the fundraising hooks.

func (*Keeper) SetMonitoringcKeeper

func (k *Keeper) SetMonitoringcKeeper(monitoringcKeeper types.MonitoringConsumerKeeper) error

SetMonitoringcKeeper sets the monitoring consumer keeper interface of the module

func (*Keeper) SetProjectKeeper

func (k *Keeper) SetProjectKeeper(projectKeeper types.ProjectKeeper) error

SetProjectKeeper sets the project keeper interface of the module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL