Cryptocurrency Ethereum Mastering Development

problem help me gas * price + value

i see all topic , but yet not slove my problem . please help me <pre> var EthereumTx=require(‘ethereumjs-tx’).Transaction const Web3=require(‘web3’) const web3 = new Web3(‘‘) const account1=’0xbd77caf08fe49d3f5aef6f83fc23b8d2129b468f’ const main = async () => { const count = await web3.eth.getTransactionCount(‘0xxxxxxxxxxxxxxxf5aef6f83fc23b8d2129b468f’); const nonce = web3.utils.toHex(count); const block = await web3.eth.getBlock(‘latest’); const gasLimit = web3.utils.toHex(3000000) const gasPrice = […]

Cryptocurrency Development Ethereum

accceptOwnership Tx “Returned error: nonce too low”, though getTransactionCount(account) gives a nonce that looks ok

Could anyone let me know what is wrong with the code below? Before executing the below code, transferOwnership(newOwner) went through successfully. And then, I execute the below code, “Error: Returned error: nonce too low. getTransactionCount(newOwner) returns ‘0x7’. Metamask account has been also altered to the new owner. myContract.methods.newOwner().call() .then((newOwner)=>{ var txAcceptOwnership=myContract.methods.acceptOwnership(); var encodedTx = txAcceptOwnership.encodeABI(); […]