HelloWorld合约

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
contract helloworld{
function helloWorld() public pure returns (string memory) {
return "Hello, World!";
}
}

发行代币
在闲鱼,淘宝上买些测试币,也可以通过水龙头获取(只是有点要求和门槛,不如直接买),这里我买了两笔

新建合约文件

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MyError20Token is ERC20{
constructor(string memory _name,string memory _symbol) ERC20(_name,_symbol){
_mint(msg.sender,10000 * 10 ** 18);
}
}



