Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- type BankKeeper
- type ChannelKeeper
- type CreateDenomMetadataProposal
- func (*CreateDenomMetadataProposal) Descriptor() ([]byte, []int)
- func (csp *CreateDenomMetadataProposal) GetDescription() string
- func (csp *CreateDenomMetadataProposal) GetTitle() string
- func (m *CreateDenomMetadataProposal) Marshal() (dAtA []byte, err error)
- func (m *CreateDenomMetadataProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *CreateDenomMetadataProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (csp *CreateDenomMetadataProposal) ProposalRoute() string
- func (csp *CreateDenomMetadataProposal) ProposalType() string
- func (*CreateDenomMetadataProposal) ProtoMessage()
- func (m *CreateDenomMetadataProposal) Reset()
- func (m *CreateDenomMetadataProposal) Size() (n int)
- func (csp CreateDenomMetadataProposal) String() string
- func (m *CreateDenomMetadataProposal) Unmarshal(dAtA []byte) error
- func (csp *CreateDenomMetadataProposal) ValidateBasic() error
- func (m *CreateDenomMetadataProposal) XXX_DiscardUnknown()
- func (m *CreateDenomMetadataProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateDenomMetadataProposal) XXX_Merge(src proto.Message)
- func (m *CreateDenomMetadataProposal) XXX_Size() int
- func (m *CreateDenomMetadataProposal) XXX_Unmarshal(b []byte) error
- type DenomMetadataHooks
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MultiDenomMetadataHooks
- type RollappKeeper
- type TransferKeeper
- type UpdateDenomMetadataProposal
- func (*UpdateDenomMetadataProposal) Descriptor() ([]byte, []int)
- func (csp *UpdateDenomMetadataProposal) GetDescription() string
- func (csp *UpdateDenomMetadataProposal) GetTitle() string
- func (m *UpdateDenomMetadataProposal) Marshal() (dAtA []byte, err error)
- func (m *UpdateDenomMetadataProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *UpdateDenomMetadataProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (csp *UpdateDenomMetadataProposal) ProposalRoute() string
- func (csp *UpdateDenomMetadataProposal) ProposalType() string
- func (*UpdateDenomMetadataProposal) ProtoMessage()
- func (m *UpdateDenomMetadataProposal) Reset()
- func (m *UpdateDenomMetadataProposal) Size() (n int)
- func (csp UpdateDenomMetadataProposal) String() string
- func (m *UpdateDenomMetadataProposal) Unmarshal(dAtA []byte) error
- func (csp *UpdateDenomMetadataProposal) ValidateBasic() error
- func (m *UpdateDenomMetadataProposal) XXX_DiscardUnknown()
- func (m *UpdateDenomMetadataProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdateDenomMetadataProposal) XXX_Merge(src proto.Message)
- func (m *UpdateDenomMetadataProposal) XXX_Size() int
- func (m *UpdateDenomMetadataProposal) XXX_Unmarshal(b []byte) error
Constants ¶
const ( // ProposalTypeCreateDenomMetadata defines the type for a CreateDenomMetadata ProposalTypeCreateDenomMetadata = "CreateDenomMetadata" // ProposalTypeUpdateDenomMetadata defines the type for a UpdateDenomMetadata ProposalTypeUpdateDenomMetadata = "UpdateDenomMetadata" )
const DefaultIndex uint64 = 1
DefaultIndex is the default global index
Variables ¶
var ( ErrDenomAlreadyExists = sdkerrors.Register(ModuleName, 1000, "denom metadata is already registered") ErrDenomDoesNotExist = sdkerrors.Register(ModuleName, 1001, "unable to find denom metadata registered") )
x/denommetadata module sentinel errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGovDenommetadata = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGovDenommetadata = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGovDenommetadata = fmt.Errorf("proto: unexpected end of group") )
var ( // ModuleName defines the module name. ModuleName = "denommetadata" // RouterKey is the message route for the denommetadata module RouterKey = ModuleName // QuerierRoute defines the module's query routing key. QuerierRoute = ModuleName )
var (
ModuleCdc = codec.NewAminoCodec(amino)
)
Functions ¶
func RegisterCodec ¶ added in v3.1.0
func RegisterCodec(cdc *codec.LegacyAmino)
RegisterCodec registers the necessary x/denommetadata interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.
func RegisterInterfaces ¶ added in v3.1.0
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
RegisterInterfaces registers interfaces and implementations of the denommetadata module.
Types ¶
type BankKeeper ¶
type BankKeeper interface { HasDenomMetaData(ctx sdk.Context, denom string) bool SetDenomMetaData(ctx sdk.Context, denomMetaData types.Metadata) }
BankKeeper defines the expected interface needed
type ChannelKeeper ¶
type ChannelKeeper interface {
GetChannelClientState(ctx sdk.Context, portID, channelID string) (string, exported.ClientState, error)
}
ChannelKeeper defines the expected IBC channel keeper
type CreateDenomMetadataProposal ¶ added in v3.1.0
type CreateDenomMetadataProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` TokenMetadata []types.Metadata `protobuf:"bytes,3,rep,name=tokenMetadata,proto3" json:"tokenMetadata"` }
func NewCreateMetadataProposal ¶ added in v3.1.0
func NewCreateMetadataProposal(title, description string, denommetadata []types.Metadata) *CreateDenomMetadataProposal
NewCreateMetadataProposal creates a new create denommetadata proposal.
func (*CreateDenomMetadataProposal) Descriptor ¶ added in v3.1.0
func (*CreateDenomMetadataProposal) Descriptor() ([]byte, []int)
func (*CreateDenomMetadataProposal) GetDescription ¶ added in v3.1.0
func (csp *CreateDenomMetadataProposal) GetDescription() string
GetDescription returns the description of a community pool spend proposal.
func (*CreateDenomMetadataProposal) GetTitle ¶ added in v3.1.0
func (csp *CreateDenomMetadataProposal) GetTitle() string
GetTitle returns the title of a community pool spend proposal.
func (*CreateDenomMetadataProposal) Marshal ¶ added in v3.1.0
func (m *CreateDenomMetadataProposal) Marshal() (dAtA []byte, err error)
func (*CreateDenomMetadataProposal) MarshalTo ¶ added in v3.1.0
func (m *CreateDenomMetadataProposal) MarshalTo(dAtA []byte) (int, error)
func (*CreateDenomMetadataProposal) MarshalToSizedBuffer ¶ added in v3.1.0
func (m *CreateDenomMetadataProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CreateDenomMetadataProposal) ProposalRoute ¶ added in v3.1.0
func (csp *CreateDenomMetadataProposal) ProposalRoute() string
ProposalRoute returns the routing key of a community pool spend proposal.
func (*CreateDenomMetadataProposal) ProposalType ¶ added in v3.1.0
func (csp *CreateDenomMetadataProposal) ProposalType() string
ProposalType returns the type of a community pool spend proposal.
func (*CreateDenomMetadataProposal) ProtoMessage ¶ added in v3.1.0
func (*CreateDenomMetadataProposal) ProtoMessage()
func (*CreateDenomMetadataProposal) Reset ¶ added in v3.1.0
func (m *CreateDenomMetadataProposal) Reset()
func (*CreateDenomMetadataProposal) Size ¶ added in v3.1.0
func (m *CreateDenomMetadataProposal) Size() (n int)
func (CreateDenomMetadataProposal) String ¶ added in v3.1.0
func (csp CreateDenomMetadataProposal) String() string
String implements the Stringer interface.
func (*CreateDenomMetadataProposal) Unmarshal ¶ added in v3.1.0
func (m *CreateDenomMetadataProposal) Unmarshal(dAtA []byte) error
func (*CreateDenomMetadataProposal) ValidateBasic ¶ added in v3.1.0
func (csp *CreateDenomMetadataProposal) ValidateBasic() error
ValidateBasic runs basic stateless validity checks
func (*CreateDenomMetadataProposal) XXX_DiscardUnknown ¶ added in v3.1.0
func (m *CreateDenomMetadataProposal) XXX_DiscardUnknown()
func (*CreateDenomMetadataProposal) XXX_Marshal ¶ added in v3.1.0
func (m *CreateDenomMetadataProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateDenomMetadataProposal) XXX_Merge ¶ added in v3.1.0
func (m *CreateDenomMetadataProposal) XXX_Merge(src proto.Message)
func (*CreateDenomMetadataProposal) XXX_Size ¶ added in v3.1.0
func (m *CreateDenomMetadataProposal) XXX_Size() int
func (*CreateDenomMetadataProposal) XXX_Unmarshal ¶ added in v3.1.0
func (m *CreateDenomMetadataProposal) XXX_Unmarshal(b []byte) error
type DenomMetadataHooks ¶ added in v3.1.0
type DenomMetadataHooks interface { AfterDenomMetadataCreation(ctx sdk.Context, metadata banktypes.Metadata) error AfterDenomMetadataUpdate(ctx sdk.Context, metadata banktypes.Metadata) error }
DenomMetadataHooks event hooks for denom metadata creation/update
type GenesisState ¶ added in v3.1.0
type GenesisState struct { }
GenesisState defines the denommetadata module's various parameters when first initialized
func DefaultGenesis ¶ added in v3.1.0
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default genesis state
func (*GenesisState) Descriptor ¶ added in v3.1.0
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) Marshal ¶ added in v3.1.0
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalTo ¶ added in v3.1.0
func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
func (*GenesisState) MarshalToSizedBuffer ¶ added in v3.1.0
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶ added in v3.1.0
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶ added in v3.1.0
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶ added in v3.1.0
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶ added in v3.1.0
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶ added in v3.1.0
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶ added in v3.1.0
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶ added in v3.1.0
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶ added in v3.1.0
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶ added in v3.1.0
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶ added in v3.1.0
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶ added in v3.1.0
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MultiDenomMetadataHooks ¶ added in v3.1.0
type MultiDenomMetadataHooks []DenomMetadataHooks
combine multiple DenomMetadata hooks, all hook functions are run in array sequence
func NewMultiDenomMetadataHooks ¶ added in v3.1.0
func NewMultiDenomMetadataHooks(hooks ...DenomMetadataHooks) MultiDenomMetadataHooks
Creates hooks for the DenomMetadata Module.
func (MultiDenomMetadataHooks) AfterDenomMetadataCreation ¶ added in v3.1.0
func (MultiDenomMetadataHooks) AfterDenomMetadataUpdate ¶ added in v3.1.0
type RollappKeeper ¶
type RollappKeeper interface { GetParams(ctx sdk.Context) rollapptypes.Params GetRollapp(ctx sdk.Context, chainID string) (rollapp rollapptypes.Rollapp, found bool) RegisterDenomMetadata(ctx sdk.Context, rollapp rollapptypes.Rollapp, ibcBaseDenom, baseDenom string) }
type TransferKeeper ¶
type TransferKeeper interface {
HasDenomTrace(ctx sdk.Context, denomTraceHash tmbytes.HexBytes) bool
}
TransferKeeper defines the expected transfer keeper
type UpdateDenomMetadataProposal ¶ added in v3.1.0
type UpdateDenomMetadataProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` TokenMetadata []types.Metadata `protobuf:"bytes,3,rep,name=tokenMetadata,proto3" json:"tokenMetadata"` }
func NewUpdateDenomMetadataProposal ¶ added in v3.1.0
func NewUpdateDenomMetadataProposal(title, description string, denommetadata []types.Metadata) *UpdateDenomMetadataProposal
NewUpdateDenomMetadataProposal creates a new proposal for updating existing token metadata.
func (*UpdateDenomMetadataProposal) Descriptor ¶ added in v3.1.0
func (*UpdateDenomMetadataProposal) Descriptor() ([]byte, []int)
func (*UpdateDenomMetadataProposal) GetDescription ¶ added in v3.1.0
func (csp *UpdateDenomMetadataProposal) GetDescription() string
GetDescription returns the description of a community pool spend proposal.
func (*UpdateDenomMetadataProposal) GetTitle ¶ added in v3.1.0
func (csp *UpdateDenomMetadataProposal) GetTitle() string
GetTitle returns the title of a community pool spend proposal.
func (*UpdateDenomMetadataProposal) Marshal ¶ added in v3.1.0
func (m *UpdateDenomMetadataProposal) Marshal() (dAtA []byte, err error)
func (*UpdateDenomMetadataProposal) MarshalTo ¶ added in v3.1.0
func (m *UpdateDenomMetadataProposal) MarshalTo(dAtA []byte) (int, error)
func (*UpdateDenomMetadataProposal) MarshalToSizedBuffer ¶ added in v3.1.0
func (m *UpdateDenomMetadataProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*UpdateDenomMetadataProposal) ProposalRoute ¶ added in v3.1.0
func (csp *UpdateDenomMetadataProposal) ProposalRoute() string
ProposalRoute returns the routing key of a community pool spend proposal.
func (*UpdateDenomMetadataProposal) ProposalType ¶ added in v3.1.0
func (csp *UpdateDenomMetadataProposal) ProposalType() string
ProposalType returns the type of a community pool spend proposal.
func (*UpdateDenomMetadataProposal) ProtoMessage ¶ added in v3.1.0
func (*UpdateDenomMetadataProposal) ProtoMessage()
func (*UpdateDenomMetadataProposal) Reset ¶ added in v3.1.0
func (m *UpdateDenomMetadataProposal) Reset()
func (*UpdateDenomMetadataProposal) Size ¶ added in v3.1.0
func (m *UpdateDenomMetadataProposal) Size() (n int)
func (UpdateDenomMetadataProposal) String ¶ added in v3.1.0
func (csp UpdateDenomMetadataProposal) String() string
String implements the Stringer interface.
func (*UpdateDenomMetadataProposal) Unmarshal ¶ added in v3.1.0
func (m *UpdateDenomMetadataProposal) Unmarshal(dAtA []byte) error
func (*UpdateDenomMetadataProposal) ValidateBasic ¶ added in v3.1.0
func (csp *UpdateDenomMetadataProposal) ValidateBasic() error
ValidateBasic runs basic stateless validity checks
func (*UpdateDenomMetadataProposal) XXX_DiscardUnknown ¶ added in v3.1.0
func (m *UpdateDenomMetadataProposal) XXX_DiscardUnknown()
func (*UpdateDenomMetadataProposal) XXX_Marshal ¶ added in v3.1.0
func (m *UpdateDenomMetadataProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateDenomMetadataProposal) XXX_Merge ¶ added in v3.1.0
func (m *UpdateDenomMetadataProposal) XXX_Merge(src proto.Message)
func (*UpdateDenomMetadataProposal) XXX_Size ¶ added in v3.1.0
func (m *UpdateDenomMetadataProposal) XXX_Size() int
func (*UpdateDenomMetadataProposal) XXX_Unmarshal ¶ added in v3.1.0
func (m *UpdateDenomMetadataProposal) XXX_Unmarshal(b []byte) error