ethereum/eth-tester

The transaction `data` property should be `input` when requested.

ignition42 opened this issue · 0 comments

What was wrong?

According to JSON RPC API when a transaction is received (eg. via eth_gettransactionbyhash) the data of the transaction can be retrieved via accessing the input property.

Both backends, MockBackend and PyEVMBackend return the data in a data property. Meaning I need to change implementation for testing, mock it or mutate it.

The data property is used for sending transactions though (eg. eth_sendtransaction), but when the transaction is requested, the returned data is in the input property.

How can it be fixed?

Maybe storing the data property from the sent transaction into an input property instead of data, but I would need to do more research in order to do answer that question properly.

Possible locations: MockBackend, PyEVMBackend