0

I'm trying to make a sendTransaction json rpc call and I don't know how to calculate the data paramether.

From the documentation:

data: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI

There is no specification how this should be made: the hash of the invoked method signature and encoded parameters

0

Yes, there's an Application Binary Interface Specification

The Application Binary Interface is the standard way to interact with contracts in the Ethereum ecosystem, both from outside the blockchain and for contract-to-contract interaction. Data is encoded according to its type, as described in this specification. The encoding is not self describing and thus requires a schema in order to decode.

There are several questions here about it:

|improve this answer|||||
  • Yeah but I'm not trying to communicate with a contract just a simple eth transfer.. – Tadej Vengust Mar 28 '18 at 7:11
  • That is really easy, data should be empty. – Ismael Mar 28 '18 at 14:24
  • So its an none optional paramether but it has to be empty? – Tadej Vengust Mar 29 '18 at 18:23
  • 1
    Sorry, I didn't express myself correctly, I meant it can be empty. Usualy an empty data is enough, but you can embed any string there. Some application use data to embed a transaction id for example. – Ismael Mar 29 '18 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.