Documentation ¶
Index ¶
- Constants
- Variables
- func ConstructCollectionIdForProtocolKey(protocolName string, address string) string
- func GetDetailsFromKey(id string) (string, string)
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
- func (k Keeper) BindPort(ctx sdk.Context, portID string) error
- func (k Keeper) ChanCloseInit(ctx sdk.Context, portID, channelID string) error
- func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
- func (k Keeper) DeleteProtocolCollectionFromStore(ctx sdk.Context, protocolName string, address string)
- func (k Keeper) DeleteProtocolFromStore(ctx sdk.Context, protocolName string)
- func (k Keeper) GetCollectionIdForProtocol(goCtx context.Context, req *types.QueryGetCollectionIdForProtocolRequest) (*types.QueryGetCollectionIdForProtocolResponse, error)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetPort(ctx sdk.Context) string
- func (k Keeper) GetProtocol(goCtx context.Context, req *types.QueryGetProtocolRequest) (*types.QueryGetProtocolResponse, error)
- func (k Keeper) GetProtocolCollectionFromStore(ctx sdk.Context, protocolName string, address string) sdkmath.Uint
- func (k Keeper) GetProtocolCollectionsFromStore(ctx sdk.Context) (names []string, addresses []string, collectionIds []sdkmath.Uint)
- func (k Keeper) GetProtocolFromStore(ctx sdk.Context, protocolName string) (*types.Protocol, bool)
- func (k Keeper) GetProtocolsFromStore(ctx sdk.Context) (protocols []*types.Protocol)
- func (k Keeper) IsBound(ctx sdk.Context, portID string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPort(ctx sdk.Context, portID string)
- func (k Keeper) SetProtocolCollectionInStore(ctx sdk.Context, protocolName string, address string, ...) error
- func (k Keeper) SetProtocolInStore(ctx sdk.Context, protocol *types.Protocol) error
- func (k Keeper) StoreHasProtocolID(ctx sdk.Context, protocolName string) bool
Constants ¶
const StoreKey = types.ModuleName
StoreKey is the store key string for nft
Variables ¶
var ( ErrProtocolExists = sdkerrors.Register(types.ModuleName, 1, "protocol already exists") ErrProtocolDoesNotExist = sdkerrors.Register(types.ModuleName, 2, "protocol does not exist") ErrNotProtocolCreator = sdkerrors.Register(types.ModuleName, 3, "not protocol creator") ErrProtocolIsFrozen = sdkerrors.Register(types.ModuleName, 4, "protocol is frozen") )
var ( ProtocolKey = []byte{0x01} CollectionIdKey = []byte{0x02} Delimiter = []byte{0xDD} Placeholder = []byte{0xFF} BalanceKeyDelimiter = "-" )
Functions ¶
func GetDetailsFromKey ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, ps paramtypes.Subspace, channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper, scopedKeeper exported.ScopedKeeper, badgesKeeper types.BadgesKeeper, ) *Keeper
func (Keeper) AuthenticateCapability ¶
func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function
func (Keeper) BindPort ¶
BindPort defines a wrapper function for the port Keeper's function in order to expose it to module's InitGenesis function
func (Keeper) ChanCloseInit ¶
ChanCloseInit defines a wrapper function for the channel Keeper's function.
func (Keeper) ClaimCapability ¶
func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
ClaimCapability allows the IBC app module to claim a capability that core IBC passes to it
func (Keeper) DeleteProtocolCollectionFromStore ¶
func (k Keeper) DeleteProtocolCollectionFromStore(ctx sdk.Context, protocolName string, address string)
DeleteProtocolFromStore deletes a badge from the store.
func (Keeper) DeleteProtocolFromStore ¶
DeleteProtocolFromStore deletes a badge from the store.
func (Keeper) GetCollectionIdForProtocol ¶
func (k Keeper) GetCollectionIdForProtocol(goCtx context.Context, req *types.QueryGetCollectionIdForProtocolRequest) (*types.QueryGetCollectionIdForProtocolResponse, error)
Queries a balance for the given address and badgeId and returns its contents.
func (Keeper) GetProtocol ¶
func (k Keeper) GetProtocol(goCtx context.Context, req *types.QueryGetProtocolRequest) (*types.QueryGetProtocolResponse, error)
Queries a balance for the given address and badgeId and returns its contents.
func (Keeper) GetProtocolCollectionFromStore ¶
func (k Keeper) GetProtocolCollectionFromStore(ctx sdk.Context, protocolName string, address string) sdkmath.Uint
Gets a badge from the store according to the protocolName.
func (Keeper) GetProtocolCollectionsFromStore ¶
func (k Keeper) GetProtocolCollectionsFromStore(ctx sdk.Context) (names []string, addresses []string, collectionIds []sdkmath.Uint)
GetProtocolsFromStore defines a method for returning all badges information by key.
func (Keeper) GetProtocolFromStore ¶
Gets a badge from the store according to the protocolName.
func (Keeper) GetProtocolsFromStore ¶
GetProtocolsFromStore defines a method for returning all badges information by key.
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetProtocolCollectionInStore ¶
func (Keeper) SetProtocolInStore ¶
Source Files ¶
- errors.go
- grpc_query_get_protocol.go
- grpc_query_get_protocol_for_id.go
- keeper.go
- keys.go
- msg_server.go
- msg_server_create_protocol.go
- msg_server_delete_protocol.go
- msg_server_set_collection_for_protocol.go
- msg_server_unset_collection_for_protocol.go
- msg_server_update_protocol.go
- params.go
- query.go
- query_params.go
- store.go