Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are all the api methods implemented? #8

Open
joesan opened this issue Nov 8, 2017 · 5 comments
Open

Are all the api methods implemented? #8

joesan opened this issue Nov 8, 2017 · 5 comments

Comments

@joesan
Copy link

joesan commented Nov 8, 2017

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
Copy link
Contributor

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
Copy link
Author

joesan commented Nov 9, 2017

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
Copy link
Contributor

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)

@joesan
Copy link
Author

joesan commented Nov 9, 2017

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants