Documentation ¶
Index ¶
- func EthSetupWebsocketClient(ethURL string) (*ethclient.Client, error)
- func HmySetupWebsocketClient(hmyURL string) (*hmyclient.Client, error)
- func IsWebsocketURL(rawurl string) bool
- type EthereumSub
- func (sub EthereumSub) EthHandleLogLockEvent(clientChainID *big.Int, contractAddress common.Address, contractABI abi.ABI, ...) error
- func (sub EthereumSub) EthHandleLogNewUnlockClaim(contractAddress common.Address, contractABI abi.ABI, eventName string, ...) error
- func (sub EthereumSub) EthStartContractEventSub(logs chan ctypes.Log, client *ethclient.Client, ...) (common.Address, ethereum.Subscription)
- func (sub EthereumSub) Start()
- type HarmonySub
- func (sub HarmonySub) HmyHandleLogLockEvent(clientChainID *big.Int, bridgeBankAddress common.Address, contractABI abi.ABI, ...) error
- func (sub HarmonySub) HmyHandleLogNewUnlockClaim(contractAddress common.Address, contractABI abi.ABI, eventName string, ...) error
- func (sub HarmonySub) HmyStartContractEventSub(logs chan htypes.Log, client *hmyclient.Client, ...) (common.Address, ethereum.Subscription)
- func (sub HarmonySub) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EthSetupWebsocketClient ¶
EthSetupWebsocketClient returns boolean indicating if a URL is valid websocket ethclient
func HmySetupWebsocketClient ¶
HmySetupWebsocketClient returns boolean indicating if a URL is valid websocket hmyclient
func IsWebsocketURL ¶
IsWebsocketURL returns true if the given URL is a websocket URL
Types ¶
type EthereumSub ¶
type EthereumSub struct { EthereumProvider string HarmonyProvider string EthereumBridgeRegistry common.Address HarmonyBridgeRegistry common.Address ValidatorName string EthPrivateKey *ecdsa.PrivateKey HmyPrivatekey *ecdsa.PrivateKey Logger tmLog.Logger }
EthereumSub is an Ethereum listener that can relay txs to Harmony
func NewEthereumSub ¶
func NewEthereumSub(inBuf io.Reader, validatorMoniker, ethereumProvider string, harmonyProvider string, ethereumBridgeRegistry common.Address, harmonyBridgeRegistry common.Address, ethPrivateKey *ecdsa.PrivateKey, hmyPrivateKey *ecdsa.PrivateKey, logger tmLog.Logger) (EthereumSub, error)
NewEthereumSub initializes a new EthereumSub
func (EthereumSub) EthHandleLogLockEvent ¶
func (sub EthereumSub) EthHandleLogLockEvent(clientChainID *big.Int, contractAddress common.Address, contractABI abi.ABI, eventName string, cLog ctypes.Log) error
EthHandleLogLockEvent unpacks an EthLogLockEvent, and relays a tx to Harmony
func (EthereumSub) EthHandleLogNewUnlockClaim ¶
func (sub EthereumSub) EthHandleLogNewUnlockClaim(contractAddress common.Address, contractABI abi.ABI, eventName string, cLog ctypes.Log) error
EthHandleLogNewUnlockClaim unpacks a EthLogNewUnlockClaim event, builds a new OracleClaim, and relays it to Ethereum
func (EthereumSub) EthStartContractEventSub ¶
func (sub EthereumSub) EthStartContractEventSub(logs chan ctypes.Log, client *ethclient.Client, contractName txs.ContractRegistry) (common.Address, ethereum.Subscription)
EthStartContractEventSub : starts an event subscription on the specified Ethereum contract
type HarmonySub ¶
type HarmonySub struct { HarmonyProvider string EthereumProvider string HarmonyBridgeRegistry common.Address EthereumBridgeRegistry common.Address ValidatorName string HmyPrivateKey *ecdsa.PrivateKey EthPrivateKey *ecdsa.PrivateKey Logger tmLog.Logger }
HarmonySub is an Harmony listener that can relay txs to Ethereum
func NewHarmonySub ¶
func NewHarmonySub(inBuf io.Reader, validatorMoniker, harmonyProvider string, ethereumProvider string, harmonyBridgeRegistry common.Address, ethereumBridgeRegistry common.Address, hmyPrivateKey *ecdsa.PrivateKey, ethPrivateKey *ecdsa.PrivateKey, logger tmLog.Logger) (HarmonySub, error)
NewHarmonySub initializes a new HarmonySub
func (HarmonySub) HmyHandleLogLockEvent ¶
func (sub HarmonySub) HmyHandleLogLockEvent(clientChainID *big.Int, bridgeBankAddress common.Address, contractABI abi.ABI, eventName string, cLog htypes.Log) error
HmyHandleLogLockEvent unpacks a HmyLogLockEvent, and relays a tx to Ethereum
func (HarmonySub) HmyHandleLogNewUnlockClaim ¶
func (sub HarmonySub) HmyHandleLogNewUnlockClaim(contractAddress common.Address, contractABI abi.ABI, eventName string, hLog htypes.Log) error
HmyHandleLogNewUnlockClaim unpacks a HmyLogNewUnlockClaim event, builds a new OracleClaim, and relays it to Harmony
func (HarmonySub) HmyStartContractEventSub ¶
func (sub HarmonySub) HmyStartContractEventSub(logs chan htypes.Log, client *hmyclient.Client, contractName txs.ContractRegistry) (common.Address, ethereum.Subscription)
HmyStartContractEventSub : starts an event subscription on the specified Harmony contract