Update ethclient.go

Reverting changes from v13 that broke smart contract function calls
This commit is contained in:
^Dan^ 2023-09-26 10:42:07 +02:00 committed by GitHub
parent 4985d83b8f
commit 81e17336ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -619,7 +619,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)