编译合约的时候报错了 前边还有一大堆乱码 编译的代码如下:
//导⼊solc编译器
let solc = require('solc') //0.4.25
let fs = require('fs')
//读取合约
let sourceCode = fs.readFileSync('./contracts/SimpleStorage.sol', 'utf-8')
// Setting 1 as second paramateractivates the optimiser
let output = solc.compile(sourceCode, 1)
console.log('output :', output)
module.exports = output['contract'][':SimpleStorage']