keeper

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2025 License: MIT Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxPendingXmsgs is the maximum number of pending xmsgs that can be queried
	MaxPendingXmsgs = 700

	// MaxLookbackNonce is the maximum number of nonces to look back to find missed pending xmsgs
	MaxLookbackNonce = 1000
)
View Source
const (
	// AbortMessage is the message to abort a stuck Xmsg
	AbortMessage = "Xmsg aborted with admin cmd"
)
View Source
const MaxOutTxTrackerHashes = 2

MaxOutTxTrackerHashes is the maximum number of hashes that can be stored in the outbound transaction tracker

View Source
const (
	// RemainingFeesToStabilityPoolPercent is the percentage of remaining fees used to fund the gas stability pool.
	// When a transaction is processed, this percentage of the fees is allocated to ensure gas price stability
	// across different chains. This helps in maintaining consistent cross-chain message delivery.
	RemainingFeesToStabilityPoolPercent = 95
)
View Source
const XMSG_EVENT_INDEX = "%d-%d"

Variables

View Source
var BASE_ALLOWED_XMSG_SENDER_KEY = []byte{0}

Functions

func CheckAndUpdateXmsgGasPrice

func CheckAndUpdateXmsgGasPrice(
	ctx sdk.Context,
	k Keeper,
	xmsg types.Xmsg,
	gasPriceFlags relayertypes.GasPriceIncreaseFlags,
) (math.Uint, math.Uint, error)

CheckAndUpdateXmsgGasPrice checks if the retry interval is reached and updates the gas price if so The function returns the gas price increase and the additional fees paid from the gas stability pool

func EmitEventChainIndex

func EmitEventChainIndex(ctx sdk.Context, chainId uint64, height uint64)

func EmitEventInboundFinalized

func EmitEventInboundFinalized(ctx sdk.Context, xmsg *types.Xmsg)

func EmitEventPellSent

func EmitEventPellSent(ctx sdk.Context, xmsg types.Xmsg)

func EmitEventStatusNode

func EmitEventStatusNode(ctx sdk.Context, statusNode *types.EventStatusNode)

func EmitOutboundFailure

func EmitOutboundFailure(ctx sdk.Context, oldStatus string, newStatus string, xmsgIndex string)

func EmitOutboundSuccess

func EmitOutboundSuccess(ctx sdk.Context, oldStatus string, newStatus string, xmsgIndex string)

func GetAbortedAmount

func GetAbortedAmount(xmsg types.Xmsg) sdkmath.Uint

GetAbortedAmount returns the amount to refund for a given Xmsg . If the Xmsg has an outbound transaction, it returns the amount of the outbound transaction. If OutTxParams is nil or the amount is zero, it returns the amount of the inbound transaction. This is because there might be a case where the transaction is set to be aborted before paying gas or creating an outbound transaction.In such a situation we can refund the entire amount that has been locked in connector or TSS

func GetIndexStringForTssMigration

func GetIndexStringForTssMigration(currentTssPubkey, newTssPubkey string, chainID int64, amount sdkmath.Uint, height int64) string

func IsPending

func IsPending(xmsg *types.Xmsg) bool

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func ParsePellSentEvent

func ParsePellSentEvent(log ethtypes.Log, connectorPEVM ethcommon.Address) (*pellconnector.PellConnectorPellSent, error)

ParsePellSentEvent tries extracting PellSent event from the input logs using the pell send contract; It only returns a not-nil event if the event has been correctly validated as a valid PellSent event

func SortXmsgsByHeightAndChainID

func SortXmsgsByHeightAndChainID(cctxs []*types.Xmsg) []*types.Xmsg

SortXmsgsByHeightAndChainID sorts the cctxs by height (first come first serve), the chain ID doesn't really matter

Types

type CheckAndUpdateXmsgGasPriceFunc

type CheckAndUpdateXmsgGasPriceFunc func(
	ctx sdk.Context,
	k Keeper,
	xmsg types.Xmsg,
	flags relayertypes.GasPriceIncreaseFlags,
) (math.Uint, math.Uint, error)

