You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling a .yul file, zksolc will name the contract with its source name vs the contract name on its output.
The latter is what is done with Solidity files and what solc does with yul, so any tools making the assumption that zksolc does the same may have unintended behavior or have to adapt ad hoc to this. Source file names in the input are often given as paths (for example in Foundry) so the contract name being a path instead of a raw string may also lead to unexpected behavior as well.
🔄 Reproduction Steps
Compile a contract via standard json with a yul file on it's input:
🐛 Bug Report
📝 Description
When compiling a
.yul
file,zksolc
will name the contract with its source name vs the contract name on its output.The latter is what is done with Solidity files and what
solc
does with yul, so any tools making the assumption thatzksolc
does the same may have unintended behavior or have to adapt ad hoc to this. Source file names in the input are often given as paths (for example in Foundry) so the contract name being a path instead of a raw string may also lead to unexpected behavior as well.🔄 Reproduction Steps
Compile a contract via standard json with a yul file on it's input:
sample input:
🤔 Expected Behavior
Output uses contract name as the field that contains the compilation result for the contract like
solc
. This is also the behaviour for Solidity files.Output for compiling the example with solidity:
Note that
Contract
is used for the compilation result of the contract😯 Current Behavior
File name is used for as the field that contains contract compilation results, instead of contract name:
The text was updated successfully, but these errors were encountered: