smartcontractkit / full-blockchain-solidity-course-js

Learn Blockchain, Solidity, and Full Stack Web3 Development with Javascript
11.94k stars 2.89k forks source link

SPDX license identifier error #6330

Open NaeemulHannan opened 7 months ago

NaeemulHannan commented 7 months ago

Lesson

Lesson 2

Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")

https://www.youtube.com/watch?v=gyMwXuJrbJQ

Operating System

Windows

Describe the bug

As soon as i add the "SimpleStorage.sol" file, I get an error that highlights "SimpleStorage.sol" in red and says SPDX license identifier not provided in source file. I dont understand this issue

Neet-savaliya commented 6 months ago

You can try this !!

Add a solidity line on top of contract

// SPDX-License-Identifier: MIT
TravCrypto commented 6 months ago

Yes @Neet-savaliya shared the solution above.

helalmerchan commented 4 months ago

Paste this code on top of your solidity contract // SPDX-License-Identifier: MIT

OR Paste this code // SPDX-License-Identifier: UNLICENSED

SwarnenduG07 commented 3 months ago

Paste this code on top of your solidity contract AND DEFINE THE PRAGMA SOLIDITY VERSION // SPDX-License-Identifier: MIT