Professional Documents
Culture Documents
TP 2
TP 2
TP 2
Tp N 2
❖ General questions
1) What are the different data types in Solidity, and how to define variables of those
types?
2) Why do we use Struct and Enum?
3) Write a function in Solidity.
4) Why do we use constructors?
5) What does mapping do?
6) Why do we use events?
7) What is the role of a modifier in a smart contract?
8) Why do we use Gas?
❖ Exercice 1
1) Write a smart contract that allows users to store and retrieve a value(simple
storage contract). Use remix for this question.
2) Write a smart contract that allows users to vote for their favorite singer, and add
tests. Use forge for this question.
.