diff --git a/rpc/types.go b/rpc/types.go index 0789a99017..806c9c8a43 100644 --- a/rpc/types.go +++ b/rpc/types.go @@ -83,7 +83,11 @@ func newHexData(input interface{}) *hexdata { d.data = input.Bytes() } case *big.Int: - d.data = input.Bytes() + if input == nil { + d.isNil = true + } else { + d.data = input.Bytes() + } case int64: d.data = big.NewInt(input).Bytes() case uint64: