0

i want to call my erc20 token smartcontract with eth.raw transaction. suppose i want to call .transfer("0x0",500) and send with web3.eth.rawTranscation so where can i add this call function?

rawTx : { nonce: nonceHex, gasPrice: gasPriceHex, gasLimit: gasLimitHex, data: hexdata, from: creating_address, value: valuehex };

0

2 Answers 2

1

Maybe this'll help: https://gist.github.com/raineorshine/c8b30db96d7532e15f85fcfe72ac719c What you're doing is creating a new transaction object with your rawTx (I use ethereumjs-tx), signing it with a private key which you need to pass with Buffer, and then serializing and sending it.

1
  • Link only answer are not recommended, if the link target is deleted, server is down or removed it will become useless. It is better to include the main details in your answer and only use the link to expand them.
    – Ismael
    Mar 13, 2019 at 2:15
0

I did not find any command like eth.rawTransaction in web3js version 1.0.0. but you can use web3.eth.sendsignedTransaction() command for token transfer. for more info check link https://web3js.readthedocs.io/en/1.0/web3-eth.html#id65

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