Versions in this module Expand all Collapse all v0 v0.0.11 Oct 27, 2022 Changes in this version + const BMCABI + const BlockFinalityConfirmations + const BlockHeightPollInterval + const BlockInterval + const DefaultGasLimit + const MonitorBlockMaxConcurrency + const RPCCallRetry + func HexToAddress(s string) common.Address + func NewReceiver(src, dst chain.BTPAddress, urls []string, rawOpts json.RawMessage, ...) (chain.Receiver, error) + func NewSender(src, dst chain.BTPAddress, urls []string, w wallet.Wallet, ...) (chain.Sender, error) + type Address string + func (a Address) Value() ([]byte, error) + type BMC struct + func NewBMC(address common.Address, backend bind.ContractBackend) (*BMC, error) + type BMCCaller struct + func NewBMCCaller(address common.Address, caller bind.ContractCaller) (*BMCCaller, error) + func (_BMC *BMCCaller) GetBmcBtpAddress(opts *bind.CallOpts) (string, error) + func (_BMC *BMCCaller) GetStatus(opts *bind.CallOpts, _link string) (TypesLinkStats, error) + func (_BMC *BMCCaller) TryDecodeBMCService(opts *bind.CallOpts, _msg []byte) (TypesBMCService, error) + func (_BMC *BMCCaller) TryDecodeBTPMessage(opts *bind.CallOpts, _rlp []byte) (TypesBMCMessage, error) + func (_BMC *BMCCaller) TryDecodeGatherFeeMessage(opts *bind.CallOpts, _msg []byte) (TypesGatherFeeMessage, error) + type BMCCallerRaw struct + Contract *BMCCaller + func (_BMC *BMCCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error + type BMCCallerSession struct + CallOpts bind.CallOpts + Contract *BMCCaller + func (_BMC *BMCCallerSession) GetBmcBtpAddress() (string, error) + func (_BMC *BMCCallerSession) GetStatus(_link string) (TypesLinkStats, error) + func (_BMC *BMCCallerSession) TryDecodeBMCService(_msg []byte) (TypesBMCService, error) + func (_BMC *BMCCallerSession) TryDecodeBTPMessage(_rlp []byte) (TypesBMCMessage, error) + func (_BMC *BMCCallerSession) TryDecodeGatherFeeMessage(_msg []byte) (TypesGatherFeeMessage, error) + type BMCErrorOnBTPError struct + Code *big.Int + ErrMsg string + Raw types.Log + Sn *big.Int + Svc string + SvcErrCode *big.Int + SvcErrMsg string + type BMCErrorOnBTPErrorIterator struct + Event *BMCErrorOnBTPError + func (it *BMCErrorOnBTPErrorIterator) Close() error + func (it *BMCErrorOnBTPErrorIterator) Error() error + func (it *BMCErrorOnBTPErrorIterator) Next() bool + type BMCFilterer struct + func NewBMCFilterer(address common.Address, filterer bind.ContractFilterer) (*BMCFilterer, error) + func (_BMC *BMCFilterer) FilterErrorOnBTPError(opts *bind.FilterOpts) (*BMCErrorOnBTPErrorIterator, error) + func (_BMC *BMCFilterer) FilterInitialized(opts *bind.FilterOpts) (*BMCInitializedIterator, error) + func (_BMC *BMCFilterer) FilterMessage(opts *bind.FilterOpts) (*BMCMessageIterator, error) + func (_BMC *BMCFilterer) ParseErrorOnBTPError(log types.Log) (*BMCErrorOnBTPError, error) + func (_BMC *BMCFilterer) ParseInitialized(log types.Log) (*BMCInitialized, error) + func (_BMC *BMCFilterer) ParseMessage(log types.Log) (*BMCMessage, error) + func (_BMC *BMCFilterer) WatchErrorOnBTPError(opts *bind.WatchOpts, sink chan<- *BMCErrorOnBTPError) (event.Subscription, error) + func (_BMC *BMCFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *BMCInitialized) (event.Subscription, error) + func (_BMC *BMCFilterer) WatchMessage(opts *bind.WatchOpts, sink chan<- *BMCMessage) (event.Subscription, error) + type BMCInitialized struct + Raw types.Log + Version uint8 + type BMCInitializedIterator struct + Event *BMCInitialized + func (it *BMCInitializedIterator) Close() error + func (it *BMCInitializedIterator) Error() error + func (it *BMCInitializedIterator) Next() bool + type BMCMessage struct + Msg []byte + Next string + Raw types.Log + Seq *big.Int + type BMCMessageIterator struct + Event *BMCMessage + func (it *BMCMessageIterator) Close() error + func (it *BMCMessageIterator) Error() error + func (it *BMCMessageIterator) Next() bool + type BMCRaw struct + Contract *BMC + func (_BMC *BMCRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error + func (_BMC *BMCRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) + func (_BMC *BMCRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) + type BMCRelayMethodParams struct + Messages string + Prev string + type BMCSession struct + CallOpts bind.CallOpts + Contract *BMC + TransactOpts bind.TransactOpts + func (_BMC *BMCSession) GetBmcBtpAddress() (string, error) + func (_BMC *BMCSession) GetStatus(_link string) (TypesLinkStats, error) + func (_BMC *BMCSession) HandleRelayMessage(_prev string, _msg []byte) (*types.Transaction, error) + func (_BMC *BMCSession) Initialize(_network string, _bmcManagementAddr common.Address) (*types.Transaction, error) + func (_BMC *BMCSession) SendMessage(_to string, _svc string, _sn *big.Int, _msg []byte) (*types.Transaction, error) + func (_BMC *BMCSession) TryDecodeBMCService(_msg []byte) (TypesBMCService, error) + func (_BMC *BMCSession) TryDecodeBTPMessage(_rlp []byte) (TypesBMCMessage, error) + func (_BMC *BMCSession) TryDecodeGatherFeeMessage(_msg []byte) (TypesGatherFeeMessage, error) + type BMCStatus struct + BMRIndex HexInt + BlockIntervalDst HexInt + BlockIntervalSrc HexInt + CurrentHeight HexInt + DelayLimit HexInt + MaxAggregation HexInt + RotateHeight HexInt + RotateTerm HexInt + RxHeight HexInt + RxHeightSrc HexInt + RxSeq HexInt + TxSeq HexInt + type BMCTransactor struct + func NewBMCTransactor(address common.Address, transactor bind.ContractTransactor) (*BMCTransactor, error) + func (_BMC *BMCTransactor) HandleRelayMessage(opts *bind.TransactOpts, _prev string, _msg []byte) (*types.Transaction, error) + func (_BMC *BMCTransactor) Initialize(opts *bind.TransactOpts, _network string, _bmcManagementAddr common.Address) (*types.Transaction, error) + func (_BMC *BMCTransactor) SendMessage(opts *bind.TransactOpts, _to string, _svc string, _sn *big.Int, _msg []byte) (*types.Transaction, error) + type BMCTransactorRaw struct + Contract *BMCTransactor + func (_BMC *BMCTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) + func (_BMC *BMCTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) + type BMCTransactorSession struct + Contract *BMCTransactor + TransactOpts bind.TransactOpts + func (_BMC *BMCTransactorSession) HandleRelayMessage(_prev string, _msg []byte) (*types.Transaction, error) + func (_BMC *BMCTransactorSession) Initialize(_network string, _bmcManagementAddr common.Address) (*types.Transaction, error) + func (_BMC *BMCTransactorSession) SendMessage(_to string, _svc string, _sn *big.Int, _msg []byte) (*types.Transaction, error) + type BlockNotification struct + HasBTPMessage *bool + Hash common.Hash + Header *subEthTypes.Header + Height *big.Int + Receipts types.Receipts + type BlockRequest struct + EventFilters []*EventFilter + Height *big.Int + SrcContractAddress common.Address + type BnOptions struct + Concurrency uint64 + StartHeight uint64 + type Client struct + func (c *Client) GetChainID() *big.Int + func (c *Client) GetEthClient() *ethclient.Client + func (c *Client) GetMedianGasPriceForBlock(ctx context.Context) (gasPrice *big.Int, gasHeight *big.Int, err error) + func (c *Client) Log() log.Logger + func (cl *Client) GetBalance(ctx context.Context, hexAddr string) (*big.Int, error) + func (cl *Client) GetBlockNumber() (uint64, error) + func (cl *Client) GetBlockReceiptsFromHeight(height *big.Int) (ethTypes.Receipts, error) + func (cl *Client) GetHeaderByHeight(height *big.Int) (*subEthTypes.Header, error) + type EVMLog struct + Address string + BlockHash []byte + BlockNumber uint64 + Data []byte + Index uint + Removed bool + Topics [][]byte + TxHash []byte + TxIndex uint + func MakeLog(log *types.Log) *EVMLog + type EventFilter struct + Addr Address + Data []*string + Indexed []*string + Signature string + type EventLog struct + Addr []byte + Data [][]byte + Indexed [][]byte + type HexBytes string + func (hs HexBytes) Value() ([]byte, error) + type HexInt string + func (i HexInt) Int() (int, error) + func (i HexInt) Value() (int64, error) + type IClient interface + GetBalance func(ctx context.Context, hexAddr string) (*big.Int, error) + GetBlockNumber func() (uint64, error) + GetBlockReceiptsFromHeight func(height *big.Int) (ethTypes.Receipts, error) + GetChainID func() *big.Int + GetEthClient func() *ethclient.Client + GetHeaderByHeight func(height *big.Int) (*subEthTypes.Header, error) + Log func() log.Logger + type Receipt struct + BlockHash common.Hash + BlockNumber uint64 + Bloom []byte + ContractAddress common.Address + CumulativeGasUsed uint64 + GasUsed uint64 + Logs []*EVMLog + PostState []byte + Status uint64 + TransactionIndex uint + TxHash common.Hash + Type uint8 + func MakeReceipt(receipt *types.Receipt) *Receipt + type ReceiptProof struct + Events []byte + Height int64 + Index int + type ReceiverOptions struct + SyncConcurrency uint64 + Verifier *VerifierOptions + func (opts *ReceiverOptions) Unmarshal(v map[string]interface{}) error + type RelayMessage struct + ReceiptProofs [][]byte + type Signature string + type TransactionHashParam struct + Hash common.Hash + type TransactionParam struct + FromAddress string + NetworkID HexInt + Params interface{} + ToAddress string + TransactOpt *bind.TransactOpts + type TransactionResult struct + BlockHash HexBytes + BlockHeight HexInt + CumulativeStepUsed HexInt + EventLogs []struct{ ... } + Failure ... + LogsBloom HexBytes + SCOREAddress Address + Status HexInt + StepPrice HexInt + StepUsed HexInt + To Address + TxHash HexBytes + TxIndex HexInt + type TypesBMCMessage struct + Dst string + Message []byte + Sn *big.Int + Src string + Svc string + type TypesBMCService struct + Payload []byte + ServiceType string + type TypesGatherFeeMessage struct + Fa string + Svcs []string + type TypesLinkStats struct + CurrentHeight *big.Int + RxHeight *big.Int + RxSeq *big.Int + TxSeq *big.Int + type Verifier struct + func (vr *Verifier) Next() *big.Int + func (vr *Verifier) Verify(h *subEthTypes.Header, newHeader *subEthTypes.Header) error + type VerifierOptions struct + BlockHash common.HexBytes + BlockHeight uint64