CheckAndUpdateXmsgGasPriceFunc is a function type for checking and updating the gas price of a xmsg

type ConnectorEventHandler

type ConnectorEventHandler struct {
	// contains filtered or unexported fields
}

func (ConnectorEventHandler) GetContractAddress

func (h ConnectorEventHandler) GetContractAddress(ctx sdk.Context) (ethcommon.Address, error)

get connector contract address

func (ConnectorEventHandler) HandleEvent

func (h ConnectorEventHandler) HandleEvent(ctx sdk.Context, _ uint64, toAddress ethcommon.Address, logs []*ethtypes.Log, txOrigin string) ([]*types.CrossChainFee, error)

HandleEvent handles the event from the log. It returns the crosschain fees for the event

func (ConnectorEventHandler) ParseEvent

func (h ConnectorEventHandler) ParseEvent(contractAddr ethcommon.Address, log *ethtypes.Log) (interface{}, error)

parse event from log

type Hooks

type Hooks struct {
	// contains filtered or unexported fields
}

func (Hooks) PostTxProcessing

func (h Hooks) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt) error

evm hooks ----------------------------------------------------------------------------------------------------- PostTxProcessing is a wrapper for calling the EVM PostTxProcessing hook on the module keeper

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	storeKey,
	memKey storetypes.StoreKey,
	stakingKeeper types.StakingKeeper,
	authKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	relayerKeeper types.RelayerKeeper,
	pevmKeeper types.PevmKeeper,
	authorityKeeper types.AuthorityKeeper,
	lightclientKeeper types.LightclientKeeper,
) *Keeper

func (Keeper) AddAllowedXmsgSender

AddAllowedXmsgSender adds a list of allowed xmsg sender to the xmsg module.

func (Keeper) AddFinalizedInbound

func (k Keeper) AddFinalizedInbound(ctx sdk.Context, intxHash string, chainID int64, eventIndex uint64)

func (Keeper) CrosschainFeeParamByChainId

CrosschainFeeParamByChainId returns the crosschain fee param for a given chain id

func (Keeper) CrosschainFeeParams

CrosschainFeeParams returns all crosschain fee params

func (Keeper) DeductFees

func (k Keeper) DeductFees(ctx sdk.Context, fees []*types.CrossChainFee) error

func (Keeper) DeleteAllowedXmsgSenders

func (k Keeper) DeleteAllowedXmsgSenders(ctx sdk.Context, builders []string)

DeleteAllowedXmsgSenders removes specified allowed xmsg senders from the store

func (Keeper) DeleteBlockProof

func (k Keeper) DeleteBlockProof(ctx sdk.Context, chainId, height uint64)

delete block proof

func (Keeper) DeleteXmsgByEventIndex

func (k Keeper) DeleteXmsgByEventIndex(ctx sdk.Context, eventIndex string)

GetXmsg returns a send from its index

func (Keeper) GasRechargeOperationIndex

GasRechargeOperationIndex queries the gas token increment index

func (Keeper) GetAllCrosschainEventFees

func (k Keeper) GetAllCrosschainEventFees(ctx sdk.Context) ([]types.CrosschainFeeParam, error)

GetAllCrosschainEventFees retrieves all CrosschainEventFee objects stored in the KVStore

func (Keeper) GetAllFinalizedInbound

func (k Keeper) GetAllFinalizedInbound(ctx sdk.Context) (list []string)

func (Keeper) GetAllGasPrice

func (k Keeper) GetAllGasPrice(ctx sdk.Context) (list []types.GasPrice)

GetAllGasPrice returns all gasPrice

func (Keeper) GetAllInTxHashToXmsg

func (k Keeper) GetAllInTxHashToXmsg(ctx sdk.Context) (list []types.InTxHashToXmsg)

GetAllInTxHashToXmsg returns all inTxHashToXmsg

func (Keeper) GetAllInTxTracker

func (k Keeper) GetAllInTxTracker(ctx sdk.Context) (inTxTrackers []types.InTxTracker)

func (Keeper) GetAllInTxTrackerForChain

func (k Keeper) GetAllInTxTrackerForChain(ctx sdk.Context, chainID int64) (list []types.InTxTracker)

func (Keeper) GetAllInTxTrackerForChainPaginated

func (k Keeper) GetAllInTxTrackerForChainPaginated(ctx sdk.Context, chainID int64, pagination *query.PageRequest) (inTxTrackers []types.InTxTracker, pageRes *query.PageResponse, err error)

func (Keeper) GetAllInTxTrackerPaginated

func (k Keeper) GetAllInTxTrackerPaginated(ctx sdk.Context, pagination *query.PageRequest) (inTxTrackers []types.InTxTracker, pageRes *query.PageResponse, err error)

func (Keeper) GetAllLastBlockHeight

func (k Keeper) GetAllLastBlockHeight(ctx sdk.Context) (list []types.LastBlockHeight)

GetAllLastBlockHeight returns all lastBlockHeight

func (Keeper) GetAllOutTxTracker

func (k Keeper) GetAllOutTxTracker(ctx sdk.Context) (list []types.OutTxTracker)

GetAllOutTxTracker returns all outTxTracker

func (Keeper) GetAllXmsg

func (k Keeper) GetAllXmsg(ctx sdk.Context) (list []types.Xmsg)

func (Keeper) GetAllowedXmsgSenders

func (k Keeper) GetAllowedXmsgSenders(ctx sdk.Context) ([]string, bool)

GetAllowedXmsgSenders retrieves the list of allowed xmsg senders from the store

func (Keeper) GetAuthKeeper

func (k Keeper) GetAuthKeeper() types.AccountKeeper

func (Keeper) GetAuthorityKeeper

func (k Keeper) GetAuthorityKeeper() types.AuthorityKeeper

func (Keeper) GetBankKeeper

func (k Keeper) GetBankKeeper() types.BankKeeper

func (Keeper) GetBlockProof

func (k Keeper) GetBlockProof(ctx sdk.Context, chainId, height uint64) (val types.BlockProof, exist bool)

get block proof from chainId

func (Keeper) GetChainIndex

func (k Keeper) GetChainIndex(ctx sdk.Context, chainId uint64) (val types.ChainIndex, exist bool)

get chain index from local store if not exist. it will try to sync from observer chainParam

func (Keeper) GetCodec

func (k Keeper) GetCodec() codec.Codec

func (Keeper) GetCrosschainEventFee

func (k Keeper) GetCrosschainEventFee(ctx sdk.Context, chainId int64) (types.CrosschainFeeParam, bool)

GetCrosschainEventFee retrieves a CrosschainEventFee object from the KVStore by chainId

func (Keeper) GetEventStatusNode

func (k Keeper) GetEventStatusNode(ctx sdk.Context, index string) (val types.EventStatusNode, found bool)

GetXmsg returns a send from its index

func (Keeper) GetGasPrice

func (k Keeper) GetGasPrice(ctx sdk.Context, chainID int64) (val types.GasPrice, found bool)

GetGasPrice returns a gasPrice from its index

func (Keeper) GetGasRechargeOperationIndex

func (k Keeper) GetGasRechargeOperationIndex(ctx sdk.Context, chainID int64) uint64

func (Keeper) GetInTxHashToXmsg

func (k Keeper) GetInTxHashToXmsg(
	ctx sdk.Context,
	inTxHash string,

) (val types.InTxHashToXmsg, found bool)

GetInTxHashToXmsg returns a inTxHashToXmsg from its index

func (Keeper) GetInTxTracker

func (k Keeper) GetInTxTracker(ctx sdk.Context, chainID int64, txHash string) (val types.InTxTracker, found bool)

GetInTxTracker returns a InTxTracker from its index

func (Keeper) GetLastBlockHeight

func (k Keeper) GetLastBlockHeight(ctx sdk.Context, index string) (val types.LastBlockHeight, found bool)

GetLastBlockHeight returns a lastBlockHeight from its index

func (Keeper) GetLightclientKeeper

func (k Keeper) GetLightclientKeeper() types.LightclientKeeper

func (Keeper) GetMedianGasPriceInUint

func (k Keeper) GetMedianGasPriceInUint(ctx sdk.Context, chainID int64) (math.Uint, bool)

func (Keeper) GetMemKey

func (k Keeper) GetMemKey() storetypes.StoreKey

func (Keeper) GetOutTxTracker

func (k Keeper) GetOutTxTracker(
	ctx sdk.Context,
	chainID int64,
	nonce uint64,
) (val types.OutTxTracker, found bool)

GetOutTxTracker returns a outTxTracker from its index

func (Keeper) GetPellRechargeOperationIndex

func (k Keeper) GetPellRechargeOperationIndex(ctx sdk.Context, chainID int64) uint64

func (Keeper) GetPevmKeeper

func (k Keeper) GetPevmKeeper() types.PevmKeeper

func (Keeper) GetRateLimiterAssetRateList

func (k Keeper) GetRateLimiterAssetRateList(
	ctx sdk.Context,
) (flags types.RateLimiterFlags, found bool)

GetRateLimiterAssetRateList returns a list of all foreign asset rate

func (Keeper) GetRateLimiterFlags

func (k Keeper) GetRateLimiterFlags(ctx sdk.Context) (val types.RateLimiterFlags, found bool)

GetRateLimiterFlags returns the rate limiter flags

func (Keeper) GetRelayerKeeper

func (k Keeper) GetRelayerKeeper() types.RelayerKeeper

func (Keeper) GetRevertGasLimit

func (k Keeper) GetRevertGasLimit(ctx sdk.Context, xmsg types.Xmsg) (uint64, error)

GetRevertGasLimit returns the gas limit for the revert transaction in a Xmsg It returns 0 if there is no error but the gas limit can't be determined from the Xmsg data

func (Keeper) GetStakingKeeper

func (k Keeper) GetStakingKeeper() types.StakingKeeper

func (Keeper) GetStoreKey

func (k Keeper) GetStoreKey() storetypes.StoreKey

func (Keeper) GetXmsg

func (k Keeper) GetXmsg(ctx sdk.Context, index string) (val types.Xmsg, found bool)

GetXmsg returns a send from its index

func (Keeper) GetXmsgByEventIndex

func (k Keeper) GetXmsgByEventIndex(ctx sdk.Context, eventIndex string) (val types.Xmsg, found bool)

GetXmsg returns a send from its index

func (Keeper) HandleEVMEvents

func (k Keeper) HandleEVMEvents(ctx sdk.Context, xmsg *types.Xmsg) (bool, error)

HandleEVMEvents handles all events from an inbound tx returns (isContractReverted, err) (true, non-nil) means CallEVM() reverted

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

func (Keeper) InTxHashToXmsgData

InTxHashToXmsgData queries the data of all xmsgs indexed by a in tx hash

func (Keeper) IsAllowedXmsgSender

func (k Keeper) IsAllowedXmsgSender(ctx sdk.Context, builder string) bool

IsAllowedXmsgSender checks if the given allowed xmsg sender is in the list of registered allowed xmsg senders.

func (Keeper) IsFinalizedInbound

func (k Keeper) IsFinalizedInbound(ctx sdk.Context, intxHash string, chainID int64, eventIndex uint64) bool

func (Keeper) IsGasRechargeOperationIndexFinalized

func (k Keeper) IsGasRechargeOperationIndexFinalized(ctx sdk.Context, chainID int64, voteIndex uint64) bool

func (Keeper) IsPellRechargeOperationIndexFinalized

func (k Keeper) IsPellRechargeOperationIndexFinalized(ctx sdk.Context, chainID int64, voteIndex uint64) bool

func (Keeper) IterateAndUpdateXmsgGasPrice

func (k Keeper) IterateAndUpdateXmsgGasPrice(
	ctx sdk.Context,
	chains []*pellchains.Chain,
	updateFunc CheckAndUpdateXmsgGasPriceFunc,
) (int, relayertypes.GasPriceIncreaseFlags)

