0
0
Blockchain / Solidityprogramming~10 mins

SPDX license and pragma version in Blockchain / Solidity - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the SPDX license identifier.

Blockchain / Solidity
// SPDX-License-Identifier: [1]
pragma solidity ^0.8.0;
Drag options to blanks, or click blank then click option'
AMIT
BGPL-3.0
CApache-2.0
DBSD-3-Clause
Attempts:
3 left
💡 Hint
Common Mistakes
Using a license identifier that is not recognized by SPDX.
Forgetting to include the SPDX license line at the top of the file.
2fill in blank
medium

Complete the code to specify the Solidity compiler version pragma.

Blockchain / Solidity
pragma solidity [1]0.8.17;
Drag options to blanks, or click blank then click option'
A>=
B~
C^
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong symbol that allows incompatible compiler versions.
Omitting the pragma version line.
3fill in blank
hard

Fix the error in the SPDX license identifier line.

Blockchain / Solidity
// SPDX-License-Identifier: [1]
pragma solidity ^0.8.0;
Drag options to blanks, or click blank then click option'
AMIT License
BMIT
Cmit
DMIT-License
Attempts:
3 left
💡 Hint
Common Mistakes
Writing the license name in lowercase.
Adding extra words like 'License' or hyphens.
4fill in blank
hard

Fill both blanks to specify a license and a compatible pragma version.

Blockchain / Solidity
// SPDX-License-Identifier: [1]
pragma solidity [2]0.8.12;
Drag options to blanks, or click blank then click option'
AApache-2.0
B~
C^
DGPL-3.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using an invalid license identifier.
Using a wrong symbol for the pragma version.
5fill in blank
hard

Fill all three blanks to specify the SPDX license, pragma version, and a fixed compiler version.

Blockchain / Solidity
// SPDX-License-Identifier: [1]
pragma solidity [2]0.8.10;
pragma solidity [3]0.8.10;
Drag options to blanks, or click blank then click option'
AGPL-3.0
B>=
C==
DMIT
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid SPDX license strings.
Using incorrect symbols for pragma version constraints.