Documentation ¶
Index ¶
- Constants
- 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
- type BMC
- type BMCCaller
- 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
- type BMCCallerSession
- 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
- type BMCErrorOnBTPErrorIterator
- type BMCFilterer
- 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
- type BMCInitializedIterator
- type BMCMessage
- type BMCMessageIterator
- type BMCRaw
- type BMCRelayMethodParams
- type BMCSession
- 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
- type BMCTransactor
- 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
- type BMCTransactorSession
- 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
- type BlockRequest
- type BnOptions
- type Client
- 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 (c *Client) GetChainID() *big.Int
- func (c *Client) GetEthClient() *ethclient.Client
- func (cl *Client) GetHeaderByHeight(height *big.Int) (*subEthTypes.Header, error)
- func (c *Client) GetMedianGasPriceForBlock(ctx context.Context) (gasPrice *big.Int, gasHeight *big.Int, err error)
- func (c *Client) Log() log.Logger
- type EVMLog
- type EventFilter
- type EventLog
- type HexBytes
- type HexInt
- type IClient
- type Receipt
- type ReceiptProof
- type ReceiverOptions
- type RelayMessage
- type Signature
- type TransactionHashParam
- type TransactionParam
- type TransactionResult
- type TypesBMCMessage
- type TypesBMCService
- type TypesGatherFeeMessage
- type TypesLinkStats
- type Verifier
- type VerifierOptions
Constants ¶
const ( BlockInterval = 20 * time.Second BlockHeightPollInterval = BlockInterval * 3 BlockFinalityConfirmations = 5 MonitorBlockMaxConcurrency = 300 // number of concurrent requests to synchronize older blocks from source chain RPCCallRetry = 5 )
const BMCABI = "" /* 4315-byte string literal not displayed */
BMCABI is the input ABI used to generate the binding from.
const (
DefaultGasLimit = 25000000
)
Variables ¶
This section is empty.
Functions ¶
func HexToAddress ¶
func NewReceiver ¶
func NewReceiver( src, dst chain.BTPAddress, urls []string, rawOpts json.RawMessage, l log.Logger) (chain.Receiver, error)
Types ¶
type BMC ¶
type BMC struct { BMCCaller // Read-only binding to the contract BMCTransactor // Write-only binding to the contract BMCFilterer // Log filterer for contract events }
BMC is an auto generated Go binding around an Ethereum contract.
type BMCCaller ¶
type BMCCaller struct {
// contains filtered or unexported fields
}
BMCCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewBMCCaller ¶
NewBMCCaller creates a new read-only instance of BMC, bound to a specific deployed contract.
func (*BMCCaller) GetBmcBtpAddress ¶
GetBmcBtpAddress is a free data retrieval call binding the contract method 0x2a4011e9.
Solidity: function getBmcBtpAddress() view returns(string)
func (*BMCCaller) GetStatus ¶
GetStatus is a free data retrieval call binding the contract method 0x22b05ed2.
Solidity: function getStatus(string _link) view returns((uint256,uint256,uint256,uint256) _linkStats)
func (*BMCCaller) TryDecodeBMCService ¶
func (_BMC *BMCCaller) TryDecodeBMCService(opts *bind.CallOpts, _msg []byte) (TypesBMCService, error)
TryDecodeBMCService is a free data retrieval call binding the contract method 0x2294c488.
Solidity: function tryDecodeBMCService(bytes _msg) pure returns((string,bytes))
func (*BMCCaller) TryDecodeBTPMessage ¶
func (_BMC *BMCCaller) TryDecodeBTPMessage(opts *bind.CallOpts, _rlp []byte) (TypesBMCMessage, error)
TryDecodeBTPMessage is a free data retrieval call binding the contract method 0x23c31a43.
Solidity: function tryDecodeBTPMessage(bytes _rlp) pure returns((string,string,string,int256,bytes))
func (*BMCCaller) TryDecodeGatherFeeMessage ¶
func (_BMC *BMCCaller) TryDecodeGatherFeeMessage(opts *bind.CallOpts, _msg []byte) (TypesGatherFeeMessage, error)
TryDecodeGatherFeeMessage is a free data retrieval call binding the contract method 0x9624379f.
Solidity: function tryDecodeGatherFeeMessage(bytes _msg) pure returns((string,string[]))
type BMCCallerRaw ¶
type BMCCallerRaw struct {
Contract *BMCCaller // Generic read-only contract binding to access the raw methods on
}
BMCCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*BMCCallerRaw) Call ¶
func (_BMC *BMCCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
type BMCCallerSession ¶
type BMCCallerSession struct { Contract *BMCCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
BMCCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*BMCCallerSession) GetBmcBtpAddress ¶
func (_BMC *BMCCallerSession) GetBmcBtpAddress() (string, error)
GetBmcBtpAddress is a free data retrieval call binding the contract method 0x2a4011e9.
Solidity: function getBmcBtpAddress() view returns(string)
func (*BMCCallerSession) GetStatus ¶
func (_BMC *BMCCallerSession) GetStatus(_link string) (TypesLinkStats, error)
GetStatus is a free data retrieval call binding the contract method 0x22b05ed2.
Solidity: function getStatus(string _link) view returns((uint256,uint256,uint256,uint256) _linkStats)
func (*BMCCallerSession) TryDecodeBMCService ¶
func (_BMC *BMCCallerSession) TryDecodeBMCService(_msg []byte) (TypesBMCService, error)
TryDecodeBMCService is a free data retrieval call binding the contract method 0x2294c488.
Solidity: function tryDecodeBMCService(bytes _msg) pure returns((string,bytes))
func (*BMCCallerSession) TryDecodeBTPMessage ¶
func (_BMC *BMCCallerSession) TryDecodeBTPMessage(_rlp []byte) (TypesBMCMessage, error)
TryDecodeBTPMessage is a free data retrieval call binding the contract method 0x23c31a43.
Solidity: function tryDecodeBTPMessage(bytes _rlp) pure returns((string,string,string,int256,bytes))
func (*BMCCallerSession) TryDecodeGatherFeeMessage ¶
func (_BMC *BMCCallerSession) TryDecodeGatherFeeMessage(_msg []byte) (TypesGatherFeeMessage, error)
TryDecodeGatherFeeMessage is a free data retrieval call binding the contract method 0x9624379f.
Solidity: function tryDecodeGatherFeeMessage(bytes _msg) pure returns((string,string[]))
type BMCErrorOnBTPError ¶
type BMCErrorOnBTPError struct { Svc string Sn *big.Int Code *big.Int ErrMsg string SvcErrCode *big.Int SvcErrMsg string Raw types.Log // Blockchain specific contextual infos }
BMCErrorOnBTPError represents a ErrorOnBTPError event raised by the BMC contract.
type BMCErrorOnBTPErrorIterator ¶
type BMCErrorOnBTPErrorIterator struct { Event *BMCErrorOnBTPError // Event containing the contract specifics and raw log // contains filtered or unexported fields }
BMCErrorOnBTPErrorIterator is returned from FilterErrorOnBTPError and is used to iterate over the raw logs and unpacked data for ErrorOnBTPError events raised by the BMC contract.
func (*BMCErrorOnBTPErrorIterator) Close ¶
func (it *BMCErrorOnBTPErrorIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*BMCErrorOnBTPErrorIterator) Error ¶
func (it *BMCErrorOnBTPErrorIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*BMCErrorOnBTPErrorIterator) Next ¶
func (it *BMCErrorOnBTPErrorIterator) Next() bool
Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.
type BMCFilterer ¶
type BMCFilterer struct {
// contains filtered or unexported fields
}
BMCFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewBMCFilterer ¶
func NewBMCFilterer(address common.Address, filterer bind.ContractFilterer) (*BMCFilterer, error)
NewBMCFilterer creates a new log filterer instance of BMC, bound to a specific deployed contract.
func (*BMCFilterer) FilterErrorOnBTPError ¶
func (_BMC *BMCFilterer) FilterErrorOnBTPError(opts *bind.FilterOpts) (*BMCErrorOnBTPErrorIterator, error)
FilterErrorOnBTPError is a free log retrieval operation binding the contract event 0x45eab163faa71c8b113fcbc0dcc77bd39e7e3365be446895b5169bd97fc5522a.
Solidity: event ErrorOnBTPError(string _svc, int256 _sn, uint256 _code, string _errMsg, uint256 _svcErrCode, string _svcErrMsg)
func (*BMCFilterer) FilterInitialized ¶
func (_BMC *BMCFilterer) FilterInitialized(opts *bind.FilterOpts) (*BMCInitializedIterator, error)
FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
Solidity: event Initialized(uint8 version)
func (*BMCFilterer) FilterMessage ¶
func (_BMC *BMCFilterer) FilterMessage(opts *bind.FilterOpts) (*BMCMessageIterator, error)
FilterMessage is a free log retrieval operation binding the contract event 0x37be353f216cf7e33639101fd610c542e6a0c0109173fa1c1d8b04d34edb7c1b.
Solidity: event Message(string _next, uint256 _seq, bytes _msg)
func (*BMCFilterer) ParseErrorOnBTPError ¶
func (_BMC *BMCFilterer) ParseErrorOnBTPError(log types.Log) (*BMCErrorOnBTPError, error)
ParseErrorOnBTPError is a log parse operation binding the contract event 0x45eab163faa71c8b113fcbc0dcc77bd39e7e3365be446895b5169bd97fc5522a.
Solidity: event ErrorOnBTPError(string _svc, int256 _sn, uint256 _code, string _errMsg, uint256 _svcErrCode, string _svcErrMsg)
func (*BMCFilterer) ParseInitialized ¶
func (_BMC *BMCFilterer) ParseInitialized(log types.Log) (*BMCInitialized, error)
ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
Solidity: event Initialized(uint8 version)
func (*BMCFilterer) ParseMessage ¶
func (_BMC *BMCFilterer) ParseMessage(log types.Log) (*BMCMessage, error)
ParseMessage is a log parse operation binding the contract event 0x37be353f216cf7e33639101fd610c542e6a0c0109173fa1c1d8b04d34edb7c1b.
Solidity: event Message(string _next, uint256 _seq, bytes _msg)
func (*BMCFilterer) WatchErrorOnBTPError ¶
func (_BMC *BMCFilterer) WatchErrorOnBTPError(opts *bind.WatchOpts, sink chan<- *BMCErrorOnBTPError) (event.Subscription, error)
WatchErrorOnBTPError is a free log subscription operation binding the contract event 0x45eab163faa71c8b113fcbc0dcc77bd39e7e3365be446895b5169bd97fc5522a.
Solidity: event ErrorOnBTPError(string _svc, int256 _sn, uint256 _code, string _errMsg, uint256 _svcErrCode, string _svcErrMsg)
func (*BMCFilterer) WatchInitialized ¶
func (_BMC *BMCFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *BMCInitialized) (event.Subscription, error)
WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
Solidity: event Initialized(uint8 version)
func (*BMCFilterer) WatchMessage ¶
func (_BMC *BMCFilterer) WatchMessage(opts *bind.WatchOpts, sink chan<- *BMCMessage) (event.Subscription, error)
WatchMessage is a free log subscription operation binding the contract event 0x37be353f216cf7e33639101fd610c542e6a0c0109173fa1c1d8b04d34edb7c1b.
Solidity: event Message(string _next, uint256 _seq, bytes _msg)
type BMCInitialized ¶
BMCInitialized represents a Initialized event raised by the BMC contract.
type BMCInitializedIterator ¶
type BMCInitializedIterator struct { Event *BMCInitialized // Event containing the contract specifics and raw log // contains filtered or unexported fields }
BMCInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the BMC contract.
func (*BMCInitializedIterator) Close ¶
func (it *BMCInitializedIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*BMCInitializedIterator) Error ¶
func (it *BMCInitializedIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*BMCInitializedIterator) Next ¶
func (it *BMCInitializedIterator) Next() bool
Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.
type BMCMessage ¶
type BMCMessage struct { Next string Seq *big.Int Msg []byte Raw types.Log // Blockchain specific contextual infos }
BMCMessage represents a Message event raised by the BMC contract.
type BMCMessageIterator ¶
type BMCMessageIterator struct { Event *BMCMessage // Event containing the contract specifics and raw log // contains filtered or unexported fields }
BMCMessageIterator is returned from FilterMessage and is used to iterate over the raw logs and unpacked data for Message events raised by the BMC contract.
func (*BMCMessageIterator) Close ¶
func (it *BMCMessageIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*BMCMessageIterator) Error ¶
func (it *BMCMessageIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*BMCMessageIterator) Next ¶
func (it *BMCMessageIterator) Next() bool
Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.
type BMCRaw ¶
type BMCRaw struct {
Contract *BMC // Generic contract binding to access the raw methods on
}
BMCRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*BMCRaw) Call ¶
func (_BMC *BMCRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
func (*BMCRaw) Transact ¶
func (_BMC *BMCRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*BMCRaw) Transfer ¶
func (_BMC *BMCRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type BMCRelayMethodParams ¶
type BMCSession ¶
type BMCSession struct { Contract *BMC // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
BMCSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*BMCSession) GetBmcBtpAddress ¶
func (_BMC *BMCSession) GetBmcBtpAddress() (string, error)
GetBmcBtpAddress is a free data retrieval call binding the contract method 0x2a4011e9.
Solidity: function getBmcBtpAddress() view returns(string)
func (*BMCSession) GetStatus ¶
func (_BMC *BMCSession) GetStatus(_link string) (TypesLinkStats, error)
GetStatus is a free data retrieval call binding the contract method 0x22b05ed2.
Solidity: function getStatus(string _link) view returns((uint256,uint256,uint256,uint256) _linkStats)
func (*BMCSession) HandleRelayMessage ¶
func (_BMC *BMCSession) HandleRelayMessage(_prev string, _msg []byte) (*types.Transaction, error)
HandleRelayMessage is a paid mutator transaction binding the contract method 0x21b1e9bb.
Solidity: function handleRelayMessage(string _prev, bytes _msg) returns()
func (*BMCSession) Initialize ¶
func (_BMC *BMCSession) Initialize(_network string, _bmcManagementAddr common.Address) (*types.Transaction, error)
Initialize is a paid mutator transaction binding the contract method 0x7ab4339d.
Solidity: function initialize(string _network, address _bmcManagementAddr) returns()
func (*BMCSession) SendMessage ¶
func (_BMC *BMCSession) SendMessage(_to string, _svc string, _sn *big.Int, _msg []byte) (*types.Transaction, error)
SendMessage is a paid mutator transaction binding the contract method 0xbf6c1d9a.
Solidity: function sendMessage(string _to, string _svc, uint256 _sn, bytes _msg) returns()
func (*BMCSession) TryDecodeBMCService ¶
func (_BMC *BMCSession) TryDecodeBMCService(_msg []byte) (TypesBMCService, error)
TryDecodeBMCService is a free data retrieval call binding the contract method 0x2294c488.
Solidity: function tryDecodeBMCService(bytes _msg) pure returns((string,bytes))
func (*BMCSession) TryDecodeBTPMessage ¶
func (_BMC *BMCSession) TryDecodeBTPMessage(_rlp []byte) (TypesBMCMessage, error)
TryDecodeBTPMessage is a free data retrieval call binding the contract method 0x23c31a43.
Solidity: function tryDecodeBTPMessage(bytes _rlp) pure returns((string,string,string,int256,bytes))
func (*BMCSession) TryDecodeGatherFeeMessage ¶
func (_BMC *BMCSession) TryDecodeGatherFeeMessage(_msg []byte) (TypesGatherFeeMessage, error)
TryDecodeGatherFeeMessage is a free data retrieval call binding the contract method 0x9624379f.
Solidity: function tryDecodeGatherFeeMessage(bytes _msg) pure returns((string,string[]))
type BMCStatus ¶
type BMCStatus struct { TxSeq HexInt `json:"tx_seq"` RxSeq HexInt `json:"rx_seq"` BMRIndex HexInt `json:"relay_idx"` RotateHeight HexInt `json:"rotate_height"` RotateTerm HexInt `json:"rotate_term"` DelayLimit HexInt `json:"delay_limit"` MaxAggregation HexInt `json:"max_agg"` CurrentHeight HexInt `json:"cur_height"` RxHeight HexInt `json:"rx_height"` RxHeightSrc HexInt `json:"rx_height_src"` BlockIntervalSrc HexInt `json:"block_interval_src"` BlockIntervalDst HexInt `json:"block_interval_dst"` }
type BMCTransactor ¶
type BMCTransactor struct {
// contains filtered or unexported fields
}
BMCTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewBMCTransactor ¶
func NewBMCTransactor(address common.Address, transactor bind.ContractTransactor) (*BMCTransactor, error)
NewBMCTransactor creates a new write-only instance of BMC, bound to a specific deployed contract.
func (*BMCTransactor) HandleRelayMessage ¶
func (_BMC *BMCTransactor) HandleRelayMessage(opts *bind.TransactOpts, _prev string, _msg []byte) (*types.Transaction, error)
HandleRelayMessage is a paid mutator transaction binding the contract method 0x21b1e9bb.
Solidity: function handleRelayMessage(string _prev, bytes _msg) returns()
func (*BMCTransactor) Initialize ¶
func (_BMC *BMCTransactor) Initialize(opts *bind.TransactOpts, _network string, _bmcManagementAddr common.Address) (*types.Transaction, error)
Initialize is a paid mutator transaction binding the contract method 0x7ab4339d.
Solidity: function initialize(string _network, address _bmcManagementAddr) returns()
func (*BMCTransactor) SendMessage ¶
func (_BMC *BMCTransactor) SendMessage(opts *bind.TransactOpts, _to string, _svc string, _sn *big.Int, _msg []byte) (*types.Transaction, error)
SendMessage is a paid mutator transaction binding the contract method 0xbf6c1d9a.
Solidity: function sendMessage(string _to, string _svc, uint256 _sn, bytes _msg) returns()
type BMCTransactorRaw ¶
type BMCTransactorRaw struct {
Contract *BMCTransactor // Generic write-only contract binding to access the raw methods on
}
BMCTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*BMCTransactorRaw) Transact ¶
func (_BMC *BMCTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*BMCTransactorRaw) Transfer ¶
func (_BMC *BMCTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type BMCTransactorSession ¶
type BMCTransactorSession struct { Contract *BMCTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
BMCTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*BMCTransactorSession) HandleRelayMessage ¶
func (_BMC *BMCTransactorSession) HandleRelayMessage(_prev string, _msg []byte) (*types.Transaction, error)
HandleRelayMessage is a paid mutator transaction binding the contract method 0x21b1e9bb.
Solidity: function handleRelayMessage(string _prev, bytes _msg) returns()
func (*BMCTransactorSession) Initialize ¶
func (_BMC *BMCTransactorSession) Initialize(_network string, _bmcManagementAddr common.Address) (*types.Transaction, error)
Initialize is a paid mutator transaction binding the contract method 0x7ab4339d.
Solidity: function initialize(string _network, address _bmcManagementAddr) returns()
func (*BMCTransactorSession) SendMessage ¶
func (_BMC *BMCTransactorSession) SendMessage(_to string, _svc string, _sn *big.Int, _msg []byte) (*types.Transaction, error)
SendMessage is a paid mutator transaction binding the contract method 0xbf6c1d9a.
Solidity: function sendMessage(string _to, string _svc, uint256 _sn, bytes _msg) returns()
type BlockNotification ¶
type BlockRequest ¶
type BlockRequest struct { Height *big.Int `json:"height"` EventFilters []*EventFilter `json:"eventFilters,omitempty"` SrcContractAddress common.Address `json:"srcContractAddress,omitempty"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
grouped rpc api clients
func (*Client) GetBalance ¶
func (*Client) GetBlockNumber ¶
func (*Client) GetBlockReceiptsFromHeight ¶
func (*Client) GetChainID ¶
func (*Client) GetEthClient ¶
func (*Client) GetHeaderByHeight ¶
func (*Client) GetMedianGasPriceForBlock ¶
type EVMLog ¶
type EventFilter ¶
type IClient ¶
type IClient interface { GetBalance(ctx context.Context, hexAddr string) (*big.Int, error) GetBlockNumber() (uint64, error) //GetBlockByHash(hash common.Hash) (*snowTypes.Block, error) GetHeaderByHeight(height *big.Int) (*subEthTypes.Header, error) //GetBlockReceipts(hash common.Hash) (ethTypes.Receipts, error) GetBlockReceiptsFromHeight(height *big.Int) (ethTypes.Receipts, error) GetChainID() *big.Int GetEthClient() *ethclient.Client Log() log.Logger }
type Receipt ¶
type Receipt struct { // Consensus fields: These fields are defined by the Yellow Paper Type uint8 PostState []byte Status uint64 CumulativeGasUsed uint64 Bloom []byte Logs []*EVMLog TxHash common.Hash ContractAddress common.Address GasUsed uint64 BlockHash common.Hash BlockNumber uint64 TransactionIndex uint }
func MakeReceipt ¶
type ReceiptProof ¶
type ReceiverOptions ¶
type ReceiverOptions struct { SyncConcurrency uint64 `json:"syncConcurrency"` Verifier *VerifierOptions `json:"verifier"` }
func (*ReceiverOptions) Unmarshal ¶
func (opts *ReceiverOptions) Unmarshal(v map[string]interface{}) error
type RelayMessage ¶
type RelayMessage struct { ReceiptProofs [][]byte // contains filtered or unexported fields }
type TransactionHashParam ¶
type TransactionParam ¶
type TransactionParam struct { FromAddress string `json:"from" validate:"required,t_addr_eoa"` ToAddress string `json:"to" validate:"required,t_addr"` NetworkID HexInt `json:"nid" validate:"required,t_int"` Params interface{} `json:"params,omitempty"` TransactOpt *bind.TransactOpts }
type TransactionResult ¶
type TransactionResult struct { To Address `json:"to"` CumulativeStepUsed HexInt `json:"cumulativeStepUsed"` StepUsed HexInt `json:"stepUsed"` StepPrice HexInt `json:"stepPrice"` EventLogs []struct { Addr Address `json:"scoreAddress"` Indexed []string `json:"indexed"` Data []string `json:"data"` } `json:"eventLogs"` LogsBloom HexBytes `json:"logsBloom"` Status HexInt `json:"status"` Failure *struct { CodeValue HexInt `json:"code"` MessageValue string `json:"message"` } `json:"failure,omitempty"` SCOREAddress Address `json:"scoreAddress,omitempty"` BlockHash HexBytes `json:"blockHash" validate:"required,t_hash"` BlockHeight HexInt `json:"blockHeight" validate:"required,t_int"` TxIndex HexInt `json:"txIndex" validate:"required,t_int"` TxHash HexBytes `json:"txHash" validate:"required,t_int"` }
type TypesBMCMessage ¶
TypesBMCMessage is an auto generated low-level Go binding around an user-defined struct.
type TypesBMCService ¶
TypesBMCService is an auto generated low-level Go binding around an user-defined struct.
type TypesGatherFeeMessage ¶
TypesGatherFeeMessage is an auto generated low-level Go binding around an user-defined struct.
type TypesLinkStats ¶
type TypesLinkStats struct { RxSeq *big.Int TxSeq *big.Int RxHeight *big.Int CurrentHeight *big.Int }
TypesLinkStats is an auto generated low-level Go binding around an user-defined struct.
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
next points to height whose parentHash is expected parentHash of height h is got from next-1's hash
func (*Verifier) Verify ¶
func (vr *Verifier) Verify(h *subEthTypes.Header, newHeader *subEthTypes.Header) error