eth-client icon indicating copy to clipboard operation
eth-client copied to clipboard

Can't use quorum.Dial

Open sadysnaat opened this issue 7 years ago • 2 comments

package main

import (
	"log"
	"github.com/getamis/eth-client/quorum"
)
func main() {
	c, err := quorum.Dial("http://0.0.0.0:8545")
	if err != nil {
	    log.Fatalln(err)
	}
}

I get the following error

# github.com/getamis/eth-client/client
../../github.com/getamis/eth-client/client/client.go:49:6: cannot use client literal (type *client) as type Client in return argument:
	*client does not implement Client (wrong type for EstimateGas method)
		have EstimateGas(context.Context, ethereum.CallMsg) (uint64, error)
		want EstimateGas(context.Context, ethereum.CallMsg) (*big.Int, error)

Is there something I am doing wrong?

sadysnaat avatar Feb 06 '18 16:02 sadysnaat

It's not limited to quorum clients. I'm dealing with this now.

Looks like this geth commit was a breaking change for this.

Lsquared13 avatar Mar 21 '18 14:03 Lsquared13

The problem occurs when you start mixing in newer versions of geth than the aforementioned commit. I assume it looks fine from the author's POV because the vendor folder here has older versions.

It's a one line fix on my fork of this repo

I'm only refraining from submitting a PR because I'm not sure what to do with the vendor files

Lsquared13 avatar Mar 21 '18 14:03 Lsquared13