Undeclared identifier
error when outputSelection
is the single target contract but compiles with outputSelection : *
#13985
Labels
closed due inactivity
The issue/PR was automatically closed due to inactivity.
needs investigation
stale
The issue/PR was marked as stale because it has been open for too long.
Description
When compiling contracts, Sourcify looks at the
settings.compilationTarget: { contracts/Mycontract.sol: MyContract }
of the metadata and only asks that target contract to be output by the compiler in theoutputSelection
:unlike hardhat and truffle which output all contracts unless a target file is given
We received a contract Sourcify wasn't able to compile because of this difference, but could be compiled with frameworks and deployed.
To my understanding, a difference in the
outputSelection
should not affect the compilation as the inputs are not changed. Therefore I believe this might be a bug.Noting that we encountered a bug before because of the same reason, i.e. how we specify the
outputSelection
: #12932Environment
v0.6.5+commit.f956cc89
istanbul
Steps to Reproduce
The standard JSON used by Sourcify:
https://gist.github.com/marcocastignoli/6011093fdab16749fe316597b6289424#file-standard-sourcify-json
Compile:
./solc-macosx-amd64-v0.6.5+commit.f956cc89 --standard-json standard-sourcify.json
gives the output with errors:
If you change the
outputSelection
to the following, it compiles successfully:Contract repo: https://github.com/CryptoBlades/cryptoblades/tree/production
Commit hash of the deployed contract:
a7180afc8bfdc74a5450cc1c6362cafd627a0f26
Target contract:
BurningManager.sol
Additional background info about the issue: ethereum/sourcify#928
The text was updated successfully, but these errors were encountered: