1.任何浏览器开启Remix
2.代币合约范例,Ethereum 官网有提供一个最小可行的代币合约(MINIMUM VIABLE TOKEN):
pragma solidity ^0.5.1;
contract MyToken {
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
/* Initializes contract with initial supply tokens to the creator of the contract */
constructor (uint256 initialSupply) public {
balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens
}
/* Send coins */
function transfer(address _to, uint256 _value) public {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
require(balanceOf[_to] + _value >= balanceOf[_to