Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) CalculateValidatorSetCheckpoint(ctx context.Context, powerThreshold uint64, validatorTimestamp uint64, ...) ([]byte, error)
- func (k Keeper) ClaimDeposit(ctx context.Context, depositId, reportIndex uint64, msgSender sdk.AccAddress) error
- func (k Keeper) CompareAndSetBridgeValidators(ctx context.Context) (bool, error)
- func (k Keeper) CreateNewReportSnapshots(ctx context.Context) error
- func (k Keeper) CreateSnapshot(ctx context.Context, queryId []byte, timestamp time.Time, ...) error
- func (k Keeper) CreateWithdrawalAggregate(goCtx context.Context, amount sdk.Coin, sender sdk.AccAddress, ...) (*oracletypes.Aggregate, error)
- func (k Keeper) DecodeDepositReportValue(ctx context.Context, reportValue string) (recipient sdk.AccAddress, amount, tip sdk.Coins, err error)
- func (k Keeper) EVMAddressFromSignatures(ctx context.Context, sigA, sigB []byte) (common.Address, error)
- func (k Keeper) EncodeAndHashValidatorSet(ctx context.Context, validatorSet *types.BridgeValidatorSet) (encodedBridgeValidatorSet, bridgeValidatorSetHash []byte, err error)
- func (k Keeper) EncodeOracleAttestationData(queryId []byte, value string, timestamp uint64, aggregatePower uint64, ...) ([]byte, error)
- func (k Keeper) GetAttestationRequestsByHeight(ctx context.Context, height uint64) (*types.AttestationRequests, error)
- func (k Keeper) GetBridgeValsetByTimestamp(ctx context.Context, timestamp uint64) (*types.BridgeValidatorSet, error)
- func (k Keeper) GetCurrentValidatorSetEVMCompatible(ctx context.Context) (*types.BridgeValidatorSet, error)
- func (k Keeper) GetCurrentValidatorSetTimestamp(ctx context.Context) (uint64, error)
- func (k Keeper) GetCurrentValidatorsEVMCompatible(ctx context.Context) ([]*types.BridgeValidator, error)
- func (k Keeper) GetDepositQueryId(depositId uint64) ([]byte, error)
- func (k Keeper) GetEVMAddressByOperator(ctx context.Context, operatorAddress string) ([]byte, error)
- func (k Keeper) GetLatestCheckpointIndex(ctx context.Context) (uint64, error)
- func (k Keeper) GetValidatorCheckpointFromStorage(ctx context.Context) (*types.ValidatorCheckpoint, error)
- func (k Keeper) GetValidatorCheckpointParamsFromStorage(ctx context.Context, timestamp uint64) (types.ValidatorCheckpointParams, error)
- func (k Keeper) GetValidatorDidSignCheckpoint(ctx context.Context, operatorAddr string, checkpointTimestamp uint64) (didSign bool, prevValsetIndex int64, err error)
- func (k Keeper) GetValidatorSetIndexByTimestamp(ctx context.Context, timestamp uint64) (uint64, error)
- func (k Keeper) GetValidatorSetSignaturesFromStorage(ctx context.Context, timestamp uint64) (*types.BridgeValsetSignatures, error)
- func (k Keeper) GetValidatorSetTimestampBefore(ctx context.Context, targetTimestamp uint64) (uint64, error)
- func (k Keeper) GetValidatorTimestampByIdxFromStorage(ctx context.Context, checkpointIdx uint64) (types.CheckpointTimestamp, error)
- func (k Keeper) GetWithdrawalQueryId(withdrawalId uint64) ([]byte, error)
- func (k Keeper) GetWithdrawalReportValue(amount sdk.Coin, sender sdk.AccAddress, recipient []byte) ([]byte, error)
- func (k Keeper) IncrementWithdrawalId(goCtx context.Context) (uint64, error)
- func (k Keeper) LastSavedValidatorSetStale(ctx context.Context) (bool, error)
- func (k Keeper) Logger(ctx context.Context) log.Logger
- func (k Keeper) PowerDiff(ctx context.Context, b, c types.BridgeValidatorSet) int64
- func (k Keeper) SetBridgeValidatorParams(ctx context.Context, bridgeValidatorSet *types.BridgeValidatorSet) error
- func (k Keeper) SetBridgeValsetSignature(ctx context.Context, operatorAddress string, timestamp uint64, ...) error
- func (k Keeper) SetEVMAddressByOperator(ctx context.Context, operatorAddr string, evmAddr []byte) error
- func (k Keeper) SetOracleAttestation(ctx context.Context, operatorAddress string, snapshot, sig []byte) error
- func (k Keeper) TryRecoverAddressWithBothIDs(sig, msgHash []byte) ([]common.Address, error)
- func (k Keeper) WithdrawTokens(ctx context.Context, amount sdk.Coin, sender sdk.AccAddress, recipient []byte) (uint64, error)
- type Querier
- func (q Querier) GetAttestationDataBySnapshot(goCtx context.Context, req *types.QueryGetAttestationDataBySnapshotRequest) (*types.QueryGetAttestationDataBySnapshotResponse, error)
- func (q Querier) GetAttestationsBySnapshot(ctx context.Context, req *types.QueryGetAttestationsBySnapshotRequest) (*types.QueryGetAttestationsBySnapshotResponse, error)
- func (q Querier) GetCurrentValidatorSetTimestamp(ctx context.Context, req *types.QueryGetCurrentValidatorSetTimestampRequest) (*types.QueryGetCurrentValidatorSetTimestampResponse, error)
- func (q Querier) GetEvmAddressByValidatorAddress(ctx context.Context, req *types.QueryGetEvmAddressByValidatorAddressRequest) (*types.QueryGetEvmAddressByValidatorAddressResponse, error)
- func (q Querier) GetEvmValidators(ctx context.Context, req *types.QueryGetEvmValidatorsRequest) (*types.QueryGetEvmValidatorsResponse, error)
- func (q Querier) GetSnapshotsByReport(ctx context.Context, req *types.QueryGetSnapshotsByReportRequest) (*types.QueryGetSnapshotsByReportResponse, error)
- func (q Querier) GetValidatorCheckpoint(ctx context.Context, req *types.QueryGetValidatorCheckpointRequest) (*types.QueryGetValidatorCheckpointResponse, error)
- func (q Querier) GetValidatorCheckpointParams(ctx context.Context, req *types.QueryGetValidatorCheckpointParamsRequest) (*types.QueryGetValidatorCheckpointParamsResponse, error)
- func (q Querier) GetValidatorSetIndexByTimestamp(ctx context.Context, req *types.QueryGetValidatorSetIndexByTimestampRequest) (*types.QueryGetValidatorSetIndexByTimestampResponse, error)
- func (q Querier) GetValidatorTimestampByIndex(ctx context.Context, req *types.QueryGetValidatorTimestampByIndexRequest) (*types.QueryGetValidatorTimestampByIndexResponse, error)
- func (q Querier) GetValsetByTimestamp(ctx context.Context, req *types.QueryGetValsetByTimestampRequest) (*types.QueryGetValsetByTimestampResponse, error)
- func (q Querier) GetValsetSigs(ctx context.Context, req *types.QueryGetValsetSigsRequest) (*types.QueryGetValsetSigsResponse, error)
- func (q Querier) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct { Schema collections.Schema Params collections.Item[types.Params] BridgeValset collections.Item[types.BridgeValidatorSet] ValidatorCheckpoint collections.Item[types.ValidatorCheckpoint] WithdrawalId collections.Item[types.WithdrawalId] OperatorToEVMAddressMap collections.Map[string, types.EVMAddress] BridgeValsetSignaturesMap collections.Map[uint64, types.BridgeValsetSignatures] ValidatorCheckpointParamsMap collections.Map[uint64, types.ValidatorCheckpointParams] ValidatorCheckpointIdxMap collections.Map[uint64, types.CheckpointTimestamp] LatestCheckpointIdx collections.Item[types.CheckpointIdx] BridgeValsetByTimestampMap collections.Map[uint64, types.BridgeValidatorSet] ValsetTimestampToIdxMap collections.Map[uint64, types.CheckpointIdx] AttestSnapshotsByReportMap collections.Map[[]byte, types.AttestationSnapshots] AttestSnapshotDataMap collections.Map[[]byte, types.AttestationSnapshotData] SnapshotToAttestationsMap collections.Map[[]byte, types.OracleAttestations] AttestRequestsByHeightMap collections.Map[uint64, types.AttestationRequests] DepositIdClaimedMap collections.Map[uint64, types.DepositClaimed] // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService storetypes.KVStoreService, stakingKeeper types.StakingKeeper, oracleKeeper types.OracleKeeper, bankKeeper types.BankKeeper, reporterKeeper types.ReporterKeeper, ) Keeper
func (Keeper) CalculateValidatorSetCheckpoint ¶
func (Keeper) ClaimDeposit ¶
func (Keeper) CompareAndSetBridgeValidators ¶
function for loading last saved bridge validator set and comparing it to current set
func (Keeper) CreateNewReportSnapshots ¶
func (Keeper) CreateSnapshot ¶
func (k Keeper) CreateSnapshot(ctx context.Context, queryId []byte, timestamp time.Time, isExternalRequest bool) error
Called with each new agg report and with new request for optimistic attestations
func (Keeper) CreateWithdrawalAggregate ¶
func (Keeper) DecodeDepositReportValue ¶
func (k Keeper) DecodeDepositReportValue(ctx context.Context, reportValue string) (recipient sdk.AccAddress, amount, tip sdk.Coins, err error)
replicate solidity decoding, abi.decode(reportValue, (address ethSender, string layerRecipient, uint256 amount, uint256 tip))
func (Keeper) EVMAddressFromSignatures ¶
func (Keeper) EncodeAndHashValidatorSet ¶
func (Keeper) EncodeOracleAttestationData ¶
func (Keeper) GetAttestationRequestsByHeight ¶
func (Keeper) GetBridgeValsetByTimestamp ¶
func (Keeper) GetCurrentValidatorSetEVMCompatible ¶
func (Keeper) GetCurrentValidatorSetTimestamp ¶
func (Keeper) GetCurrentValidatorsEVMCompatible ¶
func (Keeper) GetDepositQueryId ¶
replicate solidity encoding, keccak256(abi.encode(string "TRBBridge", abi.encode(bool true, uint256 depositId)))
func (Keeper) GetEVMAddressByOperator ¶
func (Keeper) GetLatestCheckpointIndex ¶
func (Keeper) GetValidatorCheckpointFromStorage ¶
func (Keeper) GetValidatorCheckpointParamsFromStorage ¶
func (Keeper) GetValidatorDidSignCheckpoint ¶
func (Keeper) GetValidatorSetIndexByTimestamp ¶
func (Keeper) GetValidatorSetSignaturesFromStorage ¶
func (Keeper) GetValidatorSetTimestampBefore ¶
func (Keeper) GetValidatorTimestampByIdxFromStorage ¶
func (Keeper) GetWithdrawalQueryId ¶
func (Keeper) GetWithdrawalReportValue ¶
func (Keeper) IncrementWithdrawalId ¶
func (Keeper) LastSavedValidatorSetStale ¶
check whether last saved validator set is too old (more than 2 weeks)
func (Keeper) SetBridgeValidatorParams ¶
func (Keeper) SetBridgeValsetSignature ¶
func (Keeper) SetEVMAddressByOperator ¶
func (Keeper) SetOracleAttestation ¶
func (Keeper) TryRecoverAddressWithBothIDs ¶
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
func NewQuerier ¶
func (Querier) GetAttestationDataBySnapshot ¶
func (q Querier) GetAttestationDataBySnapshot(goCtx context.Context, req *types.QueryGetAttestationDataBySnapshotRequest) (*types.QueryGetAttestationDataBySnapshotResponse, error)
func (Querier) GetAttestationsBySnapshot ¶
func (q Querier) GetAttestationsBySnapshot(ctx context.Context, req *types.QueryGetAttestationsBySnapshotRequest) (*types.QueryGetAttestationsBySnapshotResponse, error)
func (Querier) GetCurrentValidatorSetTimestamp ¶
func (q Querier) GetCurrentValidatorSetTimestamp(ctx context.Context, req *types.QueryGetCurrentValidatorSetTimestampRequest) (*types.QueryGetCurrentValidatorSetTimestampResponse, error)
func (Querier) GetEvmAddressByValidatorAddress ¶
func (q Querier) GetEvmAddressByValidatorAddress(ctx context.Context, req *types.QueryGetEvmAddressByValidatorAddressRequest) (*types.QueryGetEvmAddressByValidatorAddressResponse, error)
func (Querier) GetEvmValidators ¶
func (q Querier) GetEvmValidators(ctx context.Context, req *types.QueryGetEvmValidatorsRequest) (*types.QueryGetEvmValidatorsResponse, error)
func (Querier) GetSnapshotsByReport ¶
func (q Querier) GetSnapshotsByReport(ctx context.Context, req *types.QueryGetSnapshotsByReportRequest) (*types.QueryGetSnapshotsByReportResponse, error)
func (Querier) GetValidatorCheckpoint ¶
func (q Querier) GetValidatorCheckpoint(ctx context.Context, req *types.QueryGetValidatorCheckpointRequest) (*types.QueryGetValidatorCheckpointResponse, error)
func (Querier) GetValidatorCheckpointParams ¶
func (q Querier) GetValidatorCheckpointParams(ctx context.Context, req *types.QueryGetValidatorCheckpointParamsRequest) (*types.QueryGetValidatorCheckpointParamsResponse, error)
func (Querier) GetValidatorSetIndexByTimestamp ¶
func (q Querier) GetValidatorSetIndexByTimestamp(ctx context.Context, req *types.QueryGetValidatorSetIndexByTimestampRequest) (*types.QueryGetValidatorSetIndexByTimestampResponse, error)
func (Querier) GetValidatorTimestampByIndex ¶
func (q Querier) GetValidatorTimestampByIndex(ctx context.Context, req *types.QueryGetValidatorTimestampByIndexRequest) (*types.QueryGetValidatorTimestampByIndexResponse, error)
func (Querier) GetValsetByTimestamp ¶
func (q Querier) GetValsetByTimestamp(ctx context.Context, req *types.QueryGetValsetByTimestampRequest) (*types.QueryGetValsetByTimestampResponse, error)
func (Querier) GetValsetSigs ¶
func (q Querier) GetValsetSigs(ctx context.Context, req *types.QueryGetValsetSigsRequest) (*types.QueryGetValsetSigsResponse, error)
func (Querier) Params ¶
func (q Querier) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Source Files ¶
- claim_deposit.go
- keeper.go
- msg_server.go
- msg_server_claim_deposits.go
- msg_server_request_attestations.go
- msg_server_withdraw_tokens.go
- query.go
- query_get_attestation_data_by_snapshot.go
- query_get_attestations_by_snapshot.go
- query_get_current_validator_set_timestamp.go
- query_get_evm_address_by_validator_address.go
- query_get_evm_validators.go
- query_get_snapshots_by_report.go
- query_get_validator_checkpoint.go
- query_get_validator_checkpoint_params.go
- query_get_validator_set_index_by_timestamp.go
- query_get_validator_timestamp_by_index.go
- query_get_valset_by_timestamp.go
- query_get_valset_sigs.go
- query_params.go
- withdraw_tokens.go
Click to show internal directories.
Click to hide internal directories.