Move @parity/resolc from js-revive (#296)

- Move npm package from paritytech/js-revive 
- Rename package to `@parity/resolc`
This commit is contained in:
PG Herveou
2025-04-30 17:24:52 +02:00
committed by GitHub
parent f6a412eef4
commit e07d0f0cb7
49 changed files with 940 additions and 75 deletions
+38
View File
@@ -0,0 +1,38 @@
const { compile } = require("./revive.js");
const compilerStandardJsonInput = {
language: "Solidity",
sources: {
"MyContract.sol": {
content: `
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
contract MyContract {
function greet() public pure returns (string memory) {
return "Hello";
}
}
`,
},
},
settings: {
optimizer: {
enabled: true,
runs: 200,
},
outputSelection: {
"*": {
"*": ["abi"],
},
},
},
};
async function runCompiler() {
let output = await compile(compilerStandardJsonInput);
console.log("Output: " + output);
}
runCompiler().catch((err) => {
console.error("Error:", err);
});