Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/// SPDX-License-Identifier: Apache-2.0

interface IPause {
function paused() external view returns (bool);
}

contract increment_with_pause {
IPause private instance pauseContract;
uint32 private instance count;

error PausedError();

constructor(IPause _pause) {
pauseContract = _pause;
}

function increment() public returns (uint32) {
if (pauseContract.paused()) {
revert PausedError();
}

count += 1;
return count;
}
}

contract pause {
bool private instance _isPaused;

function paused() public view returns (bool) {
return _isPaused;
}

function set(bool p) public {
Comment on lines +30 to +37
_isPaused = p;
}
}
Loading