Categories
Cryptocurrency Ethereum Mastering Development

How to make sign tx for erc20 token transfer?

How can I make an erc20 token transfer in node, I know to transfer eth is like this for using ethers. Lib: let privateKey = “0x3141592653589793238462643383279502884197169399375105820974944592” let wallet = new ethers.Wallet(privateKey) console.log(wallet.address) // “0x7357589f8e367c2C31F51242fB77B350A11830F3” // All properties are optional let transaction = { nonce: 0, gasLimit: 21000, gasPrice: utils.bigNumberify(“20000000000”), to: “0x88a5C2d9919e46F883EB62F7b8Dd9d0CC45bc290”, // … or supports […]

Categories
Cryptocurrency Ethereum Mastering Development

How can I set my custom gas Price and gas Limit?

I want to set my custom gas and gas Price in sendTransaction method.Currently I set it but when i send the transaction gas fee is showing 0.21 ETH in metamask. How can I solve this? web3.eth.sendTransaction({ from: currentAccount, to: toAddress, value: web3.toWei(value, ‘ether’), gasPrice: web3.toWei(“0.00001” , ‘ether’), gasLimit: ‘21000’, chainId: ‘0x1’ } Above is my […]