Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertOperatorSetParamFromStoreToEvent(param *types.OperatorSetParam) registryrouter.IRegistryRouterOperatorSetParam
- func ConvertPoolParamsFromEventToStore(params []registryrouter.IStakeRegistryRouterPoolParams) []*types.PoolParams
- func ConvertPoolParamsFromStakeEventToStore(params []stakeregistryrouter.IStakeRegistryRouterPoolParams) []*types.PoolParams
- func ConvertPoolParamsFromStoreToEvent(params []*types.PoolParams) ([]registryrouter.IStakeRegistryRouterPoolParams, error)
- func ConvertPoolParamsFromStoreToStakeEvent(params []*types.PoolParams) ([]stakeregistryrouter.IStakeRegistryRouterPoolParams, error)
- func ConvertPubkeyRegistrationParamsFromEventToStore(params registryrouter.IRegistryRouterSyncPubkeyRegistrationParams) *types.PubkeyRegistrationParamsV2
- func ConvertPubkeyRegistrationParamsFromStoreToEvent(params *types.PubkeyRegistrationParamsV2) registryrouter.IRegistryRouterSyncPubkeyRegistrationParams
- func IntersectBytes(a, b []byte) []byte
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type DelegationHandler
- func (h DelegationHandler) GetContractAddress(ctx sdk.Context) (ethcommon.Address, error)
- func (h DelegationHandler) HandleEvent(ctx sdk.Context, epochNum uint64, _ ethcommon.Address, logs []*ethtypes.Log, ...) ([]*xmsgtypes.CrossChainFee, error)
- func (h DelegationHandler) ParseEvent(contractAddr ethcommon.Address, log *ethtypes.Log) (interface{}, error)
- type EventParser
- type Hooks
- func (h Hooks) HandleEventLogs(ctx sdk.Context, emittingContractAddr ethcommon.Address, logs []*ethtypes.Log, ...) error
- func (h Hooks) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt) error
- func (h Hooks) ProcessXmsgOutboundResult(ctx sdk.Context, xmsg *xmsgtypes.Xmsg, ballotStatus relayertypes.BallotStatus)
- type Keeper
- func (k *Keeper) AddDVSSupportedChain(ctx sdk.Context, registryRouterAddress ethcommon.Address, ...) error
- func (k Keeper) AddGroupData(ctx sdk.Context, registryRouterAddress ethcommon.Address, group *types.Group) error
- func (k *Keeper) AddGroupOperatorRegistration(ctx sdk.Context, registryRouterAddr ethcommon.Address, ...) error
- func (k *Keeper) AddGroupOperatorRegistrationV1(ctx sdk.Context, registryRouterAddr common.Address, ...) error
- func (k *Keeper) AddGroupSync(ctx sdk.Context, txHash string, xmsgIndex string) error
- func (k *Keeper) AddGroupSyncs(ctx sdk.Context, txHash string, xmsgIndices []string) error
- func (k Keeper) AddPools(ctx sdk.Context, registryRouterAddress ethcommon.Address, groupNumber uint8, ...) error
- func (k *Keeper) AddRegistryRouterAddress(ctx sdk.Context, addrs []ethcommon.Address) error
- func (k Keeper) Cdc() codec.BinaryCodec
- func (k Keeper) DeleteAllShares(ctx sdk.Context)
- func (k Keeper) DeleteEpochOperatorSharesSyncTxs(ctx sdk.Context, chainId uint64, epochNumber uint64)
- func (k Keeper) DeleteEpochSharesModified(ctx sdk.Context, epochNumber uint64)
- func (k Keeper) GetAllOperators(ctx sdk.Context) []types.Operator
- func (k Keeper) GetAllOutboundStates(ctx sdk.Context) ([]*types.EpochOutboundState, error)
- func (k *Keeper) GetAllRegistryRouterAddresses(ctx sdk.Context) ([]ethcommon.Address, error)
- func (k Keeper) GetAllShares(ctx sdk.Context) []*types.OperatorShares
- func (k Keeper) GetAuthKeeper() types.AccountKeeper
- func (k Keeper) GetAuthorityKeeper() types.AuthorityKeeper
- func (k Keeper) GetBankKeeper() types.BankKeeper
- func (k Keeper) GetBlocksPerEpoch(ctx sdk.Context) uint64
- func (k Keeper) GetChangedOperatorSharesSnapshot(ctx sdk.Context, epochNumber uint64) (*types.ChangedOperatorSharesSnapshot, bool)
- func (k Keeper) GetChangedOperatorSharesSnapshotByEpochRange(ctx sdk.Context, startEpoch uint64, endEpoch uint64) *types.ChangedOperatorSharesSnapshot
- func (k *Keeper) GetDVSSupportedChain(ctx sdk.Context, registryRouterAddress ethcommon.Address, chainId uint64) (*types.DVSInfo, bool)
- func (k *Keeper) GetDVSSupportedChainList(ctx sdk.Context, registryRouterAddress ethcommon.Address) (*types.DVSInfoList, bool)
- func (k *Keeper) GetDVSSupportedChainListByStatus(ctx sdk.Context, registryRouterAddress ethcommon.Address, ...) ([]*types.DVSInfo, bool)
- func (k Keeper) GetDVSSupportedChainStatus(ctx sdk.Context, registryRouterAddress ethcommon.Address, chainId uint64) (types.OutboundStatus, error)
- func (k Keeper) GetEVMKeeper() types.EVMKeeper
- func (k Keeper) GetEpochChangedOperatorSharesSnapshot(ctx context.Context, req *types.QueryEpochChangedOperatorSharesSnapshotRequest) (*types.QueryGetEpochChangedOperatorSharesSnapshotResponse, error)
- func (k Keeper) GetEpochInfo(ctx context.Context, req *types.QueryEpochInfoRequest) (*types.QueryGetEpochInfoResponse, error)
- func (k Keeper) GetEpochNumber(ctx sdk.Context) uint64
- func (k Keeper) GetEpochOperatorSharesSyncTxs(ctx sdk.Context, chainId uint64, epochNumber uint64) (*types.EpochOperatorSharesSyncTxs, bool)
- func (k Keeper) GetGroupByGroupNumber(ctx sdk.Context, registryRouterAddress ethcommon.Address, groupNumber uint64) (*types.Group, error)
- func (k Keeper) GetGroupDataList(ctx sdk.Context, registryRouterAddress ethcommon.Address) (*types.GroupList, bool)
- func (k *Keeper) GetGroupOperatorRegistrationList(ctx sdk.Context, registryRouterAddr ethcommon.Address) (*types.GroupOperatorRegistrationListV2, bool)
- func (k *Keeper) GetGroupOperatorRegistrationListV1(ctx sdk.Context, registryRouterAddr common.Address) (*types.GroupOperatorRegistrationList, bool)
- func (k *Keeper) GetGroupSyncList(ctx sdk.Context, txHash string) (*types.GroupSyncList, bool)
- func (k Keeper) GetOperator(ctx sdk.Context, operator string) (types.Operator, bool)
- func (k Keeper) GetOperatorShares(ctx sdk.Context, chainId uint64, operator, strategy string) *types.OperatorShares
- func (k Keeper) GetOutboundState(ctx sdk.Context, chainID uint64) (*types.EpochOutboundState, bool)
- func (k Keeper) GetOutboundStateByChainID(ctx context.Context, req *types.QueryOutboundStateByChainIDRequest) (*types.QueryGetOutboundStateByChainIDResponse, error)
- func (k Keeper) GetRelayerKeeper() types.RelayerKeeper
- func (k Keeper) GetSharesByChain(ctx sdk.Context, chainId uint64) []*types.OperatorShares
- func (k Keeper) GetSharesByChainAndOperator(ctx sdk.Context, chainId uint64, operator string) []*types.OperatorShares
- func (k *Keeper) GetStakeRegistryRouterAddress(ctx sdk.Context, key ethcommon.Address) (ethcommon.Address, error)
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IterateAllShares(ctx sdk.Context, cb func(*types.OperatorShares) bool)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MigrationStore(ctx sdk.Context) error
- func (k Keeper) ModifyPoolParams(ctx sdk.Context, registryRouterAddress ethcommon.Address, groupNumber uint8, ...) error
- func (k Keeper) NewOperatorSharesStore(ctx sdk.Context) OperatorSharesStore
- func (k Keeper) ProcessEpochs(ctx sdk.Context)
- func (k Keeper) QueryDVSGroupDataList(ctx context.Context, req *types.QueryDVSGroupDataListRequest) (*types.QueryDVSGroupDataListResponse, error)
- func (k Keeper) QueryDVSGroupOperatorRegistrationList(ctx context.Context, req *types.QueryDVSGroupOperatorRegistrationListRequest) (*types.QueryDVSGroupOperatorRegistrationListResponse, error)
- func (k Keeper) QueryDVSGroupSyncStatus(ctx context.Context, req *types.QueryDVSGroupSyncStatusRequest) (*types.QueryDVSGroupSyncStatusResponse, error)
- func (k Keeper) QueryDVSRegistryRouterList(ctx context.Context, req *types.QueryDVSRegistryRouterListRequest) (*types.QueryDVSRegistryRouterListResponse, error)
- func (k Keeper) QueryDVSSupportedChainList(ctx context.Context, req *types.QueryDVSSupportedChainListRequest) (*types.QueryDVSSupportedChainListResponse, error)
- func (k Keeper) QueryDVSSupportedChainStatus(ctx context.Context, req *types.QueryDVSSupportedChainStatusRequest) (*types.QueryDVSSupportedChainStatusResponse, error)
- func (k *Keeper) RemoveGroupOperatorRegistration(ctx sdk.Context, registryRouterAddr, operatorAddr ethcommon.Address) error
- func (k *Keeper) RemoveGroupOperatorRegistrationByIds(ctx sdk.Context, registryRouterAddr ethcommon.Address, ...) error
- func (k Keeper) RemoveOperator(ctx sdk.Context, operator string)
- func (k Keeper) RemovePools(ctx sdk.Context, registryRouterAddress ethcommon.Address, groupNumber uint8, ...) error
- func (k Keeper) SetBlocksPerEpoch(ctx sdk.Context, blocks uint64)
- func (k Keeper) SetChangedOperatorSharesSnapshot(ctx sdk.Context, epochNumber uint64, sharesChange []*types.OperatorShares)
- func (k Keeper) SetDVSSupportedChainStatus(ctx sdk.Context, registryRouterAddress ethcommon.Address, chainId uint64, ...) error
- func (k Keeper) SetEpochNumber(ctx sdk.Context, epochNumber uint64)
- func (k Keeper) SetEpochOperatorSharesSyncTxs(ctx sdk.Context, chainId uint64, epochNumber uint64, xmsgIndexes []string)
- func (k Keeper) SetGroupEjectionParams(ctx sdk.Context, registryRouterAddress ethcommon.Address, groupNumber uint8, ...) error
- func (k Keeper) SetOperator(ctx sdk.Context, operator types.Operator)
- func (k Keeper) SetOperatorSetParams(ctx sdk.Context, registryRouterAddress ethcommon.Address, groupNumber uint8, ...) error
- func (k Keeper) SetOperatorShares(ctx sdk.Context, chainId uint64, operator, strategy string, shares sdkmath.Int)
- func (k Keeper) SetOutboundState(ctx sdk.Context, outboundState *types.EpochOutboundState) error
- func (k *Keeper) SetStakeRegistryRouterAddress(ctx sdk.Context, addrs []ethcommon.Address) error
- func (k Keeper) UpdateBlocksPerEpoch(goCtx context.Context, msg *restakingtypes.MsgUpdateBlocksPerEpoch) (*restakingtypes.MsgUpdateBlocksPerEpochResponse, error)
- func (k Keeper) UpsertOutboundState(goctx context.Context, msg *restakingtypes.MsgUpsertOutboundState) (*restakingtypes.MsgUpsertOutboundStateResponse, error)
- type MiddlewareEventHandler
- func (h *MiddlewareEventHandler) GetContractAddress(ctx sdk.Context) (ethcommon.Address, error)
- func (h *MiddlewareEventHandler) HandleEvent(ctx sdk.Context, _ uint64, toAddress ethcommon.Address, logs []*ethtypes.Log, ...) ([]*xmsgtypes.CrossChainFee, error)
- func (h *MiddlewareEventHandler) ParseEvent(contractAddr ethcommon.Address, log *ethtypes.Log) (interface{}, error)
- func (h *MiddlewareEventHandler) RegisterAllEventSubscriber()
- type MiddlewareSyncHandler
- type OperatorHandler
- func (h OperatorHandler) GetContractAddress(ctx sdk.Context) (ethcommon.Address, error)
- func (h OperatorHandler) HandleEvent(ctx sdk.Context, epochNum uint64, _ ethcommon.Address, logs []*ethtypes.Log, ...) ([]*xmsgtypes.CrossChainFee, error)
- func (h OperatorHandler) ParseEvent(contractAddr ethcommon.Address, log *ethtypes.Log) (interface{}, error)
- type OperatorSharesStore
- type RegistryRouterEventSubscriber
- type RegistryRouterFactoryEventSubscriber
Constants ¶
const ( SyncOperatorRegisteredEvent = "syncRegisterAsOperator" SyncOperatorDetailsModifiedEvent = "syncModifyOperatorDetails" )
const BATCH_SIZE = 50
const BATCH_SYNC_DELEGATION_SHARES_FN_NAME = "batchSyncDelegatedShares"
const DEFAULT_BLOCKS_PER_EPOCH = 10
Variables ¶
var EPOCH_NUMBER_KEY = []byte{0}
Functions ¶
func ConvertOperatorSetParamFromStoreToEvent ¶
func ConvertOperatorSetParamFromStoreToEvent(param *types.OperatorSetParam) registryrouter.IRegistryRouterOperatorSetParam
ConvertOperatorSetParamFromEventToStore converts an operator set param from event to store
func ConvertPoolParamsFromEventToStore ¶
func ConvertPoolParamsFromEventToStore(params []registryrouter.IStakeRegistryRouterPoolParams) []*types.PoolParams
ConvertPoolParamsFromEventToStore converts a router strategy params from event to store
func ConvertPoolParamsFromStakeEventToStore ¶
func ConvertPoolParamsFromStakeEventToStore(params []stakeregistryrouter.IStakeRegistryRouterPoolParams) []*types.PoolParams
func ConvertPoolParamsFromStoreToEvent ¶
func ConvertPoolParamsFromStoreToEvent(params []*types.PoolParams) ([]registryrouter.IStakeRegistryRouterPoolParams, error)
ConvertPoolParamsFromStoreToEvent converts a router strategy params from store to event
func ConvertPoolParamsFromStoreToStakeEvent ¶
func ConvertPoolParamsFromStoreToStakeEvent(params []*types.PoolParams) ([]stakeregistryrouter.IStakeRegistryRouterPoolParams, error)
ConvertPoolParamsFromStoreToStakeEvent converts a router strategy params from store to event
func ConvertPubkeyRegistrationParamsFromEventToStore ¶
func ConvertPubkeyRegistrationParamsFromEventToStore(params registryrouter.IRegistryRouterSyncPubkeyRegistrationParams) *types.PubkeyRegistrationParamsV2
ConvertPubkeyRegistrationParamsFromEventToStore converts a pubkey registration params from event to store
func ConvertPubkeyRegistrationParamsFromStoreToEvent ¶
func ConvertPubkeyRegistrationParamsFromStoreToEvent(params *types.PubkeyRegistrationParamsV2) registryrouter.IRegistryRouterSyncPubkeyRegistrationParams
ConvertPubkeyRegistrationParamsFromStoreToEvent converts a pubkey registration params from store to event
func IntersectBytes ¶
IntersectBytes returns the intersection of two byte slices as a new slice.
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type DelegationHandler ¶
type DelegationHandler struct {
Keeper
}
func (DelegationHandler) GetContractAddress ¶
get delegation manager contract address
func (DelegationHandler) HandleEvent ¶
func (h DelegationHandler) HandleEvent(ctx sdk.Context, epochNum uint64, _ ethcommon.Address, logs []*ethtypes.Log, txOrigin string) ([]*xmsgtypes.CrossChainFee, error)
HandleEvent handles the event from the log
func (DelegationHandler) ParseEvent ¶
func (h DelegationHandler) ParseEvent(contractAddr ethcommon.Address, log *ethtypes.Log) (interface{}, error)
parse event from log
type EventParser ¶
type EventParser struct {
EventType interface{}
Parser func(log ethtypes.Log) (interface{}, error)
}
EventParser defines the event type and its corresponding parsing function
type Hooks ¶
type Hooks struct {
Keeper
}
func (Hooks) HandleEventLogs ¶
func (h Hooks) HandleEventLogs(ctx sdk.Context, emittingContractAddr ethcommon.Address, logs []*ethtypes.Log, txOrigin string) error
HandleEventLogs is a wrapper for calling the EVM PostTxProcessing hook on
func (Hooks) PostTxProcessing ¶
evm hooks ----------------------------------------------------------------------------------------------------- PostTxProcessing is a wrapper for calling the EVM PostTxProcessing hook on the module keeper
func (Hooks) ProcessXmsgOutboundResult ¶
func (h Hooks) ProcessXmsgOutboundResult(ctx sdk.Context, xmsg *xmsgtypes.Xmsg, ballotStatus relayertypes.BallotStatus)
ProcessXmsgOutboundResult processes the outbound result of a xmsg The chain can only proceed with synchronization when all transactions within an epoch have been successfully synchronized. This mechanism ensures data consistency and completeness across the chain.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, authKeeper types.AccountKeeper, evmKeeper types.EVMKeeper, bankKeeper types.BankKeeper, relayerKeeper types.RelayerKeeper, authorityKeeper types.AuthorityKeeper, pevmKeeper types.PevmKeeper, xmsgKeeper types.XmsgKeeper, ) *Keeper
func (*Keeper) AddDVSSupportedChain ¶
func (k *Keeper) AddDVSSupportedChain(ctx sdk.Context, registryRouterAddress ethcommon.Address, dvsInfo *types.DVSInfo) error
AddDVSSupportedChain adds a new DVS info to the list of supported chains for a given registry router address
func (Keeper) AddGroupData ¶
func (k Keeper) AddGroupData(ctx sdk.Context, registryRouterAddress ethcommon.Address, group *types.Group) error
AddGroupData adds the group data
func (*Keeper) AddGroupOperatorRegistration ¶
func (k *Keeper) AddGroupOperatorRegistration(ctx sdk.Context, registryRouterAddr ethcommon.Address, registration *types.GroupOperatorRegistrationV2) error
AddGroupOperatorRegistration adds a group operator registration to the list for the given registry router address
func (*Keeper) AddGroupOperatorRegistrationV1 ¶
func (k *Keeper) AddGroupOperatorRegistrationV1(ctx sdk.Context, registryRouterAddr common.Address, registration *types.GroupOperatorRegistration) error
AddGroupOperatorRegistrationV1 adds a group operator registration to the list for the given registry router address This function is the old version, mainly used for unit tests to write the old version of the operator registration relationship data, because the new code does not retain the old version of the write method This function must be deleted in the next version of the code TODO: This function should be removed after the upgrade
func (*Keeper) AddGroupSync ¶
AddGroupSync adds the quorum sync
func (*Keeper) AddGroupSyncs ¶
func (Keeper) AddPools ¶
func (k Keeper) AddPools(ctx sdk.Context, registryRouterAddress ethcommon.Address, groupNumber uint8, poolParams []*types.PoolParams) error
AddPools adds the strategies
func (*Keeper) AddRegistryRouterAddress ¶
AddRegistryRouterAddress adds a registry router address to the quorum data
func (Keeper) Cdc ¶
func (k Keeper) Cdc() codec.BinaryCodec
func (Keeper) DeleteAllShares ¶
DeleteAllShares deletes all shares
func (Keeper) DeleteEpochOperatorSharesSyncTxs ¶
func (k Keeper) DeleteEpochOperatorSharesSyncTxs(ctx sdk.Context, chainId uint64, epochNumber uint64)
delete epoch operator shares sync txs
func (Keeper) DeleteEpochSharesModified ¶
func (Keeper) GetAllOperators ¶
GetAllOperators returns all operators from the store
func (Keeper) GetAllOutboundStates ¶
GetAllOutboundStates retrieves all outbound states from the state store.
func (*Keeper) GetAllRegistryRouterAddresses ¶
GetAllRegistryRouterAddresses returns the list of registry routers
func (Keeper) GetAllShares ¶
func (k Keeper) GetAllShares(ctx sdk.Context) []*types.OperatorShares
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) GetBlocksPerEpoch ¶
GetBlocksPerEpoch get blocks per epoch
func (Keeper) GetChangedOperatorSharesSnapshot ¶
func (Keeper) GetChangedOperatorSharesSnapshotByEpochRange ¶
func (k Keeper) GetChangedOperatorSharesSnapshotByEpochRange(ctx sdk.Context, startEpoch uint64, endEpoch uint64) *types.ChangedOperatorSharesSnapshot
get operator shares changed snapshot by epoch range [startEpoch, endEpoch]
func (*Keeper) GetDVSSupportedChain ¶
func (k *Keeper) GetDVSSupportedChain(ctx sdk.Context, registryRouterAddress ethcommon.Address, chainId uint64) (*types.DVSInfo, bool)
GetDVSSupportedChain returns the DVS info for a given registry router address and chain id
func (*Keeper) GetDVSSupportedChainList ¶
func (k *Keeper) GetDVSSupportedChainList(ctx sdk.Context, registryRouterAddress ethcommon.Address) (*types.DVSInfoList, bool)
GetDVSSupportedChainList returns the list of supported chains for a given registry router address
func (*Keeper) GetDVSSupportedChainListByStatus ¶
func (k *Keeper) GetDVSSupportedChainListByStatus(ctx sdk.Context, registryRouterAddress ethcommon.Address, status types.OutboundStatus) ([]*types.DVSInfo, bool)
GetDVSSupportedChainListByStatus returns the list of supported chains for a given registry router address with normal status
func (Keeper) GetDVSSupportedChainStatus ¶
func (k Keeper) GetDVSSupportedChainStatus(ctx sdk.Context, registryRouterAddress ethcommon.Address, chainId uint64) (types.OutboundStatus, error)
GetDVSSupportedChainStatus returns the outbound status for a given registry router address and chain id
func (Keeper) GetEVMKeeper ¶
func (Keeper) GetEpochChangedOperatorSharesSnapshot ¶
func (k Keeper) GetEpochChangedOperatorSharesSnapshot(ctx context.Context, req *types.QueryEpochChangedOperatorSharesSnapshotRequest) (*types.QueryGetEpochChangedOperatorSharesSnapshotResponse, error)
GetEpochChangedOperatorSharesSnapshot returns the changed operator shares snapshot
func (Keeper) GetEpochInfo ¶
func (k Keeper) GetEpochInfo(ctx context.Context, req *types.QueryEpochInfoRequest) (*types.QueryGetEpochInfoResponse, error)
GetEpochInfo returns the epoch info
func (Keeper) GetEpochNumber ¶
GetEpochNumber gets the epoch number
func (Keeper) GetEpochOperatorSharesSyncTxs ¶
func (k Keeper) GetEpochOperatorSharesSyncTxs(ctx sdk.Context, chainId uint64, epochNumber uint64) (*types.EpochOperatorSharesSyncTxs, bool)
get epoch operator shares sync txs
func (Keeper) GetGroupByGroupNumber ¶
func (k Keeper) GetGroupByGroupNumber( ctx sdk.Context, registryRouterAddress ethcommon.Address, groupNumber uint64, ) (*types.Group, error)
GetGroupByGroupNumber queries a single Group by its group number.
func (Keeper) GetGroupDataList ¶
func (k Keeper) GetGroupDataList(ctx sdk.Context, registryRouterAddress ethcommon.Address) (*types.GroupList, bool)
GetGroupDataList gets the group data list
func (*Keeper) GetGroupOperatorRegistrationList ¶
func (k *Keeper) GetGroupOperatorRegistrationList(ctx sdk.Context, registryRouterAddr ethcommon.Address) (*types.GroupOperatorRegistrationListV2, bool)
GetGroupOperatorRegistrationList returns the group operator registration list for the given registry router address
func (*Keeper) GetGroupOperatorRegistrationListV1 ¶
func (k *Keeper) GetGroupOperatorRegistrationListV1(ctx sdk.Context, registryRouterAddr common.Address) (*types.GroupOperatorRegistrationList, bool)
GetGroupOperatorRegistrationListV1 returns the group operator registration list for the given registry router address This function is the old version, mainly used for unit tests to read the old version of the operator registration relationship data, because the new code does not retain the old version of the read method This function must be deleted in the next version of the code TODO: This function should be removed after the upgrade
func (*Keeper) GetGroupSyncList ¶
GetGroupSyncList gets the quorum sync list
func (Keeper) GetOperator ¶
GetOperator returns an operator from the store
func (Keeper) GetOperatorShares ¶
func (k Keeper) GetOperatorShares(ctx sdk.Context, chainId uint64, operator, strategy string) *types.OperatorShares
GetOperatorShares retrieves operator shares
func (Keeper) GetOutboundState ¶
GetOutboundState retrieves the outbound state of cross-chain messages for a specific chain ID. This function retrieves and deserializes the OutboundState object from the state database. If no state is found for the given chainId, it returns nil and false.
func (Keeper) GetOutboundStateByChainID ¶
func (k Keeper) GetOutboundStateByChainID(ctx context.Context, req *types.QueryOutboundStateByChainIDRequest) (*types.QueryGetOutboundStateByChainIDResponse, error)
GetOutboundStateByChainID returns the outbound state by chain id
func (Keeper) GetRelayerKeeper ¶
func (k Keeper) GetRelayerKeeper() types.RelayerKeeper
func (Keeper) GetSharesByChain ¶
GetSharesByChain gets all shares for a specific chain
func (Keeper) GetSharesByChainAndOperator ¶
func (k Keeper) GetSharesByChainAndOperator(ctx sdk.Context, chainId uint64, operator string) []*types.OperatorShares
GetSharesByChainAndOperator gets all shares for a specific operator
func (*Keeper) GetStakeRegistryRouterAddress ¶
func (k *Keeper) GetStakeRegistryRouterAddress(ctx sdk.Context, key ethcommon.Address) (ethcommon.Address, error)
GetStakeRegistryRouterAddress retrieves the stake registry router address from the store
func (Keeper) IterateAllShares ¶
IterateAllShares iterates over all shares across all chains and operators
func (Keeper) MigrationStore ¶
MigrationStore is used to migrate GroupOperatorRegistrationList from v1.1 to v1.2 Mainly for the data of operator and group registration relationships in dvs, the old version had a bug that used uint64 data type to store BLS public key GPoint information The new version has changed to sdk.Int type
func (Keeper) ModifyPoolParams ¶
func (k Keeper) ModifyPoolParams(ctx sdk.Context, registryRouterAddress ethcommon.Address, groupNumber uint8, Indices, newMultipliers []*big.Int) error
ModifyPoolParams modifies the strategy params
func (Keeper) NewOperatorSharesStore ¶
func (k Keeper) NewOperatorSharesStore(ctx sdk.Context) OperatorSharesStore
NewOperatorSharesStore creates a new OperatorSharesStore
func (Keeper) ProcessEpochs ¶
ProcessEpochs processes the epochs
func (Keeper) QueryDVSGroupDataList ¶
func (k Keeper) QueryDVSGroupDataList(ctx context.Context, req *types.QueryDVSGroupDataListRequest) (*types.QueryDVSGroupDataListResponse, error)
QueryDVSGroupDataList returns the group data list
func (Keeper) QueryDVSGroupOperatorRegistrationList ¶
func (k Keeper) QueryDVSGroupOperatorRegistrationList(ctx context.Context, req *types.QueryDVSGroupOperatorRegistrationListRequest) (*types.QueryDVSGroupOperatorRegistrationListResponse, error)
QueryDVSGroupOperatorRegistrationList returns the group operator registration list
func (Keeper) QueryDVSGroupSyncStatus ¶
func (k Keeper) QueryDVSGroupSyncStatus(ctx context.Context, req *types.QueryDVSGroupSyncStatusRequest) (*types.QueryDVSGroupSyncStatusResponse, error)
QueryDVSGroupSyncStatus returns the group data sync status
func (Keeper) QueryDVSRegistryRouterList ¶
func (k Keeper) QueryDVSRegistryRouterList(ctx context.Context, req *types.QueryDVSRegistryRouterListRequest) (*types.QueryDVSRegistryRouterListResponse, error)
QueryDVSRegistryRouterList queries all registry router addresses and their stake addresses.
func (Keeper) QueryDVSSupportedChainList ¶
func (k Keeper) QueryDVSSupportedChainList(ctx context.Context, req *types.QueryDVSSupportedChainListRequest) (*types.QueryDVSSupportedChainListResponse, error)
QueryDVSSupportedChainList returns the supported chain list
func (Keeper) QueryDVSSupportedChainStatus ¶
func (k Keeper) QueryDVSSupportedChainStatus(ctx context.Context, req *types.QueryDVSSupportedChainStatusRequest) (*types.QueryDVSSupportedChainStatusResponse, error)
QueryDVSSupportedChainStatus returns the supported chain state by chain id
func (*Keeper) RemoveGroupOperatorRegistration ¶
func (k *Keeper) RemoveGroupOperatorRegistration(ctx sdk.Context, registryRouterAddr, operatorAddr ethcommon.Address) error
RemoveGroupOperatorRegistration removes a group operator registration from the list for the given registry router address
func (*Keeper) RemoveGroupOperatorRegistrationByIds ¶
func (k *Keeper) RemoveGroupOperatorRegistrationByIds(ctx sdk.Context, registryRouterAddr ethcommon.Address, operatorIds [][][32]byte) error
RemoveGroupOperatorRegistrationByIds removes a group operator registration from the list for the given registry router address
func (Keeper) RemoveOperator ¶
RemoveOperator removes an operator from the store
func (Keeper) RemovePools ¶
func (Keeper) SetBlocksPerEpoch ¶
SetBlocksPerEpoch set blocks per epoch
func (Keeper) SetChangedOperatorSharesSnapshot ¶
func (k Keeper) SetChangedOperatorSharesSnapshot(ctx sdk.Context, epochNumber uint64, sharesChange []*types.OperatorShares)
set operator shares changed snapshot
func (Keeper) SetDVSSupportedChainStatus ¶
func (k Keeper) SetDVSSupportedChainStatus(ctx sdk.Context, registryRouterAddress ethcommon.Address, chainId uint64, status types.OutboundStatus) error
SetDVSSupportedChainStatus sets the outbound status for a given registry router address and chain id
func (Keeper) SetEpochNumber ¶
SetEpochNumber sets the epoch number
func (Keeper) SetEpochOperatorSharesSyncTxs ¶
func (k Keeper) SetEpochOperatorSharesSyncTxs(ctx sdk.Context, chainId uint64, epochNumber uint64, xmsgIndexes []string)
set epoch operator shares sync txs
func (Keeper) SetGroupEjectionParams ¶
func (k Keeper) SetGroupEjectionParams(ctx sdk.Context, registryRouterAddress ethcommon.Address, groupNumber uint8, ejectionParams types.GroupEjectionParam) error
SetGroupEjectionParams sets the group ejection params
func (Keeper) SetOperator ¶
SetOperator sets an operator in the store
func (Keeper) SetOperatorSetParams ¶
func (k Keeper) SetOperatorSetParams(ctx sdk.Context, registryRouterAddress ethcommon.Address, groupNumber uint8, setParam types.OperatorSetParam) error
SetOperatorSetParams sets the operator set params
func (Keeper) SetOperatorShares ¶
func (k Keeper) SetOperatorShares(ctx sdk.Context, chainId uint64, operator, strategy string, shares sdkmath.Int)
SetOperatorShares stores operator shares
func (Keeper) SetOutboundState ¶
SetOutboundState stores the outbound state of cross-chain messages in the state store. This function serializes the OutboundState object and stores it in the state database. The storage uses chainId as the key and organizes data in a prefix store format to ensure isolation between different types of data.
func (*Keeper) SetStakeRegistryRouterAddress ¶
func (Keeper) UpdateBlocksPerEpoch ¶
func (k Keeper) UpdateBlocksPerEpoch(goCtx context.Context, msg *restakingtypes.MsgUpdateBlocksPerEpoch) (*restakingtypes.MsgUpdateBlocksPerEpochResponse, error)
func (Keeper) UpsertOutboundState ¶
func (k Keeper) UpsertOutboundState(goctx context.Context, msg *restakingtypes.MsgUpsertOutboundState) (*restakingtypes.MsgUpsertOutboundStateResponse, error)
UpsertOutboundState upserts the outbound state
type MiddlewareEventHandler ¶
type MiddlewareEventHandler struct {
Keeper
// contains filtered or unexported fields
}
func NewMiddlewareEventHandler ¶
func NewMiddlewareEventHandler(keeper Keeper) *MiddlewareEventHandler
func (*MiddlewareEventHandler) GetContractAddress ¶
GetContractAddress gets the contract address
func (*MiddlewareEventHandler) HandleEvent ¶
func (h *MiddlewareEventHandler) HandleEvent(ctx sdk.Context, _ uint64, toAddress ethcommon.Address, logs []*ethtypes.Log, txOrigin string) ([]*xmsgtypes.CrossChainFee, error)
HandleEvent handles the event from the log
func (*MiddlewareEventHandler) ParseEvent ¶
func (h *MiddlewareEventHandler) ParseEvent(contractAddr ethcommon.Address, log *ethtypes.Log) (interface{}, error)
ParseEvent parses the event
func (*MiddlewareEventHandler) RegisterAllEventSubscriber ¶
func (h *MiddlewareEventHandler) RegisterAllEventSubscriber()
type MiddlewareSyncHandler ¶
type MiddlewareSyncHandler struct {
Keeper
}
func NewMiddlewareHistoryEventHandler ¶
func NewMiddlewareHistoryEventHandler(keeper Keeper) *MiddlewareSyncHandler
func (*MiddlewareSyncHandler) SyncHistoryEvent ¶
func (h *MiddlewareSyncHandler) SyncHistoryEvent(ctx sdk.Context, event *registryrouter.RegistryRouterSyncGroup) (*sdkmath.Int, error)
SyncHistoryEvent syncs the history event for a given registry router address and chain id
type OperatorHandler ¶
type OperatorHandler struct {
Keeper
}
func (OperatorHandler) GetContractAddress ¶
GetContractAddress returns the contract address
func (OperatorHandler) HandleEvent ¶
func (OperatorHandler) ParseEvent ¶
func (h OperatorHandler) ParseEvent(contractAddr ethcommon.Address, log *ethtypes.Log) (interface{}, error)
ParseEvent parses the event from the log
type OperatorSharesStore ¶
type OperatorSharesStore struct {
// contains filtered or unexported fields
}
OperatorSharesStore manages nested prefix stores for operator shares
func (OperatorSharesStore) ChainStore ¶
func (s OperatorSharesStore) ChainStore(chainId uint64) prefix.Store
ChainStore returns a store for a specific chain ID
func (OperatorSharesStore) OperatorStore ¶
func (s OperatorSharesStore) OperatorStore(chainId uint64, operator string) prefix.Store
OperatorStore returns a store for a specific operator within a chain
func (OperatorSharesStore) Store ¶
func (s OperatorSharesStore) Store() prefix.Store
Store returns the base store for operator shares
type RegistryRouterEventSubscriber ¶
type RegistryRouterEventSubscriber struct {
Keeper
}
func NewRegistryRouterEventSubscriber ¶
func NewRegistryRouterEventSubscriber(keeper Keeper) *RegistryRouterEventSubscriber
type RegistryRouterFactoryEventSubscriber ¶
type RegistryRouterFactoryEventSubscriber struct {
Keeper
}
func NewRegistryRouterFactoryEventSubscriber ¶
func NewRegistryRouterFactoryEventSubscriber(keeper Keeper) *RegistryRouterFactoryEventSubscriber
Source Files
¶
- delegation_handler.go
- delegation_state_sync.go
- evm_hook.go
- grpc_query.go
- grpc_query_epoch_info.go
- grpc_query_epoch_snapshots.go
- grpc_query_mdw_group_data_list.go
- grpc_query_mdw_group_operator_registration_list.go
- grpc_query_mdw_group_sync_status.go
- grpc_query_mdw_registry_router_list.go
- grpc_query_mdw_supported_chain_list.go
- grpc_query_mdw_supported_chain_status.go
- grpc_query_outbound_state.go
- init.go
- internal_event_hook.go
- keeper.go
- mdw_handler_registry_router.go
- mdw_handler_registry_router_sync.go
- mdw_helper.go
- mdw_registry_router_event_encode.go
- mdw_registry_router_event_process.go
- mdw_registry_router_event_store.go
- mdw_registry_router_event_sync.go
- mdw_subscriber_registry_router.go
- mdw_subscriber_registry_router_factory.go
- migrator.go
- msg_server.go
- msg_server_update_epochs_per_block.go
- msg_server_upsert_outboud_state.go
- operator_handler.go
- outbound_result_hook.go
- process_epochs.go
- store_delegation_txs.go
- store_epochs.go
- store_mdw_group_data.go
- store_mdw_group_sync.go
- store_mdw_operator_registration.go
- store_mdw_registry_router.go
- store_mdw_supported_chain.go
- store_operator_shares.go
- store_operators.go
- store_outbound_state.go