I looked for if eth_sendTransaction method enables me to realize what I'm asking, but I couldn't find sure information, so I want to make sure.

params: [{ "from": "One account ", "to":"another one ", "gas": "0x76c0", // 30400 "gasPrice": "0x9184e72a000", // 10000000000000 "data":"augur's abi" "value":"whatever " }]

So will the call work as I want?

| improve this question | | | | |

That's not particularly close. :-)

  • to should be the address of the token contract, since that's the recipient of the function invocation.
  • value should be 0. (It's the amount of ether sent.)
  • data should be the hexadecimal representation of the first four bytes of the keccak256 hash of the function signature (transfer(address,uint256)) followed by the address of the recipient, left-padded to be 32 bytes long, followed by the amount to be transferred, again encoded as a 32-byte integer.

Of course, there are libraries (including web3.js) that will compute the data for you given the ABI and parameters.

| improve this answer | | | | |
  • So how can I send augur from one account to the other via JSON-RPC Api? – Ryu Nishida Mar 1 '18 at 7:18
  • I already told you in great detail in my answer. – user19510 Mar 1 '18 at 7:20
  • Sorry I kinda misread.in brief, I can send token using the transfer method in the eth_sendTransaction method,right? my English ability is not perfect that's why I'm making it sure.Sorry – Ryu Nishida Mar 1 '18 at 10:39
  • Yes, that's right. – user19510 Mar 1 '18 at 10:52

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.