Eth101:Remix Solidity浏览器编译环境

in #remix6 years ago

Remix是Solidity语言在线编译和运行环境(IDE),地址是:
http://remix.ethereum.org/

remix-11.png
打开后,区域1是文件浏览区域,通过上面的+创建文件(不用担心保存问题,文件会一直在浏览器中)。
区域2是代码区,可以直接写入,比如一个智能合约hello2.sol:

pragma solidity ^0.4.18;
contract hello2 {
    string public greeting;
    address public speaker;
    uint32 public times;
    function hello2(string _greeting) public {
        greeting = _greeting;
        speaker = msg.sender;
        times = 0;
    }
    function say() constant public returns (string) {
        times ++;
        return greeting;
    }
    function getTimes() constant public returns (uint32) {
        return times;
    }
}

区域3是编译、运行、调试区,当前是编译结果(compile按钮),下面还有运行情况:
remix-12.png
区域4是日志区,显示运行的详细记录。

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.033
BTC 69450.75
ETH 3678.92
USDT 1.00
SBD 3.81