Created
September 5, 2023 02:51
-
-
Save zenkodr/3bc7030fb3c63042c2f726f3bad3c5dc to your computer and use it in GitHub Desktop.
MetaCrafters introduction to Solidity first challenge
This file contains hidden or 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
| pragma solidity 0.8.21; | |
| contract MyContract { | |
| uint256 public num; | |
| string public text; | |
| address public myAddress; | |
| bool public isTrue; | |
| function setNum(uint256 _num) public returns (uint256) { | |
| num = _num; | |
| return num; | |
| } | |
| function setText(string memory _text) public returns (string memory) { | |
| text = _text; | |
| return text; | |
| } | |
| function setAddress(address _address) public returns (address) { | |
| myAddress = _address; | |
| return myAddress; | |
| } | |
| function setBool(bool _bool) public returns (bool) { | |
| isTrue = _bool; | |
| return isTrue; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment