smart_contract
smart_contract copied to clipboard
Check that calls on external contracts did what we expected
When calling functions in other contracts we make assumptions about what happens there, e.g. with our calls:
Token(token).transfer(msg.sender, amount) Token(token).transferFrom(msg.sender, this, amount)
We should check after these calls, if what we expected actually happened, e.g. after Token(token).transferFrom(msg.sender, this, amount) we expect amount more tokens in our contract than before.