热门

最新

红包

立Flag

投票

同城

我的

发布
guguu1
guguu1
3 年前
trueguguu1

mark chatgpt

@Hann Yang:与chatGPT的第一次亲密接触
http://t.csdn.cn/0SfnT
欢迎点赞,奉上小小红包

…全文
chatGPT
拼手气红包 33.33元
CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
【开发合约编译脚本】const fs = require('fs');const solc = require('solc');const path = require('path');const compiled path = path.resolve(_dirname,'../contracts','name.sol');fs.removeSync(compiledPath);fs.ensureDirSync(compiledPath);const contract path = path.resolve(_dirname',../comtracts','name.sol');const contractSource = fs.readFile(contractPath,'utf-8');let compileResult = solc.compile(contractSource,1);if(Array.is Array(compileResult.error)&&compileResult.errors.length){ throw new error(compileResult.errors.length.errors[0]);}Object.keys(result.contracts) forEach(name=>{ let contractName = name.replace('/^:/,''); let filePath = path.resolve(_dirname,'../compiled',`${contractName}.json); console log("Saving JSON file to",filePath);});加油!
立即登录