Skip to content

Commit

Permalink
Download solc compiler when not found in cache
Browse files Browse the repository at this point in the history
  • Loading branch information
IAvecilla committed Aug 27, 2024
1 parent 7f6da78 commit ca6b3cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions system-contracts/scripts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ export async function getSolcLocation(): Promise<string> {

const solcVersion = hre.config.solidity.compilers[0].version;

if (!await downloader.isCompilerDownloaded(solcVersion)) {

Check failure on line 210 in system-contracts/scripts/utils.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `await·downloader.isCompilerDownloaded(solcVersion` with `(await·downloader.isCompilerDownloaded(solcVersion)`

Check failure on line 210 in system-contracts/scripts/utils.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `await·downloader.isCompilerDownloaded(solcVersion` with `(await·downloader.isCompilerDownloaded(solcVersion)`

Check failure on line 210 in system-contracts/scripts/utils.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `await·downloader.isCompilerDownloaded(solcVersion` with `(await·downloader.isCompilerDownloaded(solcVersion)`
console.log(`Compiler ${solcVersion} not found, downloading...`);
await downloader.downloadCompiler(solcVersion, async () => false, async () => false);

Check failure on line 212 in system-contracts/scripts/utils.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `solcVersion,·async·()·=>·false,·async·()·=>·false` with `⏎······solcVersion,⏎······async·()·=>·false,⏎······async·()·=>·false⏎····`

Check failure on line 212 in system-contracts/scripts/utils.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `solcVersion,·async·()·=>·false,·async·()·=>·false` with `⏎······solcVersion,⏎······async·()·=>·false,⏎······async·()·=>·false⏎····`

Check failure on line 212 in system-contracts/scripts/utils.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `solcVersion,·async·()·=>·false,·async·()·=>·false` with `⏎······solcVersion,⏎······async·()·=>·false,⏎······async·()·=>·false⏎····`
}

return (await downloader.getCompiler(solcVersion))!.compilerPath;
}

Expand Down

0 comments on commit ca6b3cb

Please sign in to comment.