Closed naszam closed 4 years ago
Hello @naszam,
It is hard to say what is the problem. I need a reproduction for this.
Maybe it is because comments are enabled on root level of contracts.
Best regards, Valerii Aligorskii.
Hi @RyuuGan,
I guess is due to the repetition of the SPDX comment introduced in solc v0.6.8, cause the contract is inheriting another contract with the same SPDX. See issue #8989 They compile on truffle but when I try to compile on Remix or Truffle the merged file I got the error. Is there a way to fix this? Thanks!
Kind regards, Nazzareno Massari
Found it! A way to fix this issue is to remove one SPDX comment from the merged file so it doesn't throw an error when compiling.
Hello @naszam,
To solve this problem I can introduce the previous behaviour, that comments from the root of the file (comments outside the structs, contracts and other exports) will not be added to.
Because this feature with comments have been asked for a long time and it was implemented in the latest release. So now I can make an options in sol-merger cli and API like removeRootComments
or something like this (not sure about the name yet). So you will not require to remove them manually.
sol-merger --removeRootComments contracts/*.sol
Best regards, Valerii Aligorskii
Hi @RyuuGan,
Yep! That would be great. For the name I would reccomend something like -spdx or -removeSPDX. Thanks!
Kind regards, Nazzareno Massari
Hello @naszam,
The feature should be available at version 3.1.0
.
Best regards, Valerii Aligorskii
Hi,
Trying to verify a contract on Etherscan via sol-merger, I run into this compiler warning:
Using: npm v13.13.0 sol-merger v3.0.1