returnnil,common.Address{},0,nil,fmt.Errorf("dial eth client: %w",err)
returnnil,common.Address{},0,nil,nil,fmt.Errorf("dial eth client: %w",err)
}
chainID,err:=backend.ChainID(ctx)
iferr!=nil{
logger.Infof("could not connect to backend at %v. In a swap-enabled network a working blockchain node (for goerli network in production) is required. Check your node or specify another node using --swap-endpoint.",endpoint)
// Monitor is a nonce-based watcher for transaction confirmations.
// Instead of watching transactions individually, the senders nonce is monitored and transactions are checked based on this.
// The idea is that if the nonce is still lower than that of a pending transaction, there is no point in actually checking the transaction for a receipt.
// At the same time if the nonce was already used and this was a few blocks ago we can reasonably assume that it will never confirm.
typeMonitorinterface{
io.Closer
// WatchTransaction watches the transaction until either there is 1 confirmation or a competing transaction with cancellationDepth confirmations.