iT邦幫忙

2019 iT 邦幫忙鐵人賽

DAY 24
0
自我挑戰組

不緊張的私有鏈玩玩看實作系列 第 24

IT鐵人30天之Day 24

  1. 打開網頁後,右上方會有一些選項,選取run並選擇Web3 Provider,接著輸入剛才在終端機啟動時相同的PORT號,這次用的是8545。


  2. 輸入完成後,可以到run的欄位顯示本地節點的帳號資料。
  3. 之後選擇畫面左邊的程式的第一支,並把以下的程式碼複製後貼上。

pragma solidity ^0.4.7;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "./ballot.sol";

contract SimpleStorage {
   string storedData;
   
    function SimpleStorage (string x) public {
       storedData = x;
    }
    
    function set (string x) public {
        storedData = x;
    }
    
    function get () public constant returns (string) {
        return storedData;
    }
}

上一篇
IT鐵人30天之Day 23
下一篇
鐵人30天之Day 25
系列文
不緊張的私有鏈玩玩看實作30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言