Skip to content

Commit

Permalink
fix eth_estimateGas panic (#1708)
Browse files Browse the repository at this point in the history
* fix eth_estimateGas panic

* move catch to DecodeTxn
  • Loading branch information
owahlgren committed Jul 11, 2023
1 parent 6e5cd75 commit 62148c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jsonrpc/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ func GetNextNonce(address types.Address, number BlockNumber, store nonceGetter)
}

func DecodeTxn(arg *txnArgs, store nonceGetter) (*types.Transaction, error) {
if arg == nil {
return nil, errors.New("missing value for required argument 0")
}
// set default values
if arg.From == nil {
arg.From = &types.ZeroAddress
Expand Down

0 comments on commit 62148c1

Please sign in to comment.