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
{{ message }}
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
When the name of a Solidity file is a Cairo reserved word, the Scarb.toml that is created for the output uses the name of the file as the name of the manifest, but Cairo keywords are not allowed for this.
[package]
name = "assert"
version = "1.0.0"
(other stuff)
This test fails on cairo compilation phase with the error message: Expected function, found module in every place there was a call to an assert function in the cairo code.
Suggestion:
Changing the name of the file obviously prevents this issue. However, users shouldn't have to worry about the name of the file, specially when this is not a problem on the Solidity side. If the name of the file is a word that's not allowed we should mangle the name on the output files
The text was updated successfully, but these errors were encountered:
When the name of a Solidity file is a Cairo reserved word, the
Scarb.toml
that is created for the output uses the name of the file as the name of the manifest, but Cairo keywords are not allowed for this.As an example, there is a test: https://github.com/NethermindEth/warp/blob/cairo-1.0/tests/compilation/contracts/errorHandling/assert.sol
The name of the file is
assert.sol
and so the Scarb file created looks like:This test fails on cairo compilation phase with the error message:
Expected function, found module
in every place there was a call to anassert
function in the cairo code.Suggestion:
Changing the name of the file obviously prevents this issue. However, users shouldn't have to worry about the name of the file, specially when this is not a problem on the Solidity side. If the name of the file is a word that's not allowed we should mangle the name on the output files
The text was updated successfully, but these errors were encountered: