// 按照solc官方文件的步驟,我們需要先讀取合約的code,再傳給solc進行編譯,最後輸出到console。
const fs = require('fs');
const path = require('path');
const solc = require('solc');
const contractPath = path.resolve(__dirname, '../contracts', 'pittToken.sol');
const contractSource = fs.readFileSync(contractPath, 'utf8');
const result = solc.compile(contractSource, 1);
console.log(result);