IterateAndUpdateXmsgGasPrice iterates through all xmsg and updates the gas price if pending for too long The function returns the number of xmsgs updated and the gas price increase flags used

func (Keeper) ListAllowedXmsgSenders

ListXmsgBuilders returns a list of authorized Xmsg builder addresses. It retrieves the list of builders from the keeper and returns them in the response. This function is used to query the current set of authorized Xmsg builders in the system.

func (Keeper) ListPendingXmsg

ListPendingXmsg returns a list of pending xmsgs and the total number of pending xmsgs a limit for the number of xmsgs to return can be specified or the default is MaxPendingXmsgs

func (Keeper) ListPendingXmsgWithinRateLimit

ListPendingXmsgWithinRateLimit returns a list of pending cctxs that do not exceed the outbound rate limit a limit for the number of cctxs to return can be specified or the default is MaxPendingXmsgs

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) MigrateTSSFundsForChain

func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount sdkmath.Uint, currentTss relayertypes.TSS, tssList []relayertypes.TSS) error

func (Keeper) PayGasAndUpdateXmsg

func (k Keeper) PayGasAndUpdateXmsg(
	ctx sdk.Context,
	chainID int64,
	xmsg *types.Xmsg,
) error

PayGasAndUpdateXmsg updates the outbound tx with the new amount after paying the gas fee **Caller should feed temporary ctx into this function** chainID is the outbound chain chain id , this can be receiver chain for regular transactions and sender-chain to reverted transactions

func (Keeper) PayNativeGasAndUpdateXmsg

func (k Keeper) PayNativeGasAndUpdateXmsg(
	ctx sdk.Context,
	chainID int64,
	xmsg *types.Xmsg,
) error

PayGasNativeAndUpdateXmsg updates the outbound tx with the new amount subtracting the gas fee **Caller should feed temporary ctx into this function**

func (Keeper) PellRechargeOperationIndex

PellRechargeOperationIndex queries the pell token increment index

func (Keeper) ProcessFailedOutbound

func (k Keeper) ProcessFailedOutbound(ctx sdk.Context, xmsg *types.Xmsg) error

This function sets Xmsg status , in cases where the outbound tx is successful, but tx itself fails This is done because SaveSuccessfulOutbound does not set the xmsg status For cases where the outbound tx is unsuccessful, the xmsg status is automatically set to Aborted in the ProcessFailedOutbound function, so we can just return and error to trigger that

func (Keeper) ProcessInbound

func (k Keeper) ProcessInbound(ctx sdk.Context, xmsg *types.Xmsg)

ProcessInbound processes the inbound Xmsg. It does a conditional dispatch to ProcessPEVMDeposit or ProcessCrosschainMsgPassing based on the receiver chain. The internal functions handle the state changes and error handling.

func (Keeper) ProcessOutbound

func (k Keeper) ProcessOutbound(ctx sdk.Context, xmsg *types.Xmsg, ballotStatus relayertypes.BallotStatus) error

ProcessOutbound processes the finalization of an outbound transaction based on the ballot status The state is committed only if the individual steps are successful

func (Keeper) ProcessPellSentEvent

func (k Keeper) ProcessPellSentEvent(
	ctx sdk.Context,
	event *pellconnector.PellConnectorPellSent,
	emittingContract ethcommon.Address,
	txOrigin string,
	tss relayertypes.TSS,
) error

ProcessPellSentEvent creates a new Xmsg to process the pellsent event error indicates system error and non-recoverable; should abort

event PellSent(

  address sourceTxOriginAddress,
  address indexed pellTxSenderAddress,
  uint256 indexed destinationChainId,
  bytes destinationAddress,
  bytes message,
  bytes pellParams
);

func (Keeper) ProcessSuccessfulOutbound

func (k Keeper) ProcessSuccessfulOutbound(ctx sdk.Context, xmsg *types.Xmsg)

func (Keeper) ProcessXmsg

