-
Notifications
You must be signed in to change notification settings - Fork 424
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
debug_println!
doesn't work in #[ink(constructor)]
#821
Comments
Might it be possible that this is not an ink! related issue but resides in the contracts pallet instead? I cannot see a reason atm why constructors and messages would behave different in ink!. Do you? |
Nope, it was also my intuition that an investigation would probably lead to the Does @athei maybe have an immediate hunch if this could be caused by the |
AFAIK no UI dry-runs the constructor as RPC before deploying. Remember: Debugging is not enabled during on-chain execution. Only during RPC calls. |
Ok, but in principle it's possible to do a dry-run of the constructor, right? Then I would create follow-ups for the UI's. |
Yes. This functionality was added somewhat recently. |
Things left to do for this ticket:
If it happens in none of those we can close this issue. |
Closing as the bug no longer appears on ink! 4.1 |
To reproduce one can use the
contract-transfer
example. Just modify the constructor in this way:Start the
canvas-node
this way:If you deploy and interact with the contract the
debug_println!
's in the#[ink(message)]
's will show up on the console, but not the one from the constructor.Note that #820 needs to be merged to reproduce this.
The text was updated successfully, but these errors were encountered: