Documentation ¶
Index ¶
- Variables
- type Blocker
- type Bridge
- func (b *Bridge) FilterMessageProcessed(opts *bind.FilterOpts, msgHash [][32]byte) (*bridge.BridgeMessageProcessedIterator, error)
- func (b *Bridge) FilterMessageSent(opts *bind.FilterOpts, signal [][32]byte) (*bridge.BridgeMessageSentIterator, error)
- func (b *Bridge) FilterMessageStatusChanged(opts *bind.FilterOpts, signal [][32]byte) (*bridge.BridgeMessageStatusChangedIterator, error)
- func (b *Bridge) IsMessageReceived(opts *bind.CallOpts, _message bridge.IBridgeMessage, _proof []byte) (bool, error)
- func (b *Bridge) IsMessageSent(opts *bind.CallOpts, _message bridge.IBridgeMessage) (bool, error)
- func (b *Bridge) MessageStatus(opts *bind.CallOpts, msgHash [32]byte) (uint8, error)
- func (b *Bridge) ParseMessageSent(log types.Log) (*bridge.BridgeMessageSent, error)
- func (b *Bridge) Paused(opts *bind.CallOpts) (bool, error)
- func (b *Bridge) ProcessMessage(opts *bind.TransactOpts, _message bridge.IBridgeMessage, _proof []byte) (*types.Transaction, error)
- func (b *Bridge) SendMessage(opts *bind.TransactOpts, _message bridge.IBridgeMessage) (*types.Transaction, error)
- func (b *Bridge) SuspendMessages(opts *bind.TransactOpts, _msgHashes [][32]byte, _toSuspend bool) (*types.Transaction, error)
- type Caller
- type DB
- type EthClient
- func (c *EthClient) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
- func (c *EthClient) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (c *EthClient) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
- func (c *EthClient) BlockNumber(ctx context.Context) (uint64, error)
- func (c *EthClient) ChainID(ctx context.Context) (*big.Int, error)
- func (c *EthClient) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)
- func (c *EthClient) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)
- func (c *EthClient) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- func (c *EthClient) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
- func (c *EthClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
- func (c *EthClient) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error)
- func (c *EthClient) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- func (c *EthClient) SuggestGasTipCap(ctx context.Context) (*big.Int, error)
- func (c *EthClient) TransactionByHash(ctx context.Context, hash common.Hash) (*types.Transaction, bool, error)
- func (c *EthClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
- func (c *EthClient) TransactionSender(ctx context.Context, tx *types.Transaction, blockHash common.Hash, ...) (common.Address, error)
- type EventRepository
- func (r *EventRepository) ChainDataSyncedEventByBlockNumberOrGreater(ctx context.Context, srcChainId uint64, syncedChainId uint64, ...) (*relayer.Event, error)
- func (r *EventRepository) Close() error
- func (r *EventRepository) Delete(ctx context.Context, id int) error
- func (r *EventRepository) DeleteAllAfterBlockID(blockID uint64, srcChainID uint64, destChainID uint64) error
- func (r *EventRepository) FindAllByAddress(ctx context.Context, req *http.Request, opts relayer.FindAllByAddressOpts) (*paginate.Page, error)
- func (r *EventRepository) FindLatestBlockID(ctx context.Context, event string, srcChainID uint64, destChainID uint64) (uint64, error)
- func (r *EventRepository) FirstByEventAndMsgHash(ctx context.Context, event string, msgHash string) (*relayer.Event, error)
- func (r *EventRepository) FirstByMsgHash(ctx context.Context, msgHash string) (*relayer.Event, error)
- func (r *EventRepository) LatestChainDataSyncedEvent(ctx context.Context, srcChainId uint64, syncedChainId uint64) (uint64, error)
- func (r *EventRepository) Save(ctx context.Context, opts *relayer.SaveEventOpts) (*relayer.Event, error)
- func (r *EventRepository) UpdateFeesAndProfitability(ctx context.Context, id int, opts *relayer.UpdateFeesAndProfitabilityOpts) error
- func (r *EventRepository) UpdateStatus(ctx context.Context, id int, status relayer.EventStatus) error
- type Queue
- func (r *Queue) Ack(ctx context.Context, msg queue.Message) error
- func (r *Queue) Close(ctx context.Context)
- func (r *Queue) Nack(ctx context.Context, msg queue.Message, requeue bool) error
- func (r *Queue) Notify(ctx context.Context, wg *sync.WaitGroup) error
- func (r *Queue) Publish(ctx context.Context, queueName string, msg []byte, ...) error
- func (r *Queue) Start(ctx context.Context, queueName string) error
- func (r *Queue) Subscribe(ctx context.Context, msgChan chan<- queue.Message, wg *sync.WaitGroup) error
- type QuotaManager
- type SignalService
- func (s *SignalService) FilterChainDataSynced(opts *bind.FilterOpts, chainid []uint64, blockId []uint64, kind [][32]byte) (*signalservice.SignalServiceChainDataSyncedIterator, error)
- func (s *SignalService) GetSignalSlot(opts *bind.CallOpts, _chainId uint64, _app common.Address, _signal [32]byte) ([32]byte, error)
- func (s *SignalService) GetSyncedChainData(opts *bind.CallOpts, _chainId uint64, _kind [32]byte, _blockId uint64) (struct{ ... }, error)
- type Subscription
- type TokenVault
- type TxManager
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Header = &types.Header{ ParentHash: common.HexToHash("0x3a537c89809712367218bb171b3b1c46aa95df3dee7200ae9dc78f4052024068"), UncleHash: common.HexToHash("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"), Coinbase: common.HexToAddress("0x0000000000000000000000000000000000000000"), Root: common.HexToHash("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"), TxHash: common.HexToHash("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"), ReceiptHash: common.HexToHash("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"), Bloom: types.Bloom{}, Difficulty: new(big.Int).SetInt64(2), Number: new(big.Int).SetInt64(1), GasLimit: 100000, GasUsed: 2000, Time: 1234, Extra: []byte{0x7f}, MixDigest: common.HexToHash("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"), Nonce: types.BlockNonce{0x13}, } EmptyHeader = &types.Header{} )
View Source
var ( SuccessMsgHash = [32]byte{0x1} SuccessId = big.NewInt(1) FailSignal = [32]byte{0x2} )
View Source
var ( MockChainID = big.NewInt(167001) LatestBlockNumber = big.NewInt(10) NotFoundTxHash = common.HexToHash("0x123") SucceedTxHash = common.HexToHash("0x456") FailTxHash = common.HexToHash("0x789") BlockNum = 10 PendingNonce uint64 = 10 )
View Source
var ProcessMessageTx = types.NewTransaction( PendingNonce, common.HexToAddress(dummyAddress), big.NewInt(1), 100, big.NewInt(10), nil, )
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct { }
func (*Bridge) FilterMessageProcessed ¶
func (b *Bridge) FilterMessageProcessed( opts *bind.FilterOpts, msgHash [][32]byte, ) (*bridge.BridgeMessageProcessedIterator, error)
func (*Bridge) FilterMessageSent ¶
func (b *Bridge) FilterMessageSent( opts *bind.FilterOpts, signal [][32]byte, ) (*bridge.BridgeMessageSentIterator, error)
func (*Bridge) FilterMessageStatusChanged ¶
func (b *Bridge) FilterMessageStatusChanged( opts *bind.FilterOpts, signal [][32]byte, ) (*bridge.BridgeMessageStatusChangedIterator, error)
func (*Bridge) IsMessageReceived ¶
func (*Bridge) IsMessageSent ¶
func (*Bridge) MessageStatus ¶
func (*Bridge) ParseMessageSent ¶
func (*Bridge) ProcessMessage ¶
func (b *Bridge) ProcessMessage( opts *bind.TransactOpts, _message bridge.IBridgeMessage, _proof []byte, ) (*types.Transaction, error)
func (*Bridge) SendMessage ¶
func (b *Bridge) SendMessage(opts *bind.TransactOpts, _message bridge.IBridgeMessage) (*types.Transaction, error)
func (*Bridge) SuspendMessages ¶
func (b *Bridge) SuspendMessages( opts *bind.TransactOpts, _msgHashes [][32]byte, _toSuspend bool, ) (*types.Transaction, error)
type EthClient ¶
type EthClient struct { }
func (*EthClient) BlockByHash ¶
func (*EthClient) BlockByNumber ¶
func (*EthClient) BlockNumber ¶
func (*EthClient) EstimateGas ¶
func (*EthClient) HeaderByHash ¶
func (*EthClient) HeaderByNumber ¶
func (*EthClient) PendingNonceAt ¶
func (*EthClient) SubscribeNewHead ¶
func (*EthClient) SuggestGasPrice ¶
func (*EthClient) SuggestGasTipCap ¶
func (*EthClient) TransactionByHash ¶
func (*EthClient) TransactionReceipt ¶
type EventRepository ¶
type EventRepository struct {
// contains filtered or unexported fields
}
func NewEventRepository ¶
func NewEventRepository() *EventRepository
func (*EventRepository) ChainDataSyncedEventByBlockNumberOrGreater ¶
func (*EventRepository) Close ¶
func (r *EventRepository) Close() error
func (*EventRepository) Delete ¶
func (r *EventRepository) Delete( ctx context.Context, id int, ) error
func (*EventRepository) DeleteAllAfterBlockID ¶
func (r *EventRepository) DeleteAllAfterBlockID(blockID uint64, srcChainID uint64, destChainID uint64) error
DeleteAllAfterBlockID is used when a reorg is detected
func (*EventRepository) FindAllByAddress ¶
func (r *EventRepository) FindAllByAddress( ctx context.Context, req *http.Request, opts relayer.FindAllByAddressOpts, ) (*paginate.Page, error)
func (*EventRepository) FindLatestBlockID ¶
func (r *EventRepository) FindLatestBlockID( ctx context.Context, event string, srcChainID uint64, destChainID uint64, ) (uint64, error)
GetLatestBlockID get latest block id
func (*EventRepository) FirstByEventAndMsgHash ¶
func (*EventRepository) FirstByMsgHash ¶
func (*EventRepository) LatestChainDataSyncedEvent ¶
func (*EventRepository) Save ¶
func (r *EventRepository) Save(ctx context.Context, opts *relayer.SaveEventOpts) (*relayer.Event, error)
func (*EventRepository) UpdateFeesAndProfitability ¶
func (r *EventRepository) UpdateFeesAndProfitability( ctx context.Context, id int, opts *relayer.UpdateFeesAndProfitabilityOpts, ) error
func (*EventRepository) UpdateStatus ¶
func (r *EventRepository) UpdateStatus(ctx context.Context, id int, status relayer.EventStatus) error
type QuotaManager ¶
type QuotaManager struct { }
func (*QuotaManager) AvailableQuota ¶
func (*QuotaManager) QuotaPeriod ¶
type SignalService ¶
type SignalService struct { }
func (*SignalService) FilterChainDataSynced ¶
func (s *SignalService) FilterChainDataSynced( opts *bind.FilterOpts, chainid []uint64, blockId []uint64, kind [][32]byte, ) (*signalservice.SignalServiceChainDataSyncedIterator, error)
func (*SignalService) GetSignalSlot ¶
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func (*Subscription) Err ¶
func (s *Subscription) Err() <-chan error
func (*Subscription) Unsubscribe ¶
func (s *Subscription) Unsubscribe()
type TokenVault ¶
type TokenVault struct { }
type TxManager ¶
type TxManager struct { }
func (*TxManager) BlockNumber ¶
BlockNumber returns the most recent block number from the underlying network.
Click to show internal directories.
Click to hide internal directories.