func (k Keeper) ProcessXmsg(ctx sdk.Context, xmsg types.Xmsg, receiverChain *chains.Chain) error

func (Keeper) RateLimiterFlags

RateLimiterFlags queries the rate limiter flags

func (Keeper) RateLimiterInput

RateLimiterInput collects the input data for the rate limiter

func (Keeper) RemoveAllowedXmsgSender

RemoveAllowedXmsgSender removes a list of allowed xmsg sender from the xmsg module.

func (Keeper) RemoveGasPrice

func (k Keeper) RemoveGasPrice(ctx sdk.Context, index string)

RemoveGasPrice removes a gasPrice from the store

func (Keeper) RemoveInTxHashToXmsg

func (k Keeper) RemoveInTxHashToXmsg(
	ctx sdk.Context,
	inTxHash string,

)

RemoveInTxHashToXmsg removes a inTxHashToXmsg from the store

func (Keeper) RemoveInTxTrackerIfExists

func (k Keeper) RemoveInTxTrackerIfExists(ctx sdk.Context, chainID int64, txHash string)

func (Keeper) RemoveLastBlockHeight

func (k Keeper) RemoveLastBlockHeight(ctx sdk.Context, index string)

RemoveLastBlockHeight removes a lastBlockHeight from the store

func (Keeper) RemoveOutTxTracker

func (k Keeper) RemoveOutTxTracker(
	ctx sdk.Context,
	chainID int64,
	nonce uint64,

)

RemoveOutTxTracker removes a outTxTracker from the store

func (Keeper) RemoveXmsg

func (k Keeper) RemoveXmsg(ctx sdk.Context, index string)

RemoveXmsg removes a send from the store

func (Keeper) ResetGasMeterAndConsumeGas

func (k Keeper) ResetGasMeterAndConsumeGas(ctx sdk.Context, gasUsed uint64)

ResetGasMeterAndConsumeGas reset first the gas meter consumed value to zero and set it back to the new value 'gasUsed'

func (Keeper) SaveAllowedXmsgSenders

func (k Keeper) SaveAllowedXmsgSenders(ctx sdk.Context, builders []string)

SaveAllowedXmsgSenders saves a list of allowed xmsg senders to the store If no senders exist, it creates a new entry If senders already exist, it appends the new senders to the existing list

func (Keeper) SaveFailedOutbound

func (k Keeper) SaveFailedOutbound(ctx sdk.Context, xmsg *types.Xmsg, errMessage string, ballotIndex string)

func (Keeper) SaveInbound

func (k Keeper) SaveInbound(ctx sdk.Context, xmsg *types.Xmsg, blockHeight uint64, eventIndex uint64)

func (Keeper) SaveOutbound

func (k Keeper) SaveOutbound(ctx sdk.Context, xmsg *types.Xmsg, ballotIndex string)

SaveOutbound saves the outbound transaction.It does the following things in one function:

  1. Set the ballot index for the outbound vote to the xmsg

  2. Remove the nonce from the pending nonces

  3. Remove the outbound tx tracker

  4. Set the xmsg and nonce to xmsg and inTxHash to xmsg

func (Keeper) SaveSuccessfulOutbound

func (k Keeper) SaveSuccessfulOutbound(ctx sdk.Context, xmsg *types.Xmsg, ballotIndex string)

SaveSuccessfulOutbound saves a successful outbound transaction. This function does not set the Xmsg status, therefore all successful outbound transactions need to have their status set during processing

func (Keeper) SetBlockProof

func (k Keeper) SetBlockProof(ctx sdk.Context, blockProof *types.BlockProof)

store block proof

func (Keeper) SetChainIndex

func (k Keeper) SetChainIndex(ctx sdk.Context, chainId, height uint64)

store chain index

func (Keeper) SetEventStatusNode

func (k Keeper) SetEventStatusNode(ctx sdk.Context, index string, event types.EventStatusNode)

SetXmsg set a specific send in the store from its index

func (Keeper) SetFinalizedInbound

func (k Keeper) SetFinalizedInbound(ctx sdk.Context, finalizedInboundIndex string)

