Skip to content

Commit

Permalink
Handle fetching compiler for nightlies
Browse files Browse the repository at this point in the history
  • Loading branch information
kuzdogan committed Dec 15, 2022
1 parent 1267f21 commit cee9d72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions services/verification/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ export function findContractPathFromContractName(
* @returns stringified solc output
*/
export async function useCompiler(version: string, solcJsonInput: any) {
// For nightly builds, Solidity version is saved as 0.8.17-ci.2022.8.9+commit.6b60524c instead of 0.8.17-nightly.2022.8.9+commit.6b60524c.
// Not possible to retrieve compilers with "-ci.".
if (version.includes("-ci.")) version = version.replace("-ci.", "-nightly.");

This comment has been minimized.

Copy link
@cameel

cameel Dec 15, 2022

Member

To be clear, it's just some nightlies. Older ones (at the very least between 0.4.2 and 0.7.4) properly identified themselves as nightly and the ones we build now, since the end of November, should be doing that too.

We actually have a function called versionToSemver() in solc-js that's supposed to clean that mess. Though I think it won't handle those ci nightlies yet. We should actually update it to handle them so that you don't have to work around it on your side.

const inputStringified = JSON.stringify(solcJsonInput);
const solcPath = await getSolcExecutable(version);
let compiled: string | undefined;
Expand Down

0 comments on commit cee9d72

Please sign in to comment.