Files
hardhat/contracts/Counter.sol
2026-02-16 23:37:30 +01:00

16 lines
252 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
contract Counter {
uint256 public x;
function inc() public {
x++;
}
function incBy(uint by) public {
require(by > 0, "incBy: increment should be positive");
x += by;
}
}