EVM node: fix transaction type encoding
Checklist
What
Use a compact hexadecimal encoding in JSON for the transaction type, e.g. 0x2 instead of 0x02 for EIP 1559.
Why
- The ethereum specification requires quantities to be compactly encoded in hex, see https://ethereum.org/en/developers/docs/apis/json-rpc/#quantities-encoding and https://ethereum.org/en/developers/docs/transactions/#typed-transaction-envelope.
- This is an issue for people that want to use the geth client.
- Potentially also an error with hardhat users.
How
Use correct encoding but support reading older one for backward compatibility.
Edited by Alain Mebsout