Solidity
이 장에서는 Solidity 언어와 개발환경에 대해서 설명합니다.
// 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;
}
}