Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AddChainConfig(ctx context.Context, chainConfig *types.ChainConfig) error
- func (k Keeper) AddTokenConfig(ctx context.Context, tokenConfig *types.TokenConfig) error
- func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState
- func (k Keeper) FixReservedBytecode(ctx context.Context) error
- func (k Keeper) GetChainConfig(ctx context.Context, chain string) (types.ChainConfig, error)
- func (k Keeper) GetTokenConfig(ctx context.Context, chain, address string) (types.TokenConfig, error)
- func (k Keeper) GetTokenConfigByPRC20(ctx context.Context, chain string, prc20Addr string) (types.TokenConfig, error)
- func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error
- func (k Keeper) IsChainInboundEnabled(ctx context.Context, chain string) (bool, error)
- func (k Keeper) IsChainOutboundEnabled(ctx context.Context, chain string) (bool, error)
- func (k Keeper) Logger() log.Logger
- func (k Keeper) RebuildPRC20Index(ctx context.Context) error
- func (k Keeper) RemoveTokenConfig(ctx context.Context, chain, tokenAddress string) error
- func (k Keeper) ReserveUGPC(ctx context.Context) error
- func (k Keeper) SchemaBuilder() *collections.SchemaBuilder
- func (k Keeper) UpdateChainConfig(ctx context.Context, chainConfig *types.ChainConfig) error
- func (k Keeper) UpdateParams(ctx context.Context, params types.Params) error
- func (k Keeper) UpdateTokenConfig(ctx context.Context, tokenConfig *types.TokenConfig) error
- type Querier
- func (k Querier) AllChainConfigs(goCtx context.Context, req *types.QueryAllChainConfigsRequest) (*types.QueryAllChainConfigsResponse, error)
- func (k Querier) AllTokenConfigs(goCtx context.Context, req *types.QueryAllTokenConfigsRequest) (*types.QueryAllTokenConfigsResponse, error)
- func (k Querier) ChainConfig(goCtx context.Context, req *types.QueryChainConfigRequest) (*types.QueryChainConfigResponse, error)
- func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Querier) TokenConfig(goCtx context.Context, req *types.QueryTokenConfigRequest) (*types.QueryTokenConfigResponse, error)
- func (k Querier) TokenConfigsByChain(goCtx context.Context, req *types.QueryTokenConfigsByChainRequest) (*types.QueryTokenConfigsByChainResponse, error)
- type TokenConfigIndexes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the module MsgServer interface.
Types ¶
type Keeper ¶
type Keeper struct {
// state management
Params collections.Item[types.Params]
ChainConfigs collections.Map[string, types.ChainConfig]
TokenConfigs *collections.IndexedMap[string, types.TokenConfig, TokenConfigIndexes]
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService storetypes.KVStoreService, logger log.Logger, authority string, evmKeeper types.EVMKeeper, ) Keeper
NewKeeper creates a new Keeper instance
func (Keeper) AddChainConfig ¶
addChainConfig is for adding a new chain configuration
func (Keeper) AddTokenConfig ¶
AddTokenConfig adds a new token configuration to the uregistry.
func (*Keeper) ExportGenesis ¶
func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState
ExportGenesis exports the module's state to a genesis state.
func (Keeper) FixReservedBytecode ¶ added in v0.0.16
func (Keeper) GetChainConfig ¶
func (Keeper) GetTokenConfig ¶
func (Keeper) GetTokenConfigByPRC20 ¶ added in v0.0.13
func (k Keeper) GetTokenConfigByPRC20( ctx context.Context, chain string, prc20Addr string, ) (types.TokenConfig, error)
GetTokenConfigByPRC20 looks up a token config by PRC20 address via the PRC20Index (O(1)). Returns ErrNotFound if the registered chain doesn't match.
func (*Keeper) InitGenesis ¶
InitGenesis initializes the module's state from a genesis state.
func (Keeper) IsChainInboundEnabled ¶
IsChainInboundEnabled checks if inbound is enabled for a given chain
func (Keeper) IsChainOutboundEnabled ¶
IsChainOutboundEnabled checks if outbound is enabled for a given chain
func (Keeper) RebuildPRC20Index ¶ added in v0.0.40
RebuildPRC20Index repopulates the PRC20 secondary index from the primary TokenConfigs map. Pre-upgrade nodes wrote token rows before the PRC20Index existed, so on upgrade the primary store is full while the index is empty. The upgrade migration calls this to backfill it: re-Setting each row re-runs the index function. It is idempotent (Set removes the stale index ref before writing the new one) and a no-op on already-indexed or empty state.
func (Keeper) RemoveTokenConfig ¶
RemoveTokenConfig removes an existing token configuration in the uregistry.
func (Keeper) SchemaBuilder ¶
func (k Keeper) SchemaBuilder() *collections.SchemaBuilder
func (Keeper) UpdateChainConfig ¶
UpdateChainConfig updates the configuration for a specific chain.
func (Keeper) UpdateParams ¶
updateParams is for updating params collections of the module
func (Keeper) UpdateTokenConfig ¶
UpdateTokenConfig updates an existing token configuration in the uregistry.
type Querier ¶
type Querier struct {
Keeper
}
func NewQuerier ¶
func (Querier) AllChainConfigs ¶
func (k Querier) AllChainConfigs(goCtx context.Context, req *types.QueryAllChainConfigsRequest) (*types.QueryAllChainConfigsResponse, error)
AllChainConfigs implements types.QueryServer with pagination.
func (Querier) AllTokenConfigs ¶
func (k Querier) AllTokenConfigs(goCtx context.Context, req *types.QueryAllTokenConfigsRequest) (*types.QueryAllTokenConfigsResponse, error)
AllTokenConfigs implements types.QueryServer with pagination.
func (Querier) ChainConfig ¶
func (k Querier) ChainConfig(goCtx context.Context, req *types.QueryChainConfigRequest) (*types.QueryChainConfigResponse, error)
ChainConfig implements types.QueryServer.
func (Querier) Params ¶
func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Querier) TokenConfig ¶
func (k Querier) TokenConfig(goCtx context.Context, req *types.QueryTokenConfigRequest) (*types.QueryTokenConfigResponse, error)
TokenConfig implements types.QueryServer.
func (Querier) TokenConfigsByChain ¶
func (k Querier) TokenConfigsByChain(goCtx context.Context, req *types.QueryTokenConfigsByChainRequest) (*types.QueryTokenConfigsByChainResponse, error)
TokenConfigsByChain implements types.QueryServer with pagination + key-prefix filter. Storage key is "<chain>:<address>", so we filter at the key level.
type TokenConfigIndexes ¶ added in v0.0.40
TokenConfigIndexes: PRC20Index maps canonical (EIP-55) PRC20 contract address → token storage key for O(1) GetTokenConfigByPRC20. Rows without NativeRepresentation index under the empty-string sentinel which is never queried. Framework auto-maintains on every Set/Remove.
func (TokenConfigIndexes) IndexesList ¶ added in v0.0.40
func (t TokenConfigIndexes) IndexesList() []collections.Index[string, types.TokenConfig]