Share:
Notifications
Clear all

Earn While Learning Web3 Programming>> Start Here FREE!!!

[Solved] Intro To Modifier In Solidity - Web3 Programming

1 Posts
1 Users
2 Reactions
623 Views
1
Topic starter

EXERCISE:
i. Summarize what you understand about Modifier in this forum (you can post code also with the summary if you which - it optional with code)

 

 

 

NOTE:

This Is An Exercise From Our FREE Smart Contract Development With Solidity For Beginners Course (If you have not enrolled yet, you can join the course totally for FREE).

 

 

1 Answer
1
Topic starter

Modifier is used to add restrictions or permissions on functions in solidity. It is also the first code to be executed before the rest of the function code block is executed.

 

Modifier is solidity is written as:

 

modifier modifierName() {

//your code here

_; //this is a must to ensure the function code to which is attache run after the code in your modifier

}

Share: