Documentation ¶
Index ¶
- func NewMsgServerImpl(k *Keeper) types.MsgServer
- func NewTokenProposalHandler(k Keeper) govtypesv1.Handler
- type Keeper
- func (k Keeper) CheckTokensDuplicateName(ctx sdk.Context, name string) bool
- func (k Keeper) Delete(ctx sdk.Context, key []byte, prefix []byte)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) Get(ctx sdk.Context, key []byte, prefix []byte, unmarshal UnmarshalFn) (i interface{}, found bool)
- func (k Keeper) GetAll(ctx sdk.Context, prefix []byte) storetypes.Iterator
- func (k Keeper) GetMinterTokens(ctx sdk.Context, minter string) []*types.Token
- func (k Keeper) GetMinterTokensIterator(ctx sdk.Context, minter string) storetypes.Iterator
- func (k Keeper) GetMinterTokensStore(ctx sdk.Context, minter string) prefix.Store
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetToken(ctx sdk.Context, minter, contractAddress string) (types.Token, error)
- func (k Keeper) GetTokenById(ctx sdk.Context, id string) (*types.TokenProperties, *types.Token, error)
- func (k Keeper) GetTokenByName(ctx sdk.Context, name string) (*types.Token, bool)
- func (k Keeper) GetTokenIterator(ctx sdk.Context) storetypes.Iterator
- func (k Keeper) GetTokenProperties(ctx sdk.Context, id string) (types.TokenProperties, error)
- func (k Keeper) GetTokenPropertiesAll(ctx sdk.Context) []types.TokenProperties
- func (k Keeper) GetTokenPropertiesAllIterator(ctx sdk.Context) storetypes.Iterator
- func (k Keeper) GetTokens(ctx sdk.Context) []types.Token
- func (k Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Marshal(value interface{}) (bytes []byte)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) Set(ctx sdk.Context, key []byte, prefix []byte, i interface{}, marshal MarshalFn)
- func (k Keeper) SetParams(ctx sdk.Context, params *types.Params)
- func (k Keeper) SetToken(ctx sdk.Context, value types.Token)
- func (k Keeper) SetTokenProperties(ctx sdk.Context, value types.TokenProperties)
- func (k Keeper) TokenDoc(c context.Context, req *types.QueryTokenDocRequest) (*types.QueryTokenDocResponse, error)
- func (k Keeper) TokenList(c context.Context, req *types.QueryTokenListRequest) (*types.QueryTokenListResponse, error)
- func (k Keeper) TokenMetadata(c context.Context, req *types.QueryTokenMetadataRequest) (*types.QueryTokenMetadataResponse, error)
- func (k Keeper) Unmarshal(data []byte, val codec.ProtoMarshaler) bool
- func (k Keeper) UnmarshalToken(value []byte) (interface{}, bool)
- func (k Keeper) UnmarshalTokenProperties(value []byte) (interface{}, bool)
- type MarshalFn
- type UnmarshalFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an instance of MsgServer for the provided keeper.
func NewTokenProposalHandler ¶
func NewTokenProposalHandler(k Keeper) govtypesv1.Handler
NewTokenProposalHandler creates a new governance Handler for a ParamChangeProposal
Types ¶
type Keeper ¶
type Keeper struct { IidKeeper types.IidKeeper WasmKeeper types.WasmKeeper ParamSpace paramstypes.Subspace // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, iidKeeper types.IidKeeper, wasmKeeper types.WasmKeeper, paramSpace paramstypes.Subspace, ) Keeper
func (Keeper) CheckTokensDuplicateName ¶
helper function to check if there are any tokens with provided name, return true if it is a duplicate name
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the x/token module's exported genesis.
func (Keeper) Get ¶
func (k Keeper) Get( ctx sdk.Context, key []byte, prefix []byte, unmarshal UnmarshalFn, ) (i interface{}, found bool)
Get gets an item from the store by bytes
func (Keeper) GetMinterTokens ¶
func (Keeper) GetMinterTokensIterator ¶
func (Keeper) GetMinterTokensStore ¶
func (Keeper) GetTokenById ¶
func (k Keeper) GetTokenById(ctx sdk.Context, id string) (*types.TokenProperties, *types.Token, error)
helper function to get the Token and TokenProperties from tokenId
func (Keeper) GetTokenByName ¶
helper function to get the token with provided name
func (Keeper) GetTokenIterator ¶
func (k Keeper) GetTokenIterator(ctx sdk.Context) storetypes.Iterator
func (Keeper) GetTokenProperties ¶
func (Keeper) GetTokenPropertiesAll ¶
func (k Keeper) GetTokenPropertiesAll(ctx sdk.Context) []types.TokenProperties
func (Keeper) GetTokenPropertiesAllIterator ¶
func (k Keeper) GetTokenPropertiesAllIterator(ctx sdk.Context) storetypes.Iterator
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState)
InitGenesis initializes the x/token module's state from a provided genesis state.
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetTokenProperties ¶
func (k Keeper) SetTokenProperties(ctx sdk.Context, value types.TokenProperties)
func (Keeper) TokenDoc ¶
func (k Keeper) TokenDoc(c context.Context, req *types.QueryTokenDocRequest) (*types.QueryTokenDocResponse, error)
func (Keeper) TokenList ¶
func (k Keeper) TokenList(c context.Context, req *types.QueryTokenListRequest) (*types.QueryTokenListResponse, error)
func (Keeper) TokenMetadata ¶
func (k Keeper) TokenMetadata(c context.Context, req *types.QueryTokenMetadataRequest) (*types.QueryTokenMetadataResponse, error)
func (Keeper) Unmarshal ¶
func (k Keeper) Unmarshal(data []byte, val codec.ProtoMarshaler) bool
nolint:staticcheck Unmarshal unmarshal a byte slice to a struct, return false in case of errors
func (Keeper) UnmarshalToken ¶
func (Keeper) UnmarshalTokenProperties ¶
type MarshalFn ¶
type MarshalFn func(value interface{}) []byte
MarshalFn is a generic function to marshal bytes
type UnmarshalFn ¶
UnmarshalFn is a generic function to unmarshal bytes