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 data = gntContract.transfer('0x28F5A446c7B8f1Ac8B88B874Da92AbDe344085AD', 2);

let rawTransaction = {
     "gasPrice":web3.toHex(20* 1e9),
     "data": data.getData(),

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.