eth-client
eth-client copied to clipboard
Are all the api methods implemented?
I just checked out the latest code and I was having a look into the client.go source file and I could not find any implementation for some of the functions in the api.go?
For example., I could not find the implementation for BlockByHash method in the client.go? Any ideas?
Hi joesan,
The reason you could not find any implementation is that client was inherited from ethclient.
So, BlockByHash can be found in here
Currently, client does not support all JSON-RPC methods. We will support all in the future.
Welcome to contribute.
Ok so then what is the difference between ethClient (from go-ethereum) and the client that is part of this project? Could you please explain?
I'm definitely interested to do some contributions!
The ethClient(go-ethereum) JSON-RPC methods are not enough to use. For example,
- Some modules(
admin
,miner
, ...etc) are not supported by ethClient, but supported in here. - If you do integration testing with go-ethereum, the ethClient JSON-RPC methods are not enough to use. Imagine that some feature can be tested after start mining, but start mining is not supported in ethClient.
This project provides a high-level interface, so we can use it directly in golang application
or integration testing
.
Some of complex feature are consider to support in the future, example of WaitForBlockHeight(num)
Ok so the idea is to use this library from you with some other Go projects that would need to interface with an Ethereum node? Sounds interesting!
Have you got experience with go-ethereum itself? Actually I was asking for some help in the gitter channel of go for some help. I'm totally new to Blockchain and I want to get deeper in the fundamentals and one way for me to do that would be to understand the code base a bit better and since Go is also new to me, I was asking for some pair programming sort of help in the forum.
Ok so the idea is to use this library from you with some other Go projects that would need to interface with an Ethereum node? Sounds interesting!
Yes, you got it.
In my experience, if you're a novice at golang
, this guide gets you started programming.
If you want to understand any module of code base on go-ethereum, you can get start from testing file which are very useful. E.q. How to setup genesis by programming? Learned it from here.