Documentation ¶
Index ¶
- type Keeper
- func (k *Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
- func (k *Keeper) BeginBlock(ctx sdk.Context)
- func (k *Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
- func (k *Keeper) DeleteAsset(ctx sdk.Context, denom string)
- func (k *Keeper) DeleteDenomForPacket(ctx sdk.Context, portID, channelID string, sequence uint64)
- func (k *Keeper) ExportGenesis(ctx sdk.Context) *v1.GenesisState
- func (k *Keeper) GetAsset(ctx sdk.Context, denom string) (v v1.Asset, found bool)
- func (k *Keeper) GetAssetForPacket(ctx sdk.Context, portID, channelID string, sequence uint64) (v v1.Asset, err error)
- func (k *Keeper) GetAuthority() string
- func (k *Keeper) GetBlockInterval(ctx sdk.Context) int64
- func (k *Keeper) GetChannelID(ctx sdk.Context) string
- func (k *Keeper) GetDenomForPacket(ctx sdk.Context, portID, channelID string, sequence uint64) (v string, found bool)
- func (k *Keeper) GetParams(ctx sdk.Context) (v v1.Params)
- func (k *Keeper) GetPortID(ctx sdk.Context) string
- func (k *Keeper) GetQueryTimeout(ctx sdk.Context) int64
- func (k *Keeper) GetQuotePrice(ctx sdk.Context, basePrice sdk.DecCoin) (sdk.Coin, error)
- func (k *Keeper) GetTimeout(ctx sdk.Context) time.Duration
- func (k *Keeper) HandleMsgCreateAsset(ctx sdk.Context, msg *v1.MsgCreateAssetRequest) (*v1.MsgCreateAssetResponse, error)
- func (k *Keeper) HandleMsgDeleteAsset(ctx sdk.Context, msg *v1.MsgDeleteAssetRequest) (*v1.MsgDeleteAssetResponse, error)
- func (k *Keeper) HandleMsgUpdateAsset(ctx sdk.Context, msg *v1.MsgUpdateAssetRequest) (*v1.MsgUpdateAssetResponse, error)
- func (k *Keeper) HandleMsgUpdateParams(ctx sdk.Context, msg *v1.MsgUpdateParamsRequest) (*v1.MsgUpdateParamsResponse, error)
- func (k *Keeper) HandleQueryAsset(ctx sdk.Context, req *v1.QueryAssetRequest) (*v1.QueryAssetResponse, error)
- func (k *Keeper) HandleQueryAssets(ctx sdk.Context, req *v1.QueryAssetsRequest) (res *v1.QueryAssetsResponse, err error)
- func (k *Keeper) HandleQueryParams(ctx sdk.Context, _ *v1.QueryParamsRequest) (*v1.QueryParamsResponse, error)
- func (k *Keeper) HasAsset(ctx sdk.Context, denom string) bool
- func (k *Keeper) InitGenesis(ctx sdk.Context, state *v1.GenesisState)
- func (k *Keeper) IterateAssets(ctx sdk.Context, fn func(int, v1.Asset) bool)
- func (k *Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet ibcchanneltypes.Packet, ...) error
- func (k *Keeper) OnTimeoutPacket(ctx sdk.Context, packet ibcchanneltypes.Packet) error
- func (k *Keeper) SendQueryPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, ...) (uint64, error)
- func (k *Keeper) SetAsset(ctx sdk.Context, asset v1.Asset)
- func (k *Keeper) SetDenomForPacket(ctx sdk.Context, portID, channelID string, sequence uint64, denom string)
- func (k *Keeper) SetParams(ctx sdk.Context, params v1.Params)
- func (k *Keeper) Store(ctx sdk.Context) sdk.KVStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, key storetypes.StoreKey, capability ibcexported.ScopedKeeper, ics4 ibcporttypes.ICS4Wrapper, authority string, ) Keeper
func (*Keeper) AuthenticateCapability ¶
func (k *Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
func (*Keeper) BeginBlock ¶
BeginBlock is called at the beginning of each block to trigger IBC query packets for relevant assets.
func (*Keeper) ClaimCapability ¶
func (k *Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
func (*Keeper) DeleteAsset ¶
DeleteAsset removes an asset from the module's KVStore based on the asset denomination.
func (*Keeper) DeleteDenomForPacket ¶
DeleteDenomForPacket removes a denomination for a packet from the module's KVStore based on the port ID, channel ID, and sequence.
func (*Keeper) ExportGenesis ¶
func (k *Keeper) ExportGenesis(ctx sdk.Context) *v1.GenesisState
func (*Keeper) GetAsset ¶
GetAsset retrieves an asset from the module's KVStore based on the asset denomination. If the asset exists, it returns the asset and 'found' as true; otherwise, it returns 'found' as false.
func (*Keeper) GetAssetForPacket ¶
func (k *Keeper) GetAssetForPacket(ctx sdk.Context, portID, channelID string, sequence uint64) (v v1.Asset, err error)
GetAssetForPacket retrieves an asset for a packet from the module's KVStore based on the port ID, channel ID, and sequence. If the asset exists, it returns the asset; otherwise, it returns an error.
func (*Keeper) GetAuthority ¶
func (*Keeper) GetBlockInterval ¶
GetBlockInterval retrieves the BlockInterval parameter from the module's parameters.
func (*Keeper) GetChannelID ¶
GetChannelID retrieves the ChannelID parameter from the module's parameters.
func (*Keeper) GetDenomForPacket ¶
func (k *Keeper) GetDenomForPacket(ctx sdk.Context, portID, channelID string, sequence uint64) (v string, found bool)
GetDenomForPacket retrieves a denomination for a packet from the module's KVStore based on the port ID, channel ID, and sequence. If the denomination exists, it returns the denomination and 'found' as true; otherwise, it returns 'found' as false.
func (*Keeper) GetParams ¶
GetParams retrieves the oracle module parameters from the module's KVStore.
func (*Keeper) GetQueryTimeout ¶
GetQueryTimeout returns the current block time adjusted by the module's timeout parameter in Unix nanoseconds.
func (*Keeper) GetQuotePrice ¶
GetQuotePrice retrieves a quote for a given DecCoin, applying asset pricing if available. If the asset for the given denomination is not found, it returns an error.
func (*Keeper) GetTimeout ¶
GetTimeout retrieves the Timeout parameter from the module's parameters.
func (*Keeper) HandleMsgCreateAsset ¶
func (k *Keeper) HandleMsgCreateAsset(ctx sdk.Context, msg *v1.MsgCreateAssetRequest) (*v1.MsgCreateAssetResponse, error)
func (*Keeper) HandleMsgDeleteAsset ¶
func (k *Keeper) HandleMsgDeleteAsset(ctx sdk.Context, msg *v1.MsgDeleteAssetRequest) (*v1.MsgDeleteAssetResponse, error)
func (*Keeper) HandleMsgUpdateAsset ¶
func (k *Keeper) HandleMsgUpdateAsset(ctx sdk.Context, msg *v1.MsgUpdateAssetRequest) (*v1.MsgUpdateAssetResponse, error)
func (*Keeper) HandleMsgUpdateParams ¶
func (k *Keeper) HandleMsgUpdateParams(ctx sdk.Context, msg *v1.MsgUpdateParamsRequest) (*v1.MsgUpdateParamsResponse, error)
func (*Keeper) HandleQueryAsset ¶
func (k *Keeper) HandleQueryAsset(ctx sdk.Context, req *v1.QueryAssetRequest) (*v1.QueryAssetResponse, error)
func (*Keeper) HandleQueryAssets ¶
func (k *Keeper) HandleQueryAssets(ctx sdk.Context, req *v1.QueryAssetsRequest) (res *v1.QueryAssetsResponse, err error)
func (*Keeper) HandleQueryParams ¶
func (k *Keeper) HandleQueryParams(ctx sdk.Context, _ *v1.QueryParamsRequest) (*v1.QueryParamsResponse, error)
func (*Keeper) HasAsset ¶
HasAsset checks if an asset with the given denomination exists in the module's KVStore.
func (*Keeper) InitGenesis ¶
func (k *Keeper) InitGenesis(ctx sdk.Context, state *v1.GenesisState)
func (*Keeper) IterateAssets ¶
IterateAssets iterates over all assets stored in the module's KVStore and calls the provided function for each asset. The iteration stops when the provided function returns 'true'.
func (*Keeper) OnAcknowledgementPacket ¶
func (k *Keeper) OnAcknowledgementPacket( ctx sdk.Context, packet ibcchanneltypes.Packet, ack ibcchanneltypes.Acknowledgement, ) error
OnAcknowledgementPacket processes the acknowledgement packet received after sending an IBC query packet.
func (*Keeper) OnTimeoutPacket ¶
OnTimeoutPacket handles the case when a packet times out before receiving an acknowledgement.
func (*Keeper) SendQueryPacket ¶
func (k *Keeper) SendQueryPacket( ctx sdk.Context, channelCap *capabilitytypes.Capability, portID, channelID string, timeout uint64, reqs ...abcitypes.RequestQuery, ) (uint64, error)
SendQueryPacket serializes query requests and sends them as an IBC packet to a destination chain.
func (*Keeper) SetDenomForPacket ¶
func (k *Keeper) SetDenomForPacket(ctx sdk.Context, portID, channelID string, sequence uint64, denom string)
SetDenomForPacket stores a denomination for a packet in the module's KVStore.