diff --git a/pkg/eth/api.go b/pkg/eth/api.go index 120ede1d..9b10e7fc 100644 --- a/pkg/eth/api.go +++ b/pkg/eth/api.go @@ -623,6 +623,7 @@ func (pea *PublicEthAPI) localGetTransactionReceipt(ctx context.Context, hash co "contractAddress": nil, "logs": receipt.Logs, "logsBloom": receipt.Bloom, + "effectiveGasPrice": (*hexutil.Big)(receipt.EffectiveGasPrice), } // Assign receipt status or post state. diff --git a/pkg/eth/api_test.go b/pkg/eth/api_test.go index c543ab72..186acaf1 100644 --- a/pkg/eth/api_test.go +++ b/pkg/eth/api_test.go @@ -150,6 +150,7 @@ var ( "logs": test_helpers.MockReceipts[0].Logs, "logsBloom": test_helpers.MockReceipts[0].Bloom, "status": hexutil.Uint(test_helpers.MockReceipts[0].Status), + "effectiveGasPrice": (*hexutil.Big)(big.NewInt(100)), } expectedReceipt2 = map[string]interface{}{ "blockHash": blockHash, @@ -164,6 +165,7 @@ var ( "logs": test_helpers.MockReceipts[1].Logs, "logsBloom": test_helpers.MockReceipts[1].Bloom, "root": hexutil.Bytes(test_helpers.MockReceipts[1].PostState), + "effectiveGasPrice": (*hexutil.Big)(big.NewInt(200)), } expectedReceipt3 = map[string]interface{}{ "blockHash": blockHash, @@ -178,6 +180,7 @@ var ( "logs": test_helpers.MockReceipts[2].Logs, "logsBloom": test_helpers.MockReceipts[2].Bloom, "root": hexutil.Bytes(test_helpers.MockReceipts[2].PostState), + "effectiveGasPrice": (*hexutil.Big)(big.NewInt(150)), } )