func (Keeper) SetGasPrice

func (k Keeper) SetGasPrice(ctx sdk.Context, gasPrice types.GasPrice)

SetGasPrice set a specific gasPrice in the store from its index

func (Keeper) SetGasRechargeOperationIndex

func (k Keeper) SetGasRechargeOperationIndex(ctx sdk.Context, chainID int64, voteIndex uint64)

func (Keeper) SetInTxHashToXmsg

func (k Keeper) SetInTxHashToXmsg(ctx sdk.Context, inTxHashToXmsg types.InTxHashToXmsg)

SetInTxHashToXmsg set a specific inTxHashToXmsg in the store from its index

func (Keeper) SetInTxTracker

func (k Keeper) SetInTxTracker(ctx sdk.Context, InTxTracker types.InTxTracker)

SetInTxTracker set a specific InTxTracker in the store from its index

func (*Keeper) SetInternalEventHooks

func (k *Keeper) SetInternalEventHooks(hooks ...types.InternalEventLogHooks) *Keeper

func (Keeper) SetLastBlockHeight

func (k Keeper) SetLastBlockHeight(ctx sdk.Context, lastBlockHeight types.LastBlockHeight)

SetLastBlockHeight set a specific lastBlockHeight in the store from its index

func (Keeper) SetOutTxTracker

func (k Keeper) SetOutTxTracker(ctx sdk.Context, outTxTracker types.OutTxTracker)

SetOutTxTracker set a specific outTxTracker in the store from its index

func (Keeper) SetPellRechargeOperationIndex

func (k Keeper) SetPellRechargeOperationIndex(ctx sdk.Context, chainID int64, voteIndex uint64)

func (Keeper) SetRateLimiterFlags

func (k Keeper) SetRateLimiterFlags(ctx sdk.Context, rateLimiterFlags types.RateLimiterFlags)

SetRateLimiterFlags set the rate limiter flags in the store

func (Keeper) SetXmsg

func (k Keeper) SetXmsg(ctx sdk.Context, xmsg types.Xmsg)

SetXmsg set a specific send in the store from its index

func (Keeper) SetXmsgAndNonceToXmsgAndInTxHashToXmsg

func (k Keeper) SetXmsgAndNonceToXmsgAndInTxHashToXmsg(ctx sdk.Context, xmsg types.Xmsg)

SetXmsgAndNonceToXmsgAndInTxHashToXmsg does the following things in one function: 1. set the xmsg in the store 2. set the mapping inTxHash -> xmsgIndex , one inTxHash can be connected to multiple xmsgindex 3. set the mapping nonce => xmsg 4. update the pell accounting

func (Keeper) SetXmsgByEventIndex

func (k Keeper) SetXmsgByEventIndex(ctx sdk.Context, eventIndex string, xmsg types.Xmsg)

SetXmsg set a specific send in the store from its index

func (*Keeper) SetXmsgResultHooks

func (k *Keeper) SetXmsgResultHooks(hooks ...types.XmsgOutboundResultHook) *Keeper

func (Keeper) StoreCrosschainEventFee

func (k Keeper) StoreCrosschainEventFee(ctx sdk.Context, crosschainEventFee types.CrosschainFeeParam)

StoreCrosschainEventFee stores a CrosschainEventFee object in the KVStore using chainId as the key

func (Keeper) UpdateNonce

func (k Keeper) UpdateNonce(ctx sdk.Context, receiveChainID int64, xmsg *types.Xmsg) error

UpdateNonce sets the Xmsg outbound nonce to the next nonce, and updates the nonce of blockchain state. It also updates the PendingNonces that is used to track the unfulfilled outbound txs.

func (Keeper) UpsertCrosschainFeeParams

UpsertCrosschainFeeParams upserts crosschain fee params

func (Keeper) ValidateOutboundMessage

func (k Keeper) ValidateOutboundMessage(ctx sdk.Context, msg types.MsgVoteOnObservedOutboundTx) (types.Xmsg, error)

func (Keeper) Xmsg

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL