- // SPDX-License-Identifier: GPL-3.0
-
- pragma solidity >=0.4.16 < 0.9.0;
-
- contract SimpleStorage {
- uint storedData;
- // 修改 x 值的方法
- function set(uint x) public
- {
- storedData = x;
- }
- // 查询 x 值的方法
- function get() public view returns (uint)
- {
- return storedData;
- }
- }
-