Last active
November 26, 2018 21:36
-
-
Save kevinbluer/224f98b7098d4a2c4b83f4c207cda130 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.0+commit.1d4f565a.js&optimize=false&gist=
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
pragma solidity ^0.4.19; | |
/// @title A simulator for Bug Bunny, the most famous Rabbit | |
/// @author Warned Bros | |
/// @notice You can use this contract for only the most basic simulation | |
/// @dev All function calls are currently implement without side effects | |
contract BugsBunny { | |
/// @author Bob Clampett | |
/// @notice Determine if Bugs will accept `(_food)` to eat | |
/// @dev String comparison may be inefficient | |
/// @param _food The name of a food to evaluate (English) | |
/// @return true if Bugs will eat it, false otherwise | |
function doesEat(string _food) external pure returns (bool) { | |
return keccak256(_food) == keccak256("carrot"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment