From 6ec82000eb83a0ab2d30cd09bca4980049784640 Mon Sep 17 00:00:00 2001 From: Oleg Nikonychev Date: Fri, 8 Nov 2024 19:58:28 +0400 Subject: [PATCH] fix(evm): removed deprecated root key from eth_getTransactionReceipt (#2108) * fix(evm): removed deprecated root key from eth_getTransactionReceipt * chore: changelog update --- CHANGELOG.md | 1 + eth/rpc/backend/tx_info.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85be6188d..04f83b83e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,6 +102,7 @@ tests for race conditions within funtoken precompile - [#2105](https://github.com/NibiruChain/nibiru/pull/2105) - test(evm): precompile call with revert - [#2107](https://github.com/NibiruChain/nibiru/pull/2107) - feat(evm-funtoken-precompile): Implement methods: balance, bankBalance, whoAmI +- [#2108](https://github.com/NibiruChain/nibiru/pull/2108) - fix(evm): removed deprecated root key from eth_getTransactionReceipt #### Nibiru EVM | Before Audit 1 - 2024-10-18 diff --git a/eth/rpc/backend/tx_info.go b/eth/rpc/backend/tx_info.go index f9817448a..ed0d45fee 100644 --- a/eth/rpc/backend/tx_info.go +++ b/eth/rpc/backend/tx_info.go @@ -167,6 +167,9 @@ func (r *TransactionReceipt) MarshalJSON() ([]byte, error) { if r.EffectiveGasPrice != nil { output["effectiveGasPrice"] = r.EffectiveGasPrice } + // delete deprecated (pre Byzantium) key which is always set to 0x and fails parsing within hardhat + delete(output, "root") + return json.Marshal(output) }