Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

oz verify fails when using binary solc (instead of solc.js) #1551

Open
shark0der opened this issue Jun 5, 2020 · 1 comment
Open

oz verify fails when using binary solc (instead of solc.js) #1551

shark0der opened this issue Jun 5, 2020 · 1 comment

Comments

@shark0der
Copy link

When oz verify sends the post request to etherscan, it sends the compiler version as well. In oz source code there's this line:

const compiler = `v${compilerVersion.replace('.Emscripten.clang', '')}`;

const compiler = `v${compilerVersion.replace('.Emscripten.clang', '')}`;

What it tries to do is to remove the suffix from the version, but it wrongly assumes that we're using solc.js. In my case, the version is 0.5.17+commit.d19bba13.Linux.g++ and it was sending that verbatim to etherscan.

Dropping .Linux.g++ solved the issue and the verification went through succesfully:

const compiler = `v${compilerVersion.replace('.Emscripten.clang', '')}`.replace('.Linux.g++', '');

As a side note, oz verify shows up a false warning:

A regular instance of TokenMock was found. Verification of regular instances is not yet supported.

The verification went through despite the warning.

@abcoathup
Copy link
Contributor

Hi @shark0der! I’m sorry that you had this issue.

Thanks so much for reporting it! The project owner will review and triage this issue during the next week.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants