首页 > 其他 > 详细

go-ethereum开发问题

时间:2018-11-02 12:40:26      阅读:202      评论:0      收藏:0      [点我收藏+]

1. abigen 参考文档(Native DApps: Go bindings to Ethereum contracts)

abigen --sol token.sol --pkg token --lang go --out token.go
Trying to bind solidity with abigen command, results in this error:

Failed to build Solidity contract: solc: exit status 1
unrecognised option ‘--add-std‘
func (s *Solidity) makeArgs() []string {
    p := []string{
        "--combined-json", "bin,abi,userdoc,devdoc",
        "--add-std",  // include standard lib contracts
        "--optimize", // code optimizer switched on
    }
    if s.Major > 0 || s.Minor > 4 || s.Patch > 6 {
        p[1] += ",metadata"
    }
    return p
}
更新到新版的ethereum发现
func (s *Solidity) makeArgs() []string {
    p := []string{
        "--combined-json", "bin,abi,userdoc,devdoc",
        "--optimize", // code optimizer switched on
    }
    if s.Major > 0 || s.Minor > 4 || s.Patch > 6 {
        p[1] += ",metadata"
    }
    return p
}

解决




go-ethereum开发问题

原文:https://www.cnblogs.com/gregoryli/p/9895507.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!