Documentation
¶
Index ¶
- Constants
- Variables
- func MockChainParams(chainID int64, confirmation uint64) relayertypes.ChainParams
- func MockDelegationManager(chainID int64) *delegationmanager.DelegationManager
- func MockPellConnector(chainID int64) *pellconnector.PellConnector
- func MockStrategyManager(chainID int64) *strategymanager.StrategyManager
- func NewKeyring() ckeys.Keyring
- type BTCSigner
- type EVMClient
- func (s *EVMClient) GetChainParams() relayertypes.ChainParams
- func (s *EVMClient) IsOutboundProcessed(_ context.Context, _ *xmsgtypes.Xmsg, _ zerolog.Logger) (bool, bool, error)
- func (s *EVMClient) OutboundID(_ uint64) string
- func (s *EVMClient) SetChainParams(chainParams relayertypes.ChainParams)
- func (s *EVMClient) Start(ctx context.Context)
- func (s *EVMClient) Stop()
- func (s *EVMClient) WatchIntxTracker(_ context.Context) error
- type EVMSigner
- type Keyring
- func (m Keyring) Backend() string
- func (m Keyring) Delete(_ string) error
- func (m Keyring) DeleteByAddress(_ sdk.Address) error
- func (m Keyring) ExportPrivKeyArmor(_, _ string) (armor string, err error)
- func (m Keyring) ExportPrivKeyArmorByAddress(_ sdk.Address, _ string) (armor string, err error)
- func (m Keyring) ExportPubKeyArmor(_ string) (string, error)
- func (m Keyring) ExportPubKeyArmorByAddress(_ sdk.Address) (string, error)
- func (m Keyring) ImportPrivKey(_, _, _ string) error
- func (m Keyring) ImportPrivKeyHex(uid, privKey, algoStr string) error
- func (m Keyring) ImportPubKey(_ string, _ string) error
- func (m Keyring) Key(_ string) (*ckeys.Record, error)
- func (m Keyring) KeyByAddress(_ sdk.Address) (*ckeys.Record, error)
- func (m Keyring) List() ([]*ckeys.Record, error)
- func (m Keyring) MigrateAll() ([]*ckeys.Record, error)
- func (m Keyring) NewAccount(_, _, _, _ string, _ ckeys.SignatureAlgo) (*ckeys.Record, error)
- func (m Keyring) NewMnemonic(_ string, _ ckeys.Language, _, _ string, _ ckeys.SignatureAlgo) (*ckeys.Record, string, error)
- func (m Keyring) Rename(_ string, _ string) error
- func (m Keyring) SaveLedgerKey(_ string, _ ckeys.SignatureAlgo, _ string, _, _, _ uint32) (*ckeys.Record, error)
- func (m Keyring) SaveMultisig(_ string, _ cryptotypes.PubKey) (*ckeys.Record, error)
- func (m Keyring) SaveOfflineKey(_ string, _ cryptotypes.PubKey) (*ckeys.Record, error)
- func (m Keyring) Sign(_ string, _ []byte, _ signing.SignMode) ([]byte, cryptotypes.PubKey, error)
- func (m Keyring) SignByAddress(_ sdk.Address, _ []byte, _ signing.SignMode) ([]byte, cryptotypes.PubKey, error)
- func (m Keyring) SupportedAlgorithms() (ckeys.SigningAlgoList, ckeys.SigningAlgoList)
- type MockBTCRPCClient
- func (c *MockBTCRPCClient) CreateWallet(_ string, _ ...rpcclient.CreateWalletOpt) (*btcjson.CreateWalletResult, error)
- func (c *MockBTCRPCClient) EstimateSmartFee(_ int64, _ *btcjson.EstimateSmartFeeMode) (*btcjson.EstimateSmartFeeResult, error)
- func (c *MockBTCRPCClient) GenerateToAddress(_ int64, _ btcutil.Address, _ *int64) ([]*chainhash.Hash, error)
- func (c *MockBTCRPCClient) GetBalance(_ string) (btcutil.Amount, error)
- func (c *MockBTCRPCClient) GetBlockCount() (int64, error)
- func (c *MockBTCRPCClient) GetBlockHash(_ int64) (*chainhash.Hash, error)
- func (c *MockBTCRPCClient) GetBlockHeader(_ *chainhash.Hash) (*wire.BlockHeader, error)
- func (c *MockBTCRPCClient) GetBlockVerbose(_ *chainhash.Hash) (*btcjson.GetBlockVerboseResult, error)
- func (c *MockBTCRPCClient) GetBlockVerboseTx(_ *chainhash.Hash) (*btcjson.GetBlockVerboseTxResult, error)
- func (c *MockBTCRPCClient) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error)
- func (c *MockBTCRPCClient) GetNewAddress(_ string) (btcutil.Address, error)
- func (c *MockBTCRPCClient) GetRawTransaction(_ *chainhash.Hash) (*btcutil.Tx, error)
- func (c *MockBTCRPCClient) GetRawTransactionVerbose(_ *chainhash.Hash) (*btcjson.TxRawResult, error)
- func (c *MockBTCRPCClient) GetTransaction(_ *chainhash.Hash) (*btcjson.GetTransactionResult, error)
- func (c *MockBTCRPCClient) ListUnspent() ([]btcjson.ListUnspentResult, error)
- func (c *MockBTCRPCClient) ListUnspentMinMaxAddresses(_ int, _ int, _ []btcutil.Address) ([]btcjson.ListUnspentResult, error)
- func (c *MockBTCRPCClient) Reset() *MockBTCRPCClient
- func (c *MockBTCRPCClient) SendRawTransaction(_ *wire.MsgTx, _ bool) (*chainhash.Hash, error)
- func (c *MockBTCRPCClient) WithRawTransaction(tx *btcutil.Tx) *MockBTCRPCClient
- func (c *MockBTCRPCClient) WithRawTransactions(txs []*btcutil.Tx) *MockBTCRPCClient
- type MockEvmClient
- func (e *MockEvmClient) BalanceAt(ctx context.Context, account ethcommon.Address, blockNumber *big.Int) (*big.Int, error)
- func (e *MockEvmClient) BlockByNumber(_ context.Context, _ *big.Int) (*ethtypes.Block, error)
- func (e *MockEvmClient) BlockNumber(_ context.Context) (uint64, error)
- func (e *MockEvmClient) CallContract(_ context.Context, _ ethereum.CallMsg, _ *big.Int) ([]byte, error)
- func (e *MockEvmClient) CodeAt(_ context.Context, _ ethcommon.Address, _ *big.Int) ([]byte, error)
- func (e *MockEvmClient) EstimateGas(_ context.Context, _ ethereum.CallMsg) (gas uint64, err error)
- func (e *MockEvmClient) FilterLogs(_ context.Context, _ ethereum.FilterQuery) ([]ethtypes.Log, error)
- func (e *MockEvmClient) HeaderByNumber(_ context.Context, _ *big.Int) (*ethtypes.Header, error)
- func (e *MockEvmClient) PendingCodeAt(_ context.Context, _ ethcommon.Address) ([]byte, error)
- func (e *MockEvmClient) PendingNonceAt(_ context.Context, _ ethcommon.Address) (uint64, error)
- func (e *MockEvmClient) Reset() *MockEvmClient
- func (e *MockEvmClient) SendTransaction(_ context.Context, _ *ethtypes.Transaction) error
- func (e *MockEvmClient) SubscribeFilterLogs(_ context.Context, _ ethereum.FilterQuery, _ chan<- ethtypes.Log) (ethereum.Subscription, error)
- func (e *MockEvmClient) SuggestGasPrice(_ context.Context) (*big.Int, error)
- func (e *MockEvmClient) SuggestGasTipCap(_ context.Context) (*big.Int, error)
- func (e *MockEvmClient) TransactionByHash(_ context.Context, _ ethcommon.Hash) (tx *ethtypes.Transaction, isPending bool, err error)
- func (e *MockEvmClient) TransactionReceipt(_ context.Context, _ ethcommon.Hash) (*ethtypes.Receipt, error)
- func (e *MockEvmClient) TransactionSender(_ context.Context, _ *ethtypes.Transaction, _ ethcommon.Hash, _ uint) (ethcommon.Address, error)
- func (e *MockEvmClient) WithBlockNumber(blockNumber uint64) *MockEvmClient
- func (e *MockEvmClient) WithError(err error) *MockEvmClient
- func (e *MockEvmClient) WithHeader(header *ethtypes.Header) *MockEvmClient
- func (e *MockEvmClient) WithReceipt(receipt *ethtypes.Receipt) *MockEvmClient
- func (e *MockEvmClient) WithReceipts(receipts []*ethtypes.Receipt) *MockEvmClient
- func (e *MockEvmClient) WithSuggestGasPrice(price *big.Int) *MockEvmClient
- func (e *MockEvmClient) WithSuggestGasTipCap(price *big.Int) *MockEvmClient
- type MockJSONRPCClient
- func (e *MockJSONRPCClient) EthGetBalance(address, block string) (big.Int, error)
- func (e *MockJSONRPCClient) EthGetBlockByNumber(_ int, _ bool) (*ethrpc.Block, error)
- func (e *MockJSONRPCClient) EthGetTransactionByHash(_ string) (*ethrpc.Transaction, error)
- func (e *MockJSONRPCClient) Reset() *MockJSONRPCClient
- func (e *MockJSONRPCClient) WithBlock(block *ethrpc.Block) *MockJSONRPCClient
- func (e *MockJSONRPCClient) WithBlocks(blocks []*ethrpc.Block) *MockJSONRPCClient
- func (e *MockJSONRPCClient) WithTransaction(tx *ethrpc.Transaction) *MockJSONRPCClient
- func (e *MockJSONRPCClient) WithTransactions(txs []*ethrpc.Transaction) *MockJSONRPCClient
- type MockPellCoreBridge
- func (z *MockPellCoreBridge) Chain() chains.Chain
- func (z *MockPellCoreBridge) GetAllOutTxTrackerByChain(ctx context.Context, _ int64, _ interfaces.Order) ([]xmsgtypes.OutTxTracker, error)
- func (z *MockPellCoreBridge) GetBTCTSSAddress(ctx context.Context, _ int64) (string, error)
- func (z *MockPellCoreBridge) GetBlockHeaderChainState(ctx context.Context, _ int64) (*lightclienttypes.QueryChainStateResponse, error)
- func (z *MockPellCoreBridge) GetBlockHeight(ctx context.Context) (int64, error)
- func (z *MockPellCoreBridge) GetChainIndex(ctx context.Context, chainId int64) (*xmsgtypes.ChainIndex, error)
- func (z *MockPellCoreBridge) GetCrosschainFlags(ctx context.Context) (relayertypes.CrosschainFlags, error)
- func (z *MockPellCoreBridge) GetGasRechargeOperationIndex(ctx context.Context, chainId int64) (*xmsgtypes.GasRechargeOperationIndex, error)
- func (z *MockPellCoreBridge) GetInboundTrackersForChain(ctx context.Context, _ int64) ([]xmsgtypes.InTxTracker, error)
- func (z *MockPellCoreBridge) GetKeyGen(ctx context.Context) (relayertypes.Keygen, error)
- func (z *MockPellCoreBridge) GetKeys() keyinterfaces.ObserverKeys
- func (z *MockPellCoreBridge) GetLastBlockHeightByChain(ctx context.Context, _ chains.Chain) (*xmsgtypes.LastBlockHeight, error)
- func (z *MockPellCoreBridge) GetLogger() *zerolog.Logger
- func (z *MockPellCoreBridge) GetObserverList(ctx context.Context) ([]string, error)
- func (z *MockPellCoreBridge) GetOutTxTracker(ctx context.Context, _ chains.Chain, _ uint64) (*xmsgtypes.OutTxTracker, error)
- func (z *MockPellCoreBridge) GetPellBlockHeight(ctx context.Context) (int64, error)
- func (z *MockPellCoreBridge) GetPellHotKeyBalance(ctx context.Context) (math.Int, error)
- func (z *MockPellCoreBridge) GetPellRechargeOperationIndex(ctx context.Context, chainId int64) (*xmsgtypes.PellRechargeOperationIndex, error)
- func (z *MockPellCoreBridge) GetPendingNoncesByChain(ctx context.Context, _ int64) (relayertypes.PendingNonces, error)
- func (z *MockPellCoreBridge) GetRateLimiterFlags(ctx context.Context) (xmsgtypes.RateLimiterFlags, error)
- func (z *MockPellCoreBridge) GetRateLimiterInput(ctx context.Context, window int64) (*xmsgtypes.QueryRateLimiterInputResponse, error)
- func (z *MockPellCoreBridge) GetXmsgByNonce(ctx context.Context, _ int64, _ uint64) (*xmsgtypes.Xmsg, error)
- func (z *MockPellCoreBridge) ListPendingXmsg(ctx context.Context, _ int64) ([]*xmsgtypes.Xmsg, uint64, error)
- func (z *MockPellCoreBridge) ListPendingXmsgWithinRatelimit(ctx context.Context) (*xmsgtypes.QueryListPendingXmsgWithinRateLimitResponse, error)
- func (z *MockPellCoreBridge) OnBeforeStop(callback func())
- func (z *MockPellCoreBridge) PostAddTxHashToOutTxTracker(ctx context.Context, _ int64, _ uint64, _ string, _ *proofs.Proof, _ string, ...) (string, error)
- func (z *MockPellCoreBridge) PostBlameData(ctx context.Context, _ *blame.Blame, _ int64, _ string) (string, error)
- func (z *MockPellCoreBridge) PostGasPrice(ctx context.Context, _ chains.Chain, _ uint64, _ string, _ uint64) (string, error)
- func (z *MockPellCoreBridge) PostVoteBlockHeader(ctx context.Context, _ int64, _ []byte, _ int64, _ proofs.HeaderData) (string, error)
- func (z *MockPellCoreBridge) PostVoteInboundBlock(ctx context.Context, gasLimit, retryLimit uint64, ...) ([]string, []string, error)
- func (z *MockPellCoreBridge) PostVoteInboundEvents(ctx context.Context, _, _ uint64, _ []*xmsgtypes.MsgVoteOnObservedInboundTx) (string, string, error)
- func (z *MockPellCoreBridge) PostVoteOnGasRecharge(ctx context.Context, chain chains.Chain, voteIndex uint64) (string, error)
- func (z *MockPellCoreBridge) PostVoteOnPellRecharge(ctx context.Context, chain chains.Chain, voteIndex uint64) (string, error)
- func (z *MockPellCoreBridge) PostVoteOutbound(ctx context.Context, _ string, _ string, _ uint64, _ uint64, _ *big.Int, ...) (string, string, error)
- func (z *MockPellCoreBridge) Stop()
- type SDKClient
- func (c SDKClient) Block(_ context.Context, _ *int64) (*coretypes.ResultBlock, error)
- func (c SDKClient) BroadcastTxAsync(_ context.Context, _ tmtypes.Tx) (*coretypes.ResultBroadcastTx, error)
- func (c SDKClient) BroadcastTxCommit(_ context.Context, _ tmtypes.Tx) (*coretypes.ResultBroadcastTxCommit, error)
- func (c SDKClient) BroadcastTxSync(_ context.Context, _ tmtypes.Tx) (*coretypes.ResultBroadcastTx, error)
- func (c SDKClient) Tx(_ context.Context, _ []byte, _ bool) (*coretypes.ResultTx, error)
- type TSS
Constants ¶
const EVMRPCEnabled = "MockEVMRPCEnabled"
const ErrMsgPaused = "pell core bridge is paused"
Variables ¶
var TestKeyringPair cryptotypes.PrivKey
var TestPrivateKey *ecdsa.PrivateKey
Functions ¶
func MockChainParams ¶
func MockChainParams(chainID int64, confirmation uint64) relayertypes.ChainParams
func MockDelegationManager ¶
func MockDelegationManager(chainID int64) *delegationmanager.DelegationManager
func MockPellConnector ¶
func MockPellConnector(chainID int64) *pellconnector.PellConnector
func MockStrategyManager ¶
func MockStrategyManager(chainID int64) *strategymanager.StrategyManager
func NewKeyring ¶
Types ¶
type BTCSigner ¶
type BTCSigner struct {
}
BTCSigner is a mock of bitcoin chain signer for testing
func NewBTCSigner ¶
func NewBTCSigner() *BTCSigner
func (*BTCSigner) GetPellConnectorAddress ¶
func (*BTCSigner) SetPellConnectorAddress ¶
func (*BTCSigner) TryProcessOutTx ¶
func (s *BTCSigner) TryProcessOutTx( _ context.Context, _ *xmsgtypes.Xmsg, _ *outtxprocessor.Processor, _ string, _ interfaces.ChainClient, _ interfaces.PellCoreBridger, _ uint64, )
type EVMClient ¶
type EVMClient struct {
ChainParams relayertypes.ChainParams
}
EVMClient is a mock of evm chain client for testing
func NewEVMClient ¶
func NewEVMClient(chainParams *relayertypes.ChainParams) *EVMClient
func (*EVMClient) GetChainParams ¶
func (s *EVMClient) GetChainParams() relayertypes.ChainParams
func (*EVMClient) IsOutboundProcessed ¶
func (*EVMClient) OutboundID ¶
func (*EVMClient) SetChainParams ¶
func (s *EVMClient) SetChainParams(chainParams relayertypes.ChainParams)
type EVMSigner ¶
EVMSigner is a mock of evm chain signer for testing
func NewEVMSigner ¶
func (*EVMSigner) GetPellConnectorAddress ¶
func (*EVMSigner) SetPellConnectorAddress ¶
func (*EVMSigner) TryProcessOutTx ¶
func (s *EVMSigner) TryProcessOutTx( _ context.Context, _ *xmsgtypes.Xmsg, _ *outtxprocessor.Processor, _ string, _ interfaces.ChainClient, _ interfaces.PellCoreBridger, _ uint64, )
type Keyring ¶
type Keyring struct {
}
func (Keyring) ExportPrivKeyArmor ¶
func (Keyring) ExportPrivKeyArmorByAddress ¶
func (Keyring) ExportPubKeyArmorByAddress ¶
func (Keyring) ImportPrivKey ¶
func (Keyring) ImportPrivKeyHex ¶
func (Keyring) NewAccount ¶
func (Keyring) NewMnemonic ¶
func (Keyring) SaveLedgerKey ¶
func (Keyring) SaveMultisig ¶
func (Keyring) SaveOfflineKey ¶
func (Keyring) SignByAddress ¶
func (Keyring) SupportedAlgorithms ¶
func (m Keyring) SupportedAlgorithms() (ckeys.SigningAlgoList, ckeys.SigningAlgoList)
type MockBTCRPCClient ¶
MockBTCRPCClient is a mock implementation of the BTCRPCClient interface
func NewMockBTCRPCClient ¶
func NewMockBTCRPCClient() *MockBTCRPCClient
NewMockBTCRPCClient creates a new mock BTC RPC client
func (*MockBTCRPCClient) CreateWallet ¶
func (c *MockBTCRPCClient) CreateWallet(_ string, _ ...rpcclient.CreateWalletOpt) (*btcjson.CreateWalletResult, error)
func (*MockBTCRPCClient) EstimateSmartFee ¶
func (c *MockBTCRPCClient) EstimateSmartFee(_ int64, _ *btcjson.EstimateSmartFeeMode) (*btcjson.EstimateSmartFeeResult, error)
func (*MockBTCRPCClient) GenerateToAddress ¶
func (*MockBTCRPCClient) GetBalance ¶
func (c *MockBTCRPCClient) GetBalance(_ string) (btcutil.Amount, error)
func (*MockBTCRPCClient) GetBlockCount ¶
func (c *MockBTCRPCClient) GetBlockCount() (int64, error)
func (*MockBTCRPCClient) GetBlockHash ¶
func (c *MockBTCRPCClient) GetBlockHash(_ int64) (*chainhash.Hash, error)
func (*MockBTCRPCClient) GetBlockHeader ¶
func (c *MockBTCRPCClient) GetBlockHeader(_ *chainhash.Hash) (*wire.BlockHeader, error)
func (*MockBTCRPCClient) GetBlockVerbose ¶
func (c *MockBTCRPCClient) GetBlockVerbose(_ *chainhash.Hash) (*btcjson.GetBlockVerboseResult, error)
func (*MockBTCRPCClient) GetBlockVerboseTx ¶
func (c *MockBTCRPCClient) GetBlockVerboseTx(_ *chainhash.Hash) (*btcjson.GetBlockVerboseTxResult, error)
func (*MockBTCRPCClient) GetNetworkInfo ¶
func (c *MockBTCRPCClient) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error)
func (*MockBTCRPCClient) GetNewAddress ¶
func (c *MockBTCRPCClient) GetNewAddress(_ string) (btcutil.Address, error)
func (*MockBTCRPCClient) GetRawTransaction ¶
GetRawTransaction returns a pre-loaded transaction or nil
func (*MockBTCRPCClient) GetRawTransactionVerbose ¶
func (c *MockBTCRPCClient) GetRawTransactionVerbose(_ *chainhash.Hash) (*btcjson.TxRawResult, error)
func (*MockBTCRPCClient) GetTransaction ¶
func (c *MockBTCRPCClient) GetTransaction(_ *chainhash.Hash) (*btcjson.GetTransactionResult, error)
func (*MockBTCRPCClient) ListUnspent ¶
func (c *MockBTCRPCClient) ListUnspent() ([]btcjson.ListUnspentResult, error)
func (*MockBTCRPCClient) ListUnspentMinMaxAddresses ¶
func (c *MockBTCRPCClient) ListUnspentMinMaxAddresses(_ int, _ int, _ []btcutil.Address) ([]btcjson.ListUnspentResult, error)
func (*MockBTCRPCClient) Reset ¶
func (c *MockBTCRPCClient) Reset() *MockBTCRPCClient
Reset clears the mock data
func (*MockBTCRPCClient) SendRawTransaction ¶
func (*MockBTCRPCClient) WithRawTransaction ¶
func (c *MockBTCRPCClient) WithRawTransaction(tx *btcutil.Tx) *MockBTCRPCClient
func (*MockBTCRPCClient) WithRawTransactions ¶
func (c *MockBTCRPCClient) WithRawTransactions(txs []*btcutil.Tx) *MockBTCRPCClient
type MockEvmClient ¶
type MockEvmClient struct {
Receipts []*ethtypes.Receipt
// contains filtered or unexported fields
}
func NewMockEvmClient ¶
func NewMockEvmClient() *MockEvmClient
func (*MockEvmClient) BlockByNumber ¶
func (*MockEvmClient) BlockNumber ¶
func (e *MockEvmClient) BlockNumber(_ context.Context) (uint64, error)
func (*MockEvmClient) CallContract ¶
func (*MockEvmClient) EstimateGas ¶
func (*MockEvmClient) FilterLogs ¶
func (e *MockEvmClient) FilterLogs(_ context.Context, _ ethereum.FilterQuery) ([]ethtypes.Log, error)
func (*MockEvmClient) HeaderByNumber ¶
func (*MockEvmClient) PendingCodeAt ¶
func (*MockEvmClient) PendingNonceAt ¶
func (*MockEvmClient) Reset ¶
func (e *MockEvmClient) Reset() *MockEvmClient
func (*MockEvmClient) SendTransaction ¶
func (e *MockEvmClient) SendTransaction(_ context.Context, _ *ethtypes.Transaction) error
func (*MockEvmClient) SubscribeFilterLogs ¶
func (e *MockEvmClient) SubscribeFilterLogs(_ context.Context, _ ethereum.FilterQuery, _ chan<- ethtypes.Log) (ethereum.Subscription, error)
func (*MockEvmClient) SuggestGasPrice ¶
func (*MockEvmClient) SuggestGasTipCap ¶
func (*MockEvmClient) TransactionByHash ¶
func (e *MockEvmClient) TransactionByHash(_ context.Context, _ ethcommon.Hash) (tx *ethtypes.Transaction, isPending bool, err error)
func (*MockEvmClient) TransactionReceipt ¶
func (*MockEvmClient) TransactionSender ¶
func (*MockEvmClient) WithBlockNumber ¶
func (e *MockEvmClient) WithBlockNumber(blockNumber uint64) *MockEvmClient
func (*MockEvmClient) WithError ¶
func (e *MockEvmClient) WithError(err error) *MockEvmClient
func (*MockEvmClient) WithHeader ¶
func (e *MockEvmClient) WithHeader(header *ethtypes.Header) *MockEvmClient
func (*MockEvmClient) WithReceipt ¶
func (e *MockEvmClient) WithReceipt(receipt *ethtypes.Receipt) *MockEvmClient
---------------------------------------------------------------------------- Feed data to the mock evm client for testing ----------------------------------------------------------------------------
func (*MockEvmClient) WithReceipts ¶
func (e *MockEvmClient) WithReceipts(receipts []*ethtypes.Receipt) *MockEvmClient
func (*MockEvmClient) WithSuggestGasPrice ¶
func (e *MockEvmClient) WithSuggestGasPrice(price *big.Int) *MockEvmClient
func (*MockEvmClient) WithSuggestGasTipCap ¶
func (e *MockEvmClient) WithSuggestGasTipCap(price *big.Int) *MockEvmClient
type MockJSONRPCClient ¶
type MockJSONRPCClient struct {
Blocks []*ethrpc.Block
Transactions []*ethrpc.Transaction
}
MockJSONRPCClient is a mock implementation of the EVMJSONRPCClient interface
func NewMockJSONRPCClient ¶
func NewMockJSONRPCClient() *MockJSONRPCClient
NewMockJSONRPCClient creates a new mock JSON RPC client
func (*MockJSONRPCClient) EthGetBalance ¶
func (e *MockJSONRPCClient) EthGetBalance(address, block string) (big.Int, error)
func (*MockJSONRPCClient) EthGetBlockByNumber ¶
EthGetBlockByNumber returns a pre-loaded block or nil
func (*MockJSONRPCClient) EthGetTransactionByHash ¶
func (e *MockJSONRPCClient) EthGetTransactionByHash(_ string) (*ethrpc.Transaction, error)
EthGetTransactionByHash returns a pre-loaded transaction or nil
func (*MockJSONRPCClient) Reset ¶
func (e *MockJSONRPCClient) Reset() *MockJSONRPCClient
Reset clears the mock data
func (*MockJSONRPCClient) WithBlock ¶
func (e *MockJSONRPCClient) WithBlock(block *ethrpc.Block) *MockJSONRPCClient
---------------------------------------------------------------------------- Feed data to the mock JSON RPC client for testing ----------------------------------------------------------------------------
func (*MockJSONRPCClient) WithBlocks ¶
func (e *MockJSONRPCClient) WithBlocks(blocks []*ethrpc.Block) *MockJSONRPCClient
func (*MockJSONRPCClient) WithTransaction ¶
func (e *MockJSONRPCClient) WithTransaction(tx *ethrpc.Transaction) *MockJSONRPCClient
func (*MockJSONRPCClient) WithTransactions ¶
func (e *MockJSONRPCClient) WithTransactions(txs []*ethrpc.Transaction) *MockJSONRPCClient
type MockPellCoreBridge ¶
type MockPellCoreBridge struct {
// contains filtered or unexported fields
}
func NewMockPellCoreBridge ¶
func NewMockPellCoreBridge() *MockPellCoreBridge
func (*MockPellCoreBridge) Chain ¶
func (z *MockPellCoreBridge) Chain() chains.Chain
func (*MockPellCoreBridge) GetAllOutTxTrackerByChain ¶
func (z *MockPellCoreBridge) GetAllOutTxTrackerByChain(ctx context.Context, _ int64, _ interfaces.Order) ([]xmsgtypes.OutTxTracker, error)
func (*MockPellCoreBridge) GetBTCTSSAddress ¶
func (*MockPellCoreBridge) GetBlockHeaderChainState ¶
func (z *MockPellCoreBridge) GetBlockHeaderChainState(ctx context.Context, _ int64) (*lightclienttypes.QueryChainStateResponse, error)
func (*MockPellCoreBridge) GetBlockHeight ¶
func (z *MockPellCoreBridge) GetBlockHeight(ctx context.Context) (int64, error)
func (*MockPellCoreBridge) GetChainIndex ¶
func (z *MockPellCoreBridge) GetChainIndex(ctx context.Context, chainId int64) (*xmsgtypes.ChainIndex, error)
func (*MockPellCoreBridge) GetCrosschainFlags ¶
func (z *MockPellCoreBridge) GetCrosschainFlags(ctx context.Context) (relayertypes.CrosschainFlags, error)
func (*MockPellCoreBridge) GetGasRechargeOperationIndex ¶
func (z *MockPellCoreBridge) GetGasRechargeOperationIndex(ctx context.Context, chainId int64) (*xmsgtypes.GasRechargeOperationIndex, error)
func (*MockPellCoreBridge) GetInboundTrackersForChain ¶
func (z *MockPellCoreBridge) GetInboundTrackersForChain(ctx context.Context, _ int64) ([]xmsgtypes.InTxTracker, error)
func (*MockPellCoreBridge) GetKeyGen ¶
func (z *MockPellCoreBridge) GetKeyGen(ctx context.Context) (relayertypes.Keygen, error)
func (*MockPellCoreBridge) GetKeys ¶
func (z *MockPellCoreBridge) GetKeys() keyinterfaces.ObserverKeys
func (*MockPellCoreBridge) GetLastBlockHeightByChain ¶
func (z *MockPellCoreBridge) GetLastBlockHeightByChain(ctx context.Context, _ chains.Chain) (*xmsgtypes.LastBlockHeight, error)
func (*MockPellCoreBridge) GetLogger ¶
func (z *MockPellCoreBridge) GetLogger() *zerolog.Logger
func (*MockPellCoreBridge) GetObserverList ¶
func (z *MockPellCoreBridge) GetObserverList(ctx context.Context) ([]string, error)
func (*MockPellCoreBridge) GetOutTxTracker ¶
func (z *MockPellCoreBridge) GetOutTxTracker(ctx context.Context, _ chains.Chain, _ uint64) (*xmsgtypes.OutTxTracker, error)
func (*MockPellCoreBridge) GetPellBlockHeight ¶
func (z *MockPellCoreBridge) GetPellBlockHeight(ctx context.Context) (int64, error)
func (*MockPellCoreBridge) GetPellHotKeyBalance ¶
func (*MockPellCoreBridge) GetPellRechargeOperationIndex ¶
func (z *MockPellCoreBridge) GetPellRechargeOperationIndex(ctx context.Context, chainId int64) (*xmsgtypes.PellRechargeOperationIndex, error)
func (*MockPellCoreBridge) GetPendingNoncesByChain ¶
func (z *MockPellCoreBridge) GetPendingNoncesByChain(ctx context.Context, _ int64) (relayertypes.PendingNonces, error)
func (*MockPellCoreBridge) GetRateLimiterFlags ¶
func (z *MockPellCoreBridge) GetRateLimiterFlags(ctx context.Context) (xmsgtypes.RateLimiterFlags, error)
func (*MockPellCoreBridge) GetRateLimiterInput ¶
func (z *MockPellCoreBridge) GetRateLimiterInput(ctx context.Context, window int64) (*xmsgtypes.QueryRateLimiterInputResponse, error)
func (*MockPellCoreBridge) GetXmsgByNonce ¶
func (*MockPellCoreBridge) ListPendingXmsg ¶
func (*MockPellCoreBridge) ListPendingXmsgWithinRatelimit ¶
func (z *MockPellCoreBridge) ListPendingXmsgWithinRatelimit(ctx context.Context) (*xmsgtypes.QueryListPendingXmsgWithinRateLimitResponse, error)
func (*MockPellCoreBridge) OnBeforeStop ¶
func (z *MockPellCoreBridge) OnBeforeStop(callback func())
func (*MockPellCoreBridge) PostAddTxHashToOutTxTracker ¶
func (*MockPellCoreBridge) PostBlameData ¶
func (*MockPellCoreBridge) PostGasPrice ¶
func (*MockPellCoreBridge) PostVoteBlockHeader ¶
func (z *MockPellCoreBridge) PostVoteBlockHeader(ctx context.Context, _ int64, _ []byte, _ int64, _ proofs.HeaderData) (string, error)
func (*MockPellCoreBridge) PostVoteInboundBlock ¶
func (z *MockPellCoreBridge) PostVoteInboundBlock( ctx context.Context, gasLimit, retryLimit uint64, block *xmsgtypes.MsgVoteInboundBlock, events []*xmsgtypes.MsgVoteOnObservedInboundTx, ) ([]string, []string, error)
func (*MockPellCoreBridge) PostVoteInboundEvents ¶
func (z *MockPellCoreBridge) PostVoteInboundEvents(ctx context.Context, _, _ uint64, _ []*xmsgtypes.MsgVoteOnObservedInboundTx) (string, string, error)
func (*MockPellCoreBridge) PostVoteOnGasRecharge ¶
func (*MockPellCoreBridge) PostVoteOnPellRecharge ¶
func (*MockPellCoreBridge) PostVoteOutbound ¶
func (*MockPellCoreBridge) Stop ¶
func (z *MockPellCoreBridge) Stop()
type SDKClient ¶
func NewSDKClientWithErr ¶
func (SDKClient) BroadcastTxAsync ¶
func (SDKClient) BroadcastTxCommit ¶
func (SDKClient) BroadcastTxSync ¶
type TSS ¶
type TSS struct {
// contains filtered or unexported fields
}
TSS is a mock of TSS signer for testing
func NewTSSIgnite3 ¶
func NewTSSIgnite3() *TSS
func NewTSSMainnet ¶
func NewTSSMainnet() *TSS