I'm using geth client and the "personal_sendTransaction" method for sending a transaction. I need to add some comment to the transaction. How I can do this? I've tried to put a hex string into the data raw but transaction is sent without my comment being included.

For example, when I add the data row:


It appears in etherscan just as 0x.


It was my mistake in the code. It simple to send an arbitrary data in data row. You just need to write hex String into data param of personal_sendTransaction method.

This is my tx: https://etherscan.io/tx/0x86081299634081ff8b654dfb55b8a89e8b03946fb6a6a3d42d464168d90a818c

  • 2
    But look at this transaction etherscan.io/tx/… How they put that big string? – Andr1i Jul 10 '18 at 9:08
  • Ok, geth has a personal.sendTransaction() command. The extremely long "input data" field shown in Etherscan is only in the case of the transaction deploying a contract. It is nothing but the contract ABI. This is variable in length and is constructed from the contract definition. – Bharat Mallapur Jul 10 '18 at 11:11
  • In Etherscan, you can view the input data field as UTF-8 by clicking the button "View Input As" and selecting "UTF-8". This'll show you the source of the contract. – Bharat Mallapur Jul 10 '18 at 11:14
  • 1
    Look at this transaction: etherscan.io/tx/… in this case it is not a contract. How does they put simple string? – Andr1i Jul 11 '18 at 9:09
  • If you hover on the Input Data field in the Etherscan page, you will see a prompt "The binary data that formed the input to the transaction, either the input data if it was a message call or the contract initialisation if it was a contract creation". So turns out, the input data field is also usable when a "message call" is performed. This post ethereum.stackexchange.com/a/12081/20155 might help you understand difference between a transaction and a message better. – Bharat Mallapur Jul 11 '18 at 9:39

I have two back-end servers. One of them interact with geth and on that server I've forgotten add the field data in the params of personal_sendTransaction. I identified that by sending curl with the data field directly to geth. And geth accepts any data in the hex format.

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.