TP 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Master: Distributed Information Systems Engineering and Security

Teacher: Mrs. LOUDINI Souad


Subject: Blockchain for finance and banks

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.
.

You might also like