mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-23 01:28:01 +00:00
Pack resolc.wasm and resolc.js to resolc_packed.js
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
const { compile } = require('./revive.js');
|
||||
const { compile } = require("./revive.js");
|
||||
|
||||
const compilerStandardJsonInput = {
|
||||
language: 'Solidity',
|
||||
sources: {
|
||||
'MyContract.sol': {
|
||||
content: `
|
||||
language: "Solidity",
|
||||
sources: {
|
||||
"MyContract.sol": {
|
||||
content: `
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity ^0.8.0;
|
||||
contract MyContract {
|
||||
@@ -13,26 +13,26 @@ const compilerStandardJsonInput = {
|
||||
}
|
||||
}
|
||||
`,
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
optimizer: {
|
||||
enabled: true,
|
||||
runs: 200,
|
||||
},
|
||||
outputSelection: {
|
||||
"*": {
|
||||
"*": ["abi"],
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
optimizer: {
|
||||
enabled: true,
|
||||
runs: 200,
|
||||
},
|
||||
outputSelection: {
|
||||
'*': {
|
||||
'*': ['abi'],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
async function runCompiler() {
|
||||
let output = await compile(compilerStandardJsonInput)
|
||||
let output = await compile(compilerStandardJsonInput);
|
||||
console.log("Output: " + output);
|
||||
}
|
||||
|
||||
runCompiler().catch(err => {
|
||||
console.error('Error:', err);
|
||||
runCompiler().catch((err) => {
|
||||
console.error("Error:", err);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user