Skip to main content

changes_state

Function changes_state 

Source
fn changes_state(result: &TestResult) -> bool
Expand description

Returns whether a test makes a successful plain call, which can change the callee’s state, into a contract other than the test, the cheatcodes of any network, and the console. A test that does not, such as an empty one, one that only reads, or one whose calls all revert, passes whatever the target does. The tests run in another process, so the network’s own list of cheatcode addresses is not at hand.