Skip to content

Instantly share code, notes, and snippets.

@zenkodr
Created September 5, 2023 02:51
Show Gist options
  • Select an option

  • Save zenkodr/3bc7030fb3c63042c2f726f3bad3c5dc to your computer and use it in GitHub Desktop.

Select an option

Save zenkodr/3bc7030fb3c63042c2f726f3bad3c5dc to your computer and use it in GitHub Desktop.
MetaCrafters introduction to Solidity first challenge
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