Last active
March 30, 2019 10:17
-
-
Save zlumer/b2f1f6e50c4c4240bb24eaf5a4af4cdb to your computer and use it in GitHub Desktop.
web3 transfer tx generation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tx = (nonce, gasPrice, to, amount) => ({ | |
nonce: Web3.utils.toHex(nonce), | |
gasPrice: Web3.utils.toWei(gasPrice.toString(), 'gwei'), | |
gasLimit: "0x5208", | |
to, | |
value: Web3.utils.toWei(amount.toString()), | |
data: "0x", | |
chainId: 1 | |
}) |
Author
zlumer
commented
Mar 30, 2019
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment