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

deploy_tester_contract() does not reveal the error message #1329

Open
pirapira opened this issue Oct 29, 2019 · 4 comments
Open

deploy_tester_contract() does not reveal the error message #1329

pirapira opened this issue Oct 29, 2019 · 4 comments
Labels
efforts: a few days hack P1 urgent, blocker, or makes life easier forever

Comments

@pirapira
Copy link
Contributor

When deploy_tester_contract() causes a require() failure, deploy_tester_contract() raises an exception, but the exception does not contain the error message in require().

This issue keeps track of fixing deploy_tester_contract() so that it raises an exception with the error message.

@pirapira pirapira added P1 urgent, blocker, or makes life easier forever efforts: a few hours hack labels Oct 29, 2019
@pirapira pirapira self-assigned this Oct 31, 2019
@pirapira
Copy link
Contributor Author

This is because contract.constructor().transact() does not fire an informative exception. Does anybody asking for that feature in web3.py?

@pirapira
Copy link
Contributor Author

The documentation of Web3.py does not mention what happens when the transaction fails for some reasons https://web3py.readthedocs.io/en/stable/contracts.html#web3.contract.Contract.constructor.

@pirapira
Copy link
Contributor Author

It's not special because it's a constructor. I was just using transact() not call().

pirapira added a commit to pirapira/raiden-contracts that referenced this issue Oct 31, 2019
This commit modifies `deploy_tester_contract()` so it raises
an exception with a message with failed `require()`s.

Before this commit, `deploy_tester_contract()` did not raise an
exception when the deployment failed for a `require()` condition.

This solves raiden-network#1329.
pirapira added a commit to pirapira/raiden-contracts that referenced this issue Oct 31, 2019
This commit modifies `deploy_tester_contract()` so it raises
an exception with a message with failed `require()`s.

Before this commit, `deploy_tester_contract()` did not raise an
exception when the deployment failed for a `require()` condition.

This solves raiden-network#1329.
pirapira added a commit to pirapira/raiden-contracts that referenced this issue Oct 31, 2019
This commit modifies `deploy_tester_contract()` so it raises
an exception with a message with failed `require()`s.

Before this commit, `deploy_tester_contract()` did not raise an
exception when the deployment failed for a `require()` condition.

This solves raiden-network#1329.
@pirapira
Copy link
Contributor Author

Web3.py's ContractConstructor does not have call() method. It takes time to solve this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
efforts: a few days hack P1 urgent, blocker, or makes life easier forever
Projects
None yet
Development

No branches or pull requests

1 participant