-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
349fb36
commit 601a16b
Showing
4 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
Submodule test
deleted from
16acd8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.13; | ||
|
||
contract readable{ | ||
|
||
uint public age = 25; | ||
|
||
string public name = "Mahith"; | ||
|
||
function incrementAge() public view returns(uint){ | ||
return age+1; | ||
} | ||
|
||
function getName() public view returns(string memory){ | ||
return string.concat(name,"!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.13; | ||
|
||
contract writable{ | ||
|
||
uint public age = 25; | ||
|
||
string public name = "Mahith"; | ||
|
||
function incrementAge() public view returns(uint){ | ||
return age+1; | ||
} | ||
|
||
function getName() public view returns(string memory){ | ||
return string.concat(name,"!"); | ||
} | ||
|
||
function changeAge(uint newAge) public { | ||
age = newAge; | ||
} | ||
|
||
function changeName(string memory newName) public { | ||
name = newName; | ||
} | ||
} |