return effectiveGasPrice in GetTransactionReceipt

This commit is contained in:
i-norden 2023-04-01 12:52:20 -05:00 committed by Roy Crihfield
parent db4bd5183e
commit ec6707c6ab
2 changed files with 4 additions and 0 deletions

View File

@ -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.

View File

@ -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)),
}
)