编程惯例,先写个hello world
// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.8.26 and less than 0.9.0
pragma solidity ^0.8.26;
contract HelloWorld {
string public greet = "Hello World!";
}
pragma 指定了 Solidity 的编译器版本。
在Remix Lite上部署运行:
如下图,点击Deploy contract
点击Deploy contract后,显示greet的值
END