Skip to content

Commit 46d19cf

Browse files
authored
fix(evm): improved marshalling of the eth tx receipt (#2220)
* fix(evm): improved marshaling of the eth tx receipt * chore: changelog
1 parent dd53fda commit 46d19cf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Simplify GitHub actions based on conditional paths, removing the need for files
5353
- [#2068](https://github.com/NibiruChain/nibiru/pull/2068) - feat: enable wasm light clients on IBC (08-wasm)
5454
- [#2217](https://github.com/NibiruChain/nibiru/pull/2217) - fix: app-db-backend not recognized on prune command
5555
- [#2219](https://github.com/NibiruChain/nibiru/pull/2219) - fix(evm): disable unprotected tx check in EVM ante handler
56+
- [#2220](https://github.com/NibiruChain/nibiru/pull/2220) - fix(evm): improved marshaling of the eth tx receipt
5657

5758
## [v2.0.0-p1](https://github.com/NibiruChain/nibiru/releases/tag/v2.0.0-p1) - 2025-02-10
5859

eth/rpc/backend/tx_info.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,11 @@ func (r *TransactionReceipt) MarshalJSON() ([]byte, error) {
167167
if r.EffectiveGasPrice != nil {
168168
output["effectiveGasPrice"] = r.EffectiveGasPrice
169169
}
170+
// original marshalling of gethcore.Receipt omits type field
171+
output["type"] = hexutil.Uint64(r.Type)
172+
170173
// delete deprecated (pre Byzantium) key which is always set to 0x and fails parsing within hardhat
171174
delete(output, "root")
172-
173175
return json.Marshal(output)
174176
}
175177

@@ -288,6 +290,8 @@ func (b *Backend) GetTransactionReceipt(hash gethcommon.Hash) (*TransactionRecei
288290
} else {
289291
receipt.EffectiveGasPrice = (*hexutil.Big)(dynamicTx.EffectiveGasPriceWeiPerGas(baseFeeWei))
290292
}
293+
} else {
294+
receipt.EffectiveGasPrice = (*hexutil.Big)(txData.GetGasPrice())
291295
}
292296
return &receipt, nil
293297
}

0 commit comments

Comments
 (0)