-
Notifications
You must be signed in to change notification settings - Fork 450
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
Unable to transfer contract balance to another account #538
Comments
Thanks for the issue report! |
Hi @Robbepop ! |
You should definitely update your ink! version to |
Done. And you are right, the bug is not fixed ;) |
I can't see any |
Argh, my bad, I sent you the working version with The Well, I changed the code logic to only transfer the amount transferred (leaving the endowment in the contract balance) and it works, the funds are correctly transferred 😃 So no problem. But maybe we can add some documentation about the transfer and the minimum balance ? Btw, is there any way to return the |
@LaurentTrk Unfortunately we don't have error forwarding yet, it's on the roadmap though! |
Thanks @cmichi for your answer and the docs improvement ! By any chance, do you have any tip on how to mock |
@LaurentTrk Here's an example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=871521ec0b23f6fb0c4facd1cc5ca420. Make sure to read the comment at the bottom, mocking is the only possibility at the moment, we hope to improve this in the future. |
Hi,
The
env.transfer()
seems not doing its job in my environment. The balance is not changed, neither in the contract nor in the destination account. No exception/panic is raised.I use it in a Ink contract, with something like :
Note : In the same contract, using the same
charity_pot
account, theenv.terminate_contract()
is correctly transferring the funds to the given account.Please let me know if you need additionnal informations. Thanks for your help !
Environment
Using
nightly-2020-08-23
andcargo-contract 0.7.0
on Ubuntu 20.04.The text was updated successfully, but these errors were encountered: