I'm trying to figure out how to withdraw money from the contract within a smartpy entrypoint, and test the result in my scenario.
When I test the entrypoint:
@sp.entry_point def withdraw(self, amount): sp.set_type(amount, sp.TMutez) sp.sender.transfer(amount)
I don't see the balance change in the scenario after the endpoint successfully executed when I check the contract.balance with sp.verify or scenario.show(c1.balance) or scenario.verify(c1.balance == sp.tez(...))
This was a solidity translation and the expression seems to work and run okay but it's not doing what I expect.
How can I withdraw from the contract or transfer contract balance to an account address in my smartpy entrypoint?