You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lessons/projects/1.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -288,11 +288,11 @@ contract WAGMI {
288
288
289
289
In Solidity , there are 3 types of variable visibility modifiers that a developer can use :
290
290
291
-
-**Public**: If a state variable visibility is marked as `public` then those variables can be used within the smart contract and can be accessed by other contracts as well.Compilers automatically generates functions to read its value when calling the contract, they are called 'getter' functions
291
+
-**Public**: If a state variable visibility is marked as `public` then those variables can be used within the smart contract and can be accessed by other contracts as well.Compilers automatically generates functions to read its value when calling the contract, they are called 'getter' functions.
292
292
293
-
-**Internal**: A state variable with a`internal` visibility can only be accessed within the smart contract and its derived contracts. It can *NOT* be accessed externally. This is the default for state variables when no visibilty is specified.
293
+
-**Internal**: A state variable with an`internal` visibility can only be accessed within the smart contract and its derived contracts. It can *NOT* be accessed externally. This is the default for state variables when no visibilty is specified.
294
294
295
-
-**Private**: When a state variable visibility is marked as `private`then it means , that it is only meant to be used within the defined smart contract . No derived contract can read a variable with a variable with a `private` visibility.
295
+
-**Private**: When a state variable visibility is marked as `private` it is only meant to be used within the defined smart contract . No derived contract can read a variable with a `private` visibility.
296
296
297
297
<ContentCalloutemoji='💡'size='md'variant='info'>
298
298
While private and internal are not readable or modifiable from other contracts, its values are set on a public blockchain, making its values visible from the outside world.
0 commit comments