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.js

15 lines
383 B

#!/usr/bin/env node
const solc = require('solc-js');
var sourceCode = process.argv[2];
var version = process.argv[3];
var optimize = process.argv[4];
var compiled_code = solc.loadRemoteVersion(version, function (err, solcSnapshot) {
if (err) {
console.log(JSON.stringify(err));
} else {
console.log(JSON.stringify(solcSnapshot.compile(sourceCode, optimize)));
}
});