// SPDX-License-Identifier: ISC pragma solidity ^0.8.20; /// Smoke-test contract: a counter with an event, a view, a revert path and a registry call from its constructor. interface IDeveloperRegistry { function register(address account, address payee) external; } contract Counter { uint256 public count; event Incremented(address indexed by, uint256 newCount); constructor(address registry, address payee) { if (registry != address(0)) { IDeveloperRegistry(registry).register(address(this), payee); } } function increment(uint256 by) external returns (uint256) { require(by > 0, "Counter: zero"); count += by; emit Incremented(msg.sender, count); return count; } function hashLoop(uint256 rounds) external pure returns (bytes32 h) { for (uint256 i = 0; i < rounds; i++) { h = keccak256(abi.encodePacked(h, i)); } } }