0

I'm trying to sign a transaction offline and then send it using sendRawTransaction since I'm connected to an Infura node. My raw transaction looks like this

let rawTransaction = { "from":address, "gasPrice":web3.toHex(20* 1e9), "gasLimit":web3.toHex(210000), "to":gntAddress, "value":"0x0", "data": data.getData(), "nonce":web3.toHex(nonce) };

and the data is a function let data = gntContract.transfer('0x28F5A446c7B8f1Ac8B88B874Da92AbDe344085AD', 2); However, the error is pointing to the .transfer function, stating that eth_sendTransaction is not a function. How can I sign and send a function with web3 using Infura this way? I'm then using ethereumjs-tx to sign the transaction but obviously I'm not even getting to that point.

Your Answer

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

Browse other questions tagged or ask your own question.