Created
August 5, 2022 01:47
-
-
Save Jesserc/8d5dbe40a2456ce214a7eea4cf5d0548 to your computer and use it in GitHub Desktop.
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract Enum { | |
enum Status { | |
Done, | |
AlmostDone, | |
Failed | |
} | |
Status public status = Status.AlmostDone; | |
function setStatus() public { | |
status = Status.Failed; | |
} | |
function set(Status _index) external returns (Status) { | |
return status = _index; | |
} | |
function reset() external { | |
delete status; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment