Answers for "solc assert.js:339 throw err"

0

solc assert.js:339 throw err

// Format of compile.js for higher version of solc is different

const path = require('path');
const fs = require('fs');
const solc = require('solc');



const helloPath = path.resolve(__dirname, 'contracts', 'hello.sol');
const source = fs.readFileSync(helloPath, 'UTF-8');

var input = {
    language: 'Solidity',
    sources: {
        'hello.sol' : {
            content: source
        }
    },
    settings: {
        outputSelection: {
            '*': {
                '*': [ '*' ]
            }
        }
    }
}; 
console.log(JSON.parse(solc.compile(JSON.stringify(input))));
Posted by: Guest on June-11-2021

Code answers related to "solc assert.js:339 throw err"

Browse Popular Code Answers by Language