Skip to content

Commit

Permalink
Merge branch 'master' into extend-node-interface
Browse files Browse the repository at this point in the history
  • Loading branch information
rachel-bousfield committed Apr 27, 2022
2 parents 22148c3 + 9ff50a5 commit 426875b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions graphql/graphql.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ func (t *Transaction) EffectiveGasPrice(ctx context.Context) (*hexutil.Big, erro
if header.BaseFee == nil {
return (*hexutil.Big)(tx.GasPrice()), nil
}
if t.backend.ChainConfig().IsArbitrum() {
return (*hexutil.Big)(header.BaseFee), nil
}
return (*hexutil.Big)(math.BigMin(new(big.Int).Add(tx.GasTipCap(), header.BaseFee), tx.GasFeeCap())), nil
}

Expand Down
1 change: 1 addition & 0 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1805,6 +1805,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha
if err != nil {
return nil, err
}
fields["effectiveGasPrice"] = hexutil.Uint64(header.BaseFee.Uint64())
info, err := types.DeserializeHeaderExtraInformation(header)
if err != nil {
log.Error("Expected header to contain arbitrum data", "blockHash", blockHash)
Expand Down

0 comments on commit 426875b

Please sign in to comment.