question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

createdContractAddress intermittently shows a different contract address from the one deployed on the network

See original GitHub issue

createdContractAddress in txutils will sometimes show the correct contract address but sometimes show a different contract address from the one that actually gets deployed.

Any ideas on why this is happening? You can test it out on a private testnet and about 10-20% of the time the contract address does not match the one that gets deployed.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kumaviscommented, Dec 21, 2015

it doesnt - you need to fill in that info yourself

eth-lightwallet currently does not handle any persistence or network - this is a good thing as everyone has different solutions for this

0reactions
bitcoin4cashqccommented, Oct 15, 2017

@kumavis “it doesnt - you need to fill in that info yourself”

https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethsendtransaction

Only from is required. Using this code:

function sendEth() { var fromAddr = document.getElementById('addr').innerHTML var toAddr = document.getElementById('sendTo').value var valueEth = document.getElementById('sendValueAmount').value var value = parseFloat(valueEth)*1.0e18 web3.eth.sendTransaction({from: fromAddr, to: toAddr, value: value}, function (err, txhash) { console.log('error: ' + err) console.log('txhash: ' + txhash) }) }

It’s returning tx and eth sent, but it send to a random address? Multiple txs in geth console as well?

I’ve written here : https://stackoverflow.com/questions/46741374/web3-eth-sendtransaction-sending-to-random-address

Read more comments on GitHub >

github_iconTop Results From Across the Web

createdContractAddress intermittently shows a different contract ...
createdContractAddress intermittently shows a different contract address from the one deployed on the network.
Read more >
Recover ETH in a smart contract - solidity
I've seen this too many times already. This is a scam, unfortunately, the funds are lost. Only the scammer can retrieve those funds....
Read more >
Calling the set() function (with web3js) of a solidity contract is ...
When I call the contract's set() function, the resulting transaction is at a newly created contract address instead of the contract address ......
Read more >
HackPedia: 16 Solidity Hacks/Vulnerabilities, their Fixes and ...
This attack can occur when a contract sends ether to an unknown address. ... that the attacker has withdrawn all (bar 1) ether...
Read more >
ethereum/solidity - Gitter
If I have 4 contracts and one inherits from the others I don't need ... put a just created contract address onto the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found