我最终通过使用他们规定的编译器解决了我自己在 eris 链上的问题。但是我似乎找不到像 web3 中提供的那样的 js 编译器。在 ubuntu 上安装 eris 编译器
sudo apt-get install golang
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
go get github.com/eris-ltd/eris-compilers/cmd/eris-compilers
sudo add-apt-repository ppa:ethereum/ethereum
sudo add-apt-repository ppa:ethereum/ethereum-dev
sudo apt-get update
sudo apt-get install lllc sc solc
sudo apt-get install solc
编译源码
eris-compilers --debug compile -s -u compilers.monax.io -p 10120 idi.sol
编译后的产品将是这样的:
ngzhongqin@server2:/prodlib/ERIS/.eris/apps/idi-service$ eris-compilers --
debug compile -s -u compilers.monax.io -p 10120 idi.sol
Cached Item(s) cached?=false
Could not find cached object, compiling...
Response abi=[{"constant":true,"inputs":[],"name":"getName","outputs":[{"name":"retVal","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"retVal","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"setName","outputs":[],"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_name","type":"string"}],"name":"SetName","type":"event"}]
bin=6060604052610399806100126000396000f360606040526000357c01000000000000000000000000000000000000000000000000000000009004806317d7de7c1461005a57806360fe47b1146100d55780636d4ce63c146100ed578063c47f00271461011057610058565b005b61006760048050506102dd565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156100c75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100eb6004808035906020019091905050610166565b005b6100fa6004805050610174565b6040518082815260200191505060405180910390f35b6101646004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091905050610186565b005b806000600050819055505b50565b60006000600050549050610183565b90565b8060016000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101d557805160ff1916838001178555610206565b82800160010185558215610206579182015b828111156102055782518260005055916020019190600101906101e7565b5b5090506102319190610213565b8082111561022d5760008181506000905550600101610213565b5090565b50503373ffffffffffffffffffffffffffffffffffffffff167f5b55a57845097b0b4cf682f6d089fe6bad81dc28242927eca133f4b1c4d28b448260405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156102cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390a25b50565b602060405190810160405280600081526020015060016000508054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561038a5780601f1061035f5761010080835404028352916020019161038a565b820191906000526020600020905b81548152906001019060200180831161036d57829003601f168201915b50505050509050610396565b9056
name=IdisContractsFTW
ngzhongqin@server2:/prodlib/ERIS/.eris/apps/idi-service$