solidity: helloworld实现
刚学,先来个helloWeb3
编译器采用remix:https://remix.ethereum.org/
写一个helloworld合约:
新建一个文件:helloworld.sol:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
contract HelloWorldSolidity {
string public stringHelloSolidity = "Hello Solidity";
function HelloWeb3() public pure returns (string memory) {
return "Hello Web3";
}
}
编译:Auto compile打勾
部署:
部署以后:
点击HelloWeb3