Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
blockscout/apps/explorer/priv/compile_solc_standard_json_...

15 lines
401 B

#!/usr/bin/env node
var inputJSONFilePath = process.argv[2];
var compilerVersionPath = process.argv[3];
var solc = require('solc')
var compilerSnapshot = require(compilerVersionPath);
var solc = solc.setupMethods(compilerSnapshot);
var fs = require('fs');
var input = fs.readFileSync(inputJSONFilePath, 'utf8');
const output = JSON.parse(solc.compile(input))
console.log(JSON.stringify(output));