| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| var errParameterNotImplemented = errors.New("parameter not implemented") | ||
|
|
||
| // marshalReceipt marshals a transaction receipt into a JSON object. | ||
| func marshalReceipt(receipt *types.Receipt, blockHash common.Hash, blockNumber uint64, signer types.Signer, tx *types.Transaction, txIndex int) map[string]interface{} { |
There was a problem hiding this comment.
Could we make the origin function public to avoid copying it?
Sorry, something went wrong.
There was a problem hiding this comment.
Yes we could, and it'd be better because avoid redundant code. My only concern is in the scenario:
I am not entirely sure but it potentially may cause a merge conflict. Anyway this conflict is simple to solve.
@GrapeBaBa should I make the origin function public?
Sorry, something went wrong.
There was a problem hiding this comment.
I understand your thoughts, and I have similar considerations. I feel this method should be relatively easy to merge, what do you think? @fearlessfe @thinkAfCod
Sorry, something went wrong.
There was a problem hiding this comment.
if take issue #22 into consideration, may be copy will be better
Sorry, something went wrong.
There was a problem hiding this comment.
OK
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Implementations follows specs.
Reference file: internal/ethapi/api.go
Note that is WIP since eth_getBlockReceipts returns the error "parameter not implemented" if called with string tag (e.g. "latest") or block number. Block search by number is not implemented.
Integration test of eth_getBlockReceipts
Using curl:
curl 127.0.0.1:8545/ -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["0xb81fcfee29cea2922aa9f553644463bee1c49895e56bc87f4417834e681ad305"],"id":1}'curl 127.0.0.1:8545/ -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["latest"],"id":1}'curl 127.0.0.1:8545/ -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["0x1234"],"id":1}'Apparently ethers Js do not implement this method: ethers-io/ethers.js#4768
Intregration test of eth_getBlockTransactionCountByHash
Using curl:
curl 127.0.0.1:8545/ -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0xb81fcfee29cea2922aa9f553644463bee1c49895e56bc87f4417834e681ad305"],"id":1}'Using web3.js: