<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    狼愛上貍

    我胡漢三又回來了

    truffle里的solc版本與實際solc版本沖突的問題

    1.因為solc@0.5.1出現調用簡單運算合約出現返回0的問題,所以把solc降到了0.4.22。
    2.安裝truffle后,npm install -g truffle,版本有所不同:
    PS C:\> truffle version
    Truffle v5.0.24 (core: 5.0.24)
    Solidity v0.5.0 (solc-js)
    Node v10.16.0
    Web3.js v1.0.0-beta.37
    3.建立簡單合約Greeter.sol后,利用truffle compile后,出現:
    Error: CompileError: ParsedContract.sol:1:1: ParserError: Source file requires different compiler version (current compiler is 0.5.8+commit.23d335f2.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
    pragma solidity ^0.4.24;
    ^----------------------^

    Compilation failed. See above.
    4.修改truffle-config.js文件:
    module.exports = {
    // Uncommenting the defaults below
    // provides for an easier quick-start with Ganache.
    // You can also follow this format for other networks;
    // see <http://truffleframework.com/docs/advanced/configuration>
    // for more details on how to specify configuration options!
    /*
    networks: {
    development: {
    host: "127.0.0.1",
    port: 7545,
    network_id: "*"
    },
    test: {
    host: "127.0.0.1",
    port: 7545,
    network_id: "*"
    }
    }
    */
    compilers: {
    solc: {
    version: "0.4.24"
    }
    }
    };
    5.再次編譯,出現
    /C/users/administrator/webstormprojects/testtruffle/contracts/Migrations.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.24+commit.e67f0147.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
    pragma solidity >=0.4.25 <0.6.0;
    ^------------------------------^
    6.打開Migrations.sol文件,
    把pragma solidity >=0.4.25 <0.6.0;
    修改為:pragma solidity >=0.4.24 <0.6.0;
    編譯通過。

    posted on 2019-06-25 09:05 狼愛上貍 閱讀(2094) 評論(0)  編輯  收藏 所屬分類: Blockchain

    主站蜘蛛池模板: 日本媚薬痉挛在线观看免费| 无遮免费网站在线入口| 亚洲国产电影av在线网址| 青草久久精品亚洲综合专区| 日韩免费一级毛片| 色噜噜噜噜亚洲第一| 免费a级毛片无码av| 一边摸一边爽一边叫床免费视频 | 亚洲精品在线免费观看| 永久免费在线观看视频| 亚洲午夜电影在线观看| 成人免费无遮挡无码黄漫视频| 亚洲精品天堂成人片AV在线播放 | 亚洲另类激情专区小说图片| 日韩电影免费在线观看网址| 国产午夜亚洲精品国产成人小说| 国产美女视频免费观看的网站| 亚洲成av人片天堂网| 老汉精品免费AV在线播放| 亚洲av永久综合在线观看尤物| 成年女人午夜毛片免费视频| 小说区亚洲自拍另类| 国产AV无码专区亚洲AV男同| 永久看日本大片免费35分钟| 亚洲a∨国产av综合av下载 | 久久久久久久91精品免费观看| 亚洲精品无码成人片久久不卡| 亚洲AV中文无码乱人伦| 国产va在线观看免费| 国产.亚洲.欧洲在线| 亚洲国产V高清在线观看| 亚洲免费观看视频| 中文字幕精品三区无码亚洲| 亚洲视频一区二区| 1000部无遮挡拍拍拍免费视频观看| 亚洲色精品VR一区区三区| 亚洲最大激情中文字幕| 一个人看www在线高清免费看| 日韩成人毛片高清视频免费看| 亚洲视频精品在线| 免费一级毛片不卡不收费|