0

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:

data":"0x51695436376268536e49454f7249754a5a4f704477632f50654452354f355a35702f324d625172614c776f4734696c2f5249706871496378424936625375632f55776d614b354f766743646c575a744d34453365567a434c697362433967524563457a4b69544d6735666a554c366446686b56386361504577747135675a596d467a4b3972766467754576733969386d6e5134572f492b3565614836524e6974343554365731315a784173524c6a536a7970593773734d636f42396a49346e485067542f416546486f4d42376136374f4a42525369676847626379693134376d5072575375466f4a50566652364e3746672f43325536636e336c6e685548757876326378677257715850476372774e386551635270324b73714f572f4a46534443755052627644336c326376486448654d4278353538627257755a474d6f543668453538654a46774a785a3438417a55515131734f736f6663736f4d6242796c4f7369714b566f6d48426553686c5570614270516d746d5758492b7377335a76"

It appears in etherscan just as 0x.

UPDATE

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
0

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.