Skip to content

Commit

Permalink
Merge pull request METADIUM#39 from cp-yoonjin/dev
Browse files Browse the repository at this point in the history
internal/ethapi: changed 'gasPrice' data type to BigInt ('GetTransactionReceipt' RPC API).
  • Loading branch information
wm-jsong1230 authored Apr 4, 2023
2 parents f743022 + 39534ad commit 5d99937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1667,14 +1667,14 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha
}
// Assign the effective gas price paid
if !s.b.ChainConfig().IsLondon(bigblock) {
fields["effectiveGasPrice"] = hexutil.Uint64(tx.GasPrice().Uint64())
fields["effectiveGasPrice"] = tx.GasPrice()
} else {
header, err := s.b.HeaderByHash(ctx, blockHash)
if err != nil {
return nil, err
}
gasPrice := new(big.Int).Add(header.BaseFee, tx.EffectiveGasTipValue(header.BaseFee))
fields["effectiveGasPrice"] = hexutil.Uint64(gasPrice.Uint64())
fields["effectiveGasPrice"] = gasPrice
}
// Assign receipt status or post state.
if len(receipt.PostState) > 0 {
Expand Down

0 comments on commit 5d99937

Please sign in to comment.