Search code examples
xcodesoliditypragma

I have just started coding and when I type Pragma solidity >=0.6.0 <0.9.0; it gives me error. I couldn't know how to do it right, where's my problem?


I have just started learn coding and I couldn't know something that when I type Pragma solidity >=0.6.0 <0.9.0; it gives me error. I couldn't know how to do it right :(

Thank you so much in advance :) Hala


Solution

  • Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: " to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see spdx.org for more information.

    It's a warning unrelated to the pragma statement.

    The compiler recommends you to state a license under which you want others to use your code.

    It should be placed on the first line, before the pragma statement.

    // SPDX-License-Identifier: UNLICENSED
    pragma solidity >=0.6.0 <0.9.0;