Documentation ¶
Index ¶
- func AllInvariants(k Keeper) sdk.Invariant
- func ExportGenesis(ctx sdk.Context, k Keeper) *types.GenesisState
- func InitGenesis(ctx sdk.Context, k Keeper, gs *types.GenesisState)
- func RegisterInvariants(registry sdk.InvariantRegistry, k Keeper)
- func SupplyInvariant(k Keeper) sdk.Invariant
- type Keeper
- func (k Keeper) BurnToken(c context.Context, msg *types.MsgBurnToken) (*types.MsgBurnTokenResponse, error)
- func (k Keeper) Collection(c context.Context, req *types.QueryCollectionRequest) (*types.QueryCollectionResponse, error)
- func (k Keeper) Collections(c context.Context, req *types.QueryCollectionsRequest) (*types.QueryCollectionsResponse, error)
- func (k Keeper) CollectionsByCreator(c context.Context, req *types.QueryCollectionsByCreatorRequest) (*types.QueryCollectionsByCreatorResponse, error)
- func (k *Keeper) CreateToken(ctx sdk.Context, collection types.Collection, token types.Token)
- func (k *Keeper) GetCollection(ctx sdk.Context, creator sdk.AccAddress, denom string) (collection types.Collection, found bool)
- func (k *Keeper) GetCollections(ctx sdk.Context) (collections []types.Collection)
- func (k *Keeper) GetMinReserve(ctx sdk.Context) sdkmath.Int
- func (k *Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k *Keeper) GetSubToken(ctx sdk.Context, id string, index uint32) (subToken types.SubToken, found bool)
- func (k *Keeper) GetSubTokens(ctx sdk.Context, id string) (subTokens []types.SubToken)
- func (k *Keeper) GetToken(ctx sdk.Context, id string) (token types.Token, found bool)
- func (k *Keeper) GetTokens(ctx sdk.Context, creator sdk.AccAddress, denom string) (tokens []types.Token)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MintToken(c context.Context, msg *types.MsgMintToken) (*types.MsgMintTokenResponse, error)
- func (k *Keeper) ReplaceSubTokenOwner(ctx sdk.Context, id string, index uint32, newOwner string) error
- func (k *Keeper) ReserveTokens(ctx sdk.Context, amount sdk.Coins, address sdk.AccAddress) error
- func (k *Keeper) ReturnTokensTo(ctx sdk.Context, amount sdk.Coins, address sdk.AccAddress) error
- func (k Keeper) SendToken(c context.Context, msg *types.MsgSendToken) (*types.MsgSendTokenResponse, error)
- func (k *Keeper) SetCollection(ctx sdk.Context, collection types.Collection)
- func (k *Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k *Keeper) SetSubToken(ctx sdk.Context, id string, subToken types.SubToken)
- func (k Keeper) SubToken(c context.Context, req *types.QuerySubTokenRequest) (*types.QuerySubTokenResponse, error)
- func (k Keeper) Token(c context.Context, req *types.QueryTokenRequest) (*types.QueryTokenResponse, error)
- func (k Keeper) TransferSubTokens(ctx sdk.Context, sender, recipient sdk.AccAddress, tokenID string, ...) error
- func (k Keeper) UpdateReserve(c context.Context, msg *types.MsgUpdateReserve) (*types.MsgUpdateReserveResponse, error)
- func (k Keeper) UpdateToken(c context.Context, msg *types.MsgUpdateToken) (*types.MsgUpdateTokenResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllInvariants ¶
AllInvariants runs all invariants of the module.
func ExportGenesis ¶ added in v0.0.8
func ExportGenesis(ctx sdk.Context, k Keeper) *types.GenesisState
ExportGenesis returns the module's exported genesis.
func InitGenesis ¶ added in v0.0.8
func InitGenesis(ctx sdk.Context, k Keeper, gs *types.GenesisState)
InitGenesis initializes the module's state from a provided genesis state.
func RegisterInvariants ¶
func RegisterInvariants(registry sdk.InvariantRegistry, k Keeper)
RegisterInvariants registers all the module's invariants.
func SupplyInvariant ¶
SupplyInvariant checks that the total amount of NFT tokens in the collections matches the total amount NFT tokens in the KVStore.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey store.StoreKey, ps paramtypes.Subspace, bk keeper.Keeper, ) *Keeper
NewKeeper creates new Keeper instance.
func (Keeper) BurnToken ¶ added in v0.0.8
func (k Keeper) BurnToken(c context.Context, msg *types.MsgBurnToken) (*types.MsgBurnTokenResponse, error)
func (Keeper) Collection ¶ added in v0.0.8
func (k Keeper) Collection(c context.Context, req *types.QueryCollectionRequest) (*types.QueryCollectionResponse, error)
func (Keeper) Collections ¶ added in v0.0.8
func (k Keeper) Collections(c context.Context, req *types.QueryCollectionsRequest) (*types.QueryCollectionsResponse, error)
func (Keeper) CollectionsByCreator ¶ added in v0.0.8
func (k Keeper) CollectionsByCreator(c context.Context, req *types.QueryCollectionsByCreatorRequest) (*types.QueryCollectionsByCreatorResponse, error)
func (*Keeper) CreateToken ¶ added in v0.0.8
CreateToken writes the new NFT token to the KVStore.
func (*Keeper) GetCollection ¶
func (k *Keeper) GetCollection(ctx sdk.Context, creator sdk.AccAddress, denom string) (collection types.Collection, found bool)
GetCollection returns the NFT collection.
func (*Keeper) GetCollections ¶
func (k *Keeper) GetCollections(ctx sdk.Context) (collections []types.Collection)
GetCollections returns all the NFTs collections.
func (*Keeper) GetMinReserve ¶ added in v0.0.8
GetMinReserve returns minimum allowed reserve for each NFT sub-token.
func (*Keeper) GetParams ¶ added in v0.0.8
GetParams returns the total set of the module parameters.
func (*Keeper) GetSubToken ¶
func (k *Keeper) GetSubToken(ctx sdk.Context, id string, index uint32) (subToken types.SubToken, found bool)
GetSubToken returns the NFT sub-token with specified ID.
func (*Keeper) GetSubTokens ¶
GetSubTokens returns existing NFT sub-tokens from the NFT token with specified ID.
func (*Keeper) GetTokens ¶ added in v0.0.8
func (k *Keeper) GetTokens(ctx sdk.Context, creator sdk.AccAddress, denom string) (tokens []types.Token)
GetTokens returns all NFT tokens from the NFT collection with specified creator and denom.
func (Keeper) MintToken ¶ added in v0.0.8
func (k Keeper) MintToken(c context.Context, msg *types.MsgMintToken) (*types.MsgMintTokenResponse, error)
func (*Keeper) ReplaceSubTokenOwner ¶ added in v0.1.0
func (k *Keeper) ReplaceSubTokenOwner(ctx sdk.Context, id string, index uint32, newOwner string) error
ReplaceSubTokenOwner replaces sub token owner and make changes in indexes. need for legacy module, for common reason there is TransferSubTokens transaction newOwner must be valid bech32 address, subtoken.Owner MUST BE legacy address with prefix 'dx'
func (*Keeper) ReserveTokens ¶
func (*Keeper) ReturnTokensTo ¶
func (Keeper) SendToken ¶ added in v0.0.8
func (k Keeper) SendToken(c context.Context, msg *types.MsgSendToken) (*types.MsgSendTokenResponse, error)
func (*Keeper) SetCollection ¶
func (k *Keeper) SetCollection(ctx sdk.Context, collection types.Collection)
SetCollection writes the NFT collection to the KVStore.
func (*Keeper) SetSubToken ¶
setSubToken writes the NFT sub-token to the KVStore.
func (Keeper) SubToken ¶ added in v0.0.8
func (k Keeper) SubToken(c context.Context, req *types.QuerySubTokenRequest) (*types.QuerySubTokenResponse, error)
func (Keeper) Token ¶ added in v0.0.8
func (k Keeper) Token(c context.Context, req *types.QueryTokenRequest) (*types.QueryTokenResponse, error)
func (Keeper) TransferSubTokens ¶ added in v0.0.8
func (Keeper) UpdateReserve ¶ added in v0.0.8
func (k Keeper) UpdateReserve(c context.Context, msg *types.MsgUpdateReserve) (*types.MsgUpdateReserveResponse, error)
func (Keeper) UpdateToken ¶ added in v0.0.8
func (k Keeper) UpdateToken(c context.Context, msg *types.MsgUpdateToken) (*types.MsgUpdateTokenResponse, error)