一、Hello world
// SPDX-License-Identifier: MIT //输入license的版本,MIT表公开的 // compiler version must be greater than or equal to 0.8.17 and less than 0.9.0 pragma solidity ^0.8.17; //也可以写成>0.8.13 <0.9.0 contract HelloWorld { //定义一个叫 HelloWorld的合约 string public greet = "Hello World!"; //greet为变量名 }
二、