ethclient: fix invalid params in eth_call, made ethclient support other EVMs network

This commit is contained in:
Nguyễn Hải Hoàng 2023-12-29 17:03:34 +07:00
parent 09e0208029
commit b4b240f3d8

View file

@ -647,7 +647,7 @@ func toCallArg(msg ethereum.CallMsg) interface{} {
"to": msg.To,
}
if len(msg.Data) > 0 {
arg["input"] = hexutil.Bytes(msg.Data)
arg["data"] = hexutil.Bytes(msg.Data)
}
if msg.Value != nil {
arg["value"] = (*hexutil.Big)(msg.Value)