Skip to content

Commit 92266b0

Browse files
authored
fix "Code: -32600, Message: Invalid request" when using with hardhat node (#268)
1 parent 77841e1 commit 92266b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jsonrpc/transport/http.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ func (h *HTTP) Call(method string, out interface{}, params ...interface{}) error
4343
return err
4444
}
4545
request.Params = data
46+
} else {
47+
request.Params = []byte{'[', ']'}
4648
}
4749
raw, err := json.Marshal(request)
4850
if err != nil {

0 commit comments

Comments
 (0)