Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You can lose money by accidentally calling contract functions on an address with no contract. #1789

Closed
ghost opened this issue Jul 18, 2017 · 3 comments · Fixed by #5283
Closed
Labels
area-provider Relating to the provider module. type-bug

Comments

@ghost
Copy link

ghost commented Jul 18, 2017

var contract = web3.eth.contract(abi).at(address_you_or_your_app_thinks_has_contract_but_actually_doesn't);
contract.function_that_costs_gas_to_execute(... // wastes money
@ghost ghost changed the title You can lose money calling contract functions on an address with no contract. You can lose money by accidentally calling contract functions on an address with no contract. Jul 18, 2017
@ghost
Copy link
Author

ghost commented Jul 18, 2017

Partial solution:

web3.eth.getCode(address_with_no_contract) // "0x0"
web3.eth.getCode(address_with_contract) // always not just "0x0"?

@2-am-zzz 2-am-zzz added type-bug P3-soon area-provider Relating to the provider module. labels Jul 25, 2017
@levino
Copy link

levino commented Jun 7, 2018

related dethcrypto/TypeChain#50

@levino
Copy link

levino commented Jun 7, 2018

Can anyone tell me where I should have a look in order to fix this? Where is this string being composed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-provider Relating to the provider module. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants