Common patterns and best practices for writing assertions
getCallInputs
, can be variable, due to unknown lengths of the call inputs.
We are actively working to improve this as soon as possible. Staying mindful of gas consumption is in general a good practice.
Some of the patterns below can be used to keep gas consumption low.
forkPreState()
and forkPostState()
to compare valuesgetStateChanges()
or getCallInputs()
to inspect the entire callstackforkPreState()
and forkPostState()
to check if the owner changedgetStateChangesAddress()
to inspect all owner changes in the callstackgetCallInputs()
to track all function calls that modify the mappingph.forkPreState()
nor ph.forkPostState()
are used the state is ph.forkPostState()
by default.