Skip to content

Instantly share code, notes, and snippets.

@totiz
Created May 15, 2019 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save totiz/3add2b1f8ff11291d2d6532bdfae9643 to your computer and use it in GitHub Desktop.
Save totiz/3add2b1f8ff11291d2d6532bdfae9643 to your computer and use it in GitHub Desktop.
// Sign ด้วย Private key
const signedTx = await web3.eth.accounts.signTransaction(rawTransaction, privateKey)
console.log('Signed Transaction', signedTx)
const receipt = await web3.eth.sendSignedTransaction(signedTx.rawTransaction)
console.log("Transaction receipt: ", receipt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment