getamis / eth-client

A Golang client library for communicating with Ethereum RPC server
GNU Lesser General Public License v3.0
55 stars 14 forks source link

Are all the api methods implemented? #8

Open joesan opened 7 years ago

joesan commented 7 years ago

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?

bailantaotao commented 7 years ago

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.

joesan commented 7 years ago

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!

bailantaotao commented 7 years ago

The ethClient(go-ethereum) JSON-RPC methods are not enough to use. For example,

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)

joesan commented 7 years ago

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.

bailantaotao commented 7 years ago

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.