keeper

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 17 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServer

func NewMsgServer(keeper Keeper) collection.MsgServer

NewMsgServer returns an implementation of the collection MsgServer interface for the provided Keeper.

func NewQueryServer

func NewQueryServer(keeper Keeper) collection.QueryServer

NewQueryServer returns an implementation of the token QueryServer interface for the provided Keeper.

func ValidateLegacyContract

func ValidateLegacyContract(k Keeper, ctx sdk.Context, contractID string) error

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper defines the collection module Keeper

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	key sdk.StoreKey,
	ck collection.ClassKeeper,
) Keeper

NewKeeper returns a collection keeper

func (Keeper) Abandon

func (k Keeper) Abandon(ctx sdk.Context, contractID string, grantee sdk.AccAddress, permission collection.Permission)

func (Keeper) Attach

func (k Keeper) Attach(ctx sdk.Context, contractID string, owner sdk.AccAddress, subject, target string) error

func (Keeper) AuthorizeOperator

func (k Keeper) AuthorizeOperator(ctx sdk.Context, contractID string, holder, operator sdk.AccAddress) error

func (Keeper) BurnCoins

func (k Keeper) BurnCoins(ctx sdk.Context, contractID string, from sdk.AccAddress, amount []collection.Coin) ([]collection.Coin, error)

func (Keeper) CreateContract

func (k Keeper) CreateContract(ctx sdk.Context, creator sdk.AccAddress, contract collection.Contract) string

func (Keeper) CreateTokenClass

func (k Keeper) CreateTokenClass(ctx sdk.Context, contractID string, class collection.TokenClass) (*string, error)

func (Keeper) Detach

func (k Keeper) Detach(ctx sdk.Context, contractID string, owner sdk.AccAddress, subject string) error

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *collection.GenesisState

ExportGenesis returns a GenesisState for a given context.

func (Keeper) GetAuthorization

func (k Keeper) GetAuthorization(ctx sdk.Context, contractID string, holder, operator sdk.AccAddress) (*collection.Authorization, error)

func (Keeper) GetBalance

func (k Keeper) GetBalance(ctx sdk.Context, contractID string, address sdk.AccAddress, tokenID string) sdk.Int

func (Keeper) GetBurnt

func (k Keeper) GetBurnt(ctx sdk.Context, contractID, classID string) sdk.Int

func (Keeper) GetChildren

func (k Keeper) GetChildren(ctx sdk.Context, contractID, tokenID string) []string

func (Keeper) GetContract

func (k Keeper) GetContract(ctx sdk.Context, contractID string) (*collection.Contract, error)

func (Keeper) GetGrant

func (k Keeper) GetGrant(ctx sdk.Context, contractID string, grantee sdk.AccAddress, permission collection.Permission) (*collection.Grant, error)

func (Keeper) GetMinted

func (k Keeper) GetMinted(ctx sdk.Context, contractID, classID string) sdk.Int

func (Keeper) GetNFT

func (k Keeper) GetNFT(ctx sdk.Context, contractID, tokenID string) (*collection.NFT, error)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) collection.Params

func (Keeper) GetParent

func (k Keeper) GetParent(ctx sdk.Context, contractID, tokenID string) (*string, error)

func (Keeper) GetRoot

func (k Keeper) GetRoot(ctx sdk.Context, contractID, tokenID string) string

func (Keeper) GetRootOwner

func (k Keeper) GetRootOwner(ctx sdk.Context, contractID, tokenID string) sdk.AccAddress

func (Keeper) GetSupply

func (k Keeper) GetSupply(ctx sdk.Context, contractID, classID string) sdk.Int

func (Keeper) GetTokenClass

func (k Keeper) GetTokenClass(ctx sdk.Context, contractID, classID string) (collection.TokenClass, error)

func (Keeper) Grant

func (k Keeper) Grant(ctx sdk.Context, contractID string, granter, grantee sdk.AccAddress, permission collection.Permission)

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, data *collection.GenesisState)

InitGenesis new collection genesis

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) MintFT

func (k Keeper) MintFT(ctx sdk.Context, contractID string, to sdk.AccAddress, amount []collection.Coin) error

func (Keeper) MintNFT

func (k Keeper) MintNFT(ctx sdk.Context, contractID string, to sdk.AccAddress, params []collection.MintNFTParam) ([]collection.NFT, error)

func (Keeper) ModifyContract

func (k Keeper) ModifyContract(ctx sdk.Context, contractID string, operator sdk.AccAddress, changes []collection.Attribute) error

func (Keeper) ModifyNFT

func (k Keeper) ModifyNFT(ctx sdk.Context, contractID, tokenID string, operator sdk.AccAddress, changes []collection.Attribute) error

func (Keeper) ModifyTokenClass

func (k Keeper) ModifyTokenClass(ctx sdk.Context, contractID, classID string, operator sdk.AccAddress, changes []collection.Attribute) error

func (Keeper) RevokeOperator

func (k Keeper) RevokeOperator(ctx sdk.Context, contractID string, holder, operator sdk.AccAddress) error

func (Keeper) SendCoins

func (k Keeper) SendCoins(ctx sdk.Context, contractID string, from, to sdk.AccAddress, amount []collection.Coin) error

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params collection.Params)

type Migrator added in v0.48.0

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator is a struct for handling in-place store migrations.

func NewMigrator added in v0.48.0

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Register added in v0.48.0

func (m Migrator) Register(register func(moduleName string, fromVersion uint64, handler module.MigrationHandler) error) error

type ProgressReporter

type ProgressReporter struct {
	// contains filtered or unexported fields
}

func (*ProgressReporter) Tick

func (p *ProgressReporter) Tick()

Directories

Path Synopsis
migrations
v2

Jump to

Keyboard shortcuts

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