vechain / web3-gear

Proxy Thor's RESTful API to Eth JSON-RPC, to support Remix, Truffle and more.
MIT License
30 stars 17 forks source link

Get block ignores full transaction objects #11

Closed plainerman closed 6 years ago

plainerman commented 6 years ago

eth_getBlockByHashand eth_getBlockByNumber specify an additional parameter that allows to return the full transaction objects instead of only the hashes of the transactions. These parameters are already specified, but the actual request ignores this parameter and only returns the hashes.

plainerman commented 6 years ago

@uldaman could you take a look at it? I am not really familiar with the internal workings of thor.

uldaman commented 6 years ago

There is no way to directly meet this requirement in thor api. So here are two options:

  1. The client traverses transactions after acquiring block.
  2. Web3-gear takes over this requirement and traverses transactions before returning.
plainerman commented 6 years ago

For full support it would probably be better to implement it in web3-gear natively? What is your view on it?

uldaman commented 6 years ago

In our original scenario, only the lowest level of api was provided, and the business was resolved by the client itself. But if it is to make it compatible with Ethereum, it is reasonable for web3-gear to support this parameter. I will do this.

uldaman commented 6 years ago

I have done this on feature-full-tx branch, you can pull it down and test it, hope to receive your feedback..

87a31356a710450edb34025aadbb2d802a8d7b43

plainerman commented 6 years ago

Works great with web3j! Thank you very much.