Solidity
This chapter describes the Solidity language and development environment.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
contract Counter {
uint256 count;
constructor(uint256 _count) {
count = _count;
}
function get() public view returns (uint256) {
return count;
}
function inc() public {
count += 1;
}
function dec() public {
count -= 1;
}
}