MetaMask / eth-json-rpc-middleware

Ethereum middleware for composing an Ethereum provider using json-rpc-engine. Intended to replace provider-engine
ISC License
179 stars 88 forks source link

Use input as data in eth_sendTransaction #300

Open jiexi opened 5 months ago

jiexi commented 5 months ago

The Ethereum execution API specs have eth_sendTransaction with a input field, however nodes such as geth have been using the data field instead, adding input support later.

To make eth_sendTransaction align better with execution api, this PR makes eth_sendTransaction accepts input OR data (if both are provided, they must be equal) and maps it to the data field in the object that the processTransaction callback expects

See: https://github.com/MetaMask/MetaMask-planning/issues/2214