ethclient: use 'input', not 'data' as field for transaction input (#28078)

This commit is contained in:
Martin Holst Swende 2023-09-08 18:33:36 +02:00 committed by GitHub
parent 83886e40b6
commit 5cf53f51ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

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