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

How to debug the failure transaction to a contract? #15721

Closed
wcw84 opened this issue Dec 20, 2017 · 3 comments
Closed

How to debug the failure transaction to a contract? #15721

wcw84 opened this issue Dec 20, 2017 · 3 comments

Comments

@wcw84
Copy link

wcw84 commented Dec 20, 2017

Hi all,
I am new to the ethereum contract, and want to learn how to debug a contract.
I have sent a transaction to my contract, and it failed. From the https://etherscan.io/tx/0x20a79ec615ca8c4668016624e83b82ffc1a54f61b90f05e0e531fda29fc0b4d1, it just failed and without any error information. So is there any way to know why it failed?
How can I debug it?
Any help will be appreciated.

@veox
Copy link
Contributor

veox commented Dec 20, 2017

There are no sources published for the contract in question, so it's hard to say.

The tx does fail fairly early on (only 1459 gas consumed above the minimum 21000), so likely input invalid or insufficient permissions.


Also, this issue is completely unrelated to go-ethereum - suggest closing.

@wcw84
Copy link
Author

wcw84 commented Dec 21, 2017

@veox Thanks, Veox, in fact I have the source, and there are several "require" statements in the contract call, so I can guess one of the require failed and the call is reverted. But is there anyway to debug which line or statement of the contract failed, just like we debug in Javascript or other language?

Thanks.

@wcw84 wcw84 closed this as completed Dec 21, 2017
@veox
Copy link
Contributor

veox commented Dec 21, 2017

Directly - not yet, pending ethereum/solidity#1686.

You should be able to step it through a debugger, like the one in Remix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants