There are multiple SPDX licenses into my token smart contract, UNLICENSED and MIT(due to Openzeppelin contracts).
When i flattened the token contract, which license should i use?
Because only one SPDX license is acceptable.
As far as I can tell flattening is incompatible with multiple licenses.
You can find relevant discussion here:
Thanks for your reply but Etherscan API only supports single file verification.
If i have multiple solidity files(which i have), how can i verify contract source code from frontend?
Without flattening of course...
"Contracts that use "imports" will need to have the code concatenated into one file as we do not support "imports" in separate files."
The Etherscan API definitely supports verifying multiple files. You should submit the JSON input for the Solidity compiler.
Thanks but when i have multiple files/imports which JSON Input should i submit?
Every abstract contract or library etc. has their own JSON file after the compile process...
I'm confused about this part...
If you can give me a basic example i'll be grateful !!
You are probably looking at the output JSON artifacts. The JSON input is just one. If you're using Hardhat, it's located under
artifacts/build-info in the
input field of each build info file.
Thank you very much I figured it out with your help!