Open Danver97 opened 1 year ago
Hey, i fixed this issue in this branch: https://github.com/nikola-bozin-org/browser-solidity-compiler/tree/feature/fixing-web-runner
Example usage in react project:
import { solidityCompiler } from "../../browser-solidity-compiler/src/index";
const compile = async() =>{
const version = 'soljson-v0.8.20+commit.a1b79de6.js';
const result = await solidityCompiler({
version: `https://binaries.soliditylang.org/bin/${version}`,
contractBody: contractCode,
options:{optimizer:{enabled:true,runs:1000}}
})
return result;
}
Whenever I call
await solidityCompiler({ version:
https://binaries.soliditylang.org/bin/${version}, contractBody: content, options, })
The promise of any subsequent call won't resolve. It seems that the webworker do not respond anymore. Any clue of the cause?