The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

1

The difference is in the input. You pay a fee for every byte in the input data. Zero bytes are cheaper. First tx has a zero byte d1cde79209c0d871e6bb93c58344007991a382ee75fc0e4b016486be3c195595 Second doesn't d494db4db43f7d40fc919665c4935441e05a2fac218738a2e1e217afaaaeb1e7 From Yellow paper Appendix G "Fee Schedule" Gtxdatazero, 4, Paid for every ...


0

I believe the issue is this line: web3.utils.toWei(web3.utils.toWei("0.00000001", "ether")) The inner call to web3.utils.toWei returns "10000000000". The outer call defaults to ether as a unit, so it multiplies that by 10**18 again, and you get "10000000000000000000000000000", which is 10,000,000,000 ether, certainly more than you have. Drop the outer ...


0

you can try web3-hdwallet-provider to sign transactions for addresses derived from a 12-word mnemonic. const Web3 = require('web3'); const Web3HDWalletProvider = require('web3-hdwallet-provider'); const httpProvider = new Web3.providers.HttpProvider('InfuraUrl'); const mnemonic = 'YOUR PRIVATE KEY'; const web3 = new Web3HDWalletProvider(mnemonic, ...


-1

Please check this Truffle console It allows call functions of smart contracts directly from your console.


0

Most ethereum nodes will put tx's from a particular address into a queue, with increasing unique nonces. tx's with larger nonces will not be sent as long as tx's with smaller nonces are pending. In the past, when I was able to run my own geth node and submit tx's to that, occasionally pending tx's would get stuck forever like you describe on mainnet or ...


0

To get access to the private key for using web3.js or pyethereum, uou need to export it from Metamask, by clicking the "..." next to the account name, choose "Account Settings" and scrolling down until you see a box labeled "Private Key". Use that as the key variable in the pyethereum example above, and be careful not to remove it afterwards and not to share ...


1

Infura is a public hosted node. It has no way to unlock your local accounts. Even if there was a way, it would be a security risk because anyone can connect to the same node and transfer your funds. In order to send a transaction over Infura you will need to sign the transaction locally using web3.eth.sendRawTransaction(). The following example is from the ...


Top 50 recent answers are included