File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ The companion to the Youtube tutorials
25
25
- [ Learning Solidity : Tutorial 20 Parameter Mapping and Multiple Return Values] ( https://www.youtube.com/watch?v=v3aoiTh-UVQ )
26
26
- [ Learning Solidity : Tutorial 21 Truffle, Atom and TestRPC] ( https://www.youtube.com/watch?v=YcTSilIfih0 )
27
27
- [ Learning Solidity : Tutorial 22 Developing an ICO/Crowdsale with TDD] ( https://www.youtube.com/watch?v=Cow_aL7NUGY )
28
+ - [ Learning Solidity : Tutorial 23 State Modifiers] ( https://www.youtube.com/watch?v=RKos31UueqY )
28
29
29
30
### Support
30
31
Original file line number Diff line number Diff line change
1
+ pragma solidity ^ 0.4.0 ;
2
+
3
+ contract StateModifiers {
4
+ uint private constant varConstantValue = 55 ;
5
+ uint private stateValue;
6
+
7
+ function stateAccess () public returns (uint ) {
8
+ stateValue = 10 ;
9
+ return stateValue;
10
+ }
11
+
12
+ function constantAccess () public constant returns (uint ) {
13
+ return block .number ;
14
+ }
15
+
16
+ function viewAccess () public view returns (uint ) {
17
+ return stateValue;
18
+ }
19
+
20
+ function pureAccess () public pure returns (uint ) {
21
+ return varConstantValue;
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments