Adversary Actions in ContractModel report a validation error.
locallycompact opened this issue · comments
Hi, in this paragraph in the documentation it reads:
One way to mitigate this problem is to add additional ‘attack’ endpoints to the contract under test, that carry out a variety of conceivable attacks. Our contract model would then model these attack actions as no-ops, to represent the fact that the attacks fail; our tests would then check that the attacks fail in all circumstances, and with all parameters.
I have tried to do this noop approach with a simple NFT contract where an adversary tries to mint more than one of the same TokenName here:
This doesn't work though, since the validation failure kills the contract instance and fails the test anyway.
Steps to reproduce the behavior
Describe the approach you would take to fix this
You need to catch the errors in the attacker
Contract endpoint. The assumption is that crashing endpoints is bad.
Also, your properties appear to be failing because the slot numbers don't match between the model and the emulator - fixing this will help with some failures.
Closing. Reopen if the problem persists.