Documentation ¶
Index ¶
- Constants
- Variables
- func KeyCollection(denomID string) []byte
- func KeyDenomCreator(address sdk.AccAddress, denomId string) []byte
- func KeyDenomID(id string) []byte
- func KeyDenomSymbol(symbol string) []byte
- func KeyONFT(denomID, onftID string) []byte
- func KeyOwner(address sdk.AccAddress, denomID, onftID string) []byte
- func Migrate(ctx sdk.Context, storeKey storetypes.StoreKey, ...) error
- func MigrateCollections(ctx sdk.Context, storeKey storetypes.StoreKey, logger log.Logger, k keeper) error
- func MigrateParams(ctx sdk.Context, legacySubspace exported.Subspace, k keeper) error
- func SplitKeyDenom(key []byte) (denomID, nftID string, err error)
- func SplitKeyOwner(key []byte) (address sdk.AccAddress, denom, id string, err error)
- func UnsafeBytesToStr(b []byte) string
- func UnsafeStrToBytes(s string) []byte
- type NFTKeeper
Constants ¶
View Source
const (
ModuleName = "onft"
)
Variables ¶
View Source
var ( PrefixONFT = []byte{0x01} PrefixOwners = []byte{0x02} PrefixCollection = []byte{0x03} PrefixDenom = []byte{0x04} PrefixDenomSymbol = []byte{0x05} PrefixCreator = []byte{0x06} )
View Source
var ParamsKey = []byte{0x07}
Functions ¶
func KeyCollection ¶
func KeyDenomCreator ¶
func KeyDenomCreator(address sdk.AccAddress, denomId string) []byte
func KeyDenomID ¶
func KeyDenomSymbol ¶
func Migrate ¶
func Migrate( ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace exported.Subspace, cdc codec.BinaryCodec, nftKeeper NFTKeeper, ) error
func MigrateCollections ¶
func MigrateCollections(ctx sdk.Context, storeKey storetypes.StoreKey, logger log.Logger, k keeper, ) error
MigrateCollections is used to migrate nft data from onft to x/nft
func MigrateParams ¶
MigrateParams migrates the onft module state from the consensus version 1 to version 2. Specifically, it takes the parameters that are currently stored and managed by the x/params modules and stores them directly into the onft module state.
func SplitKeyDenom ¶
func SplitKeyOwner ¶
func SplitKeyOwner(key []byte) (address sdk.AccAddress, denom, id string, err error)
func UnsafeBytesToStr ¶
UnsafeBytesToStr is meant to make a zero allocation conversion from []byte -> string to speed up operations, it is not meant to be used generally, but for a specific pattern to delete keys from a map.
func UnsafeStrToBytes ¶
UnsafeStrToBytes uses unsafe to convert string into byte array. Returned bytes must not be altered after this function is called as it will cause a segmentation fault.
Types ¶
Click to show internal directories.
Click to hide internal directories.