Odak modu

Smart Contract Development with Solidity

Modifiers

Code from video: https://solidity-by-example.org/function-modifier/ 

You can access the video content in Turkish prepared by İTÜ Blockchain here: https://www.youtube.com/watch?v=58MDeT4hoig&list=PLby2HXktGwN4Cof_6a8YwlMrboX8-hs73&index=9&t=2s 

Modifiers can be used to change the behaviour of functions in a declarative way. For example, you can use a modifier to automatically check a condition prior to executing the function. Modifiers are code that can be run before and / or after a function call.

Modifiers can be used to:

  • Restrict access
  • Validate inputs
  • Guard against reentrancy hack

When reading the code of a smart contract, you will see multiple types of modifiers. These modifiers help control the visibility and usability of the connected function or variable:

  • External - Functions that will be called by outside contracts. These functions can not be called internally.
  • Internal - Functions that are only accessed only within the contract in which it is declared or any connected contracts.
  • Public - Functions and variables that can be called both internally and externally by outside contracts.
  • Private - Functions and variables that can only be called in the contract in which it is declared. These functions cannot be called by connected contracts either.

Resources:

You can find detailed further information from Solidity Official documentation (in English):

https://docs.soliditylang.org/en/v0.8.15/contracts.html#function-modifiers


Background Pattern
Birlikte öğrenelim

Sektörde en çok aranan yazılım becerilerini kazan

Yapay zeka desteği, birebir mentörlük saatleri, canlı dersler ve senin için özel hazırlanmış içeriklerle eksiklerini tamamla, düzenli geri bildirimler al ve öğrenme sürecini en verimli hale getir.

Yunus Emre Kabakcı

Patika+ mezunu

Patika+ Fullstack Web Development Bootcamp mezunumuz Yunus Emre,

3 ay içinde Katar’dan aldığı teklif ile, global bir şirket olan Pavo Group’da işe başladı!


“İçerik zenginliği, mentor desteği, ileriye dönük bir network sağlaması ve dünyada en çok tercih edilen frameworkler üzerinden bir eğitim veriyor olması Patika+’ı tercih etmemin temel sebepleri oldu!“

Test

Yorumlar

Yorum yapabilmek için derse kayıt olmalısın!