0

I have a question concerning the data parameter of the json RPC method eth_sendTransaction.

Is it possible to send any kind of data structure with this method to a smart contract?

Is it possible to store the data send with this method on the blockchain then, by storing it in a variable within the smart contract code?

I am asking because when we can send any external data to the client, why the need of oracle's?

Jwf
  • 3
  • 1

1 Answers1

0

No, the data parameter needs to get the function selector (Example) and encoded arguments if needed when calling a method of a smart contract. It isn't used for like sending a custom string saying "Hi there" or so which then could be stored in a variable!

=> Have a look here under "Execute a Function on a Deployed Contract"

eth_sendTransaction() parameters

Parameters to call a function with eth_sendTransaction()

Paulus
  • 410
  • 1
  • 6
  • 21