Skip to content

Instantly share code, notes, and snippets.

View grantjoy's full-sized avatar
🔨
automating everything

Grant Joy grantjoy

🔨
automating everything
View GitHub Profile
@grantjoy
grantjoy / CoinFlip.sol
Last active July 19, 2023 21:13
Coin Flip Contract
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.18;
contract CoinFlip {
enum CoinSide {HEADS, TAILS, UNKNOWN}
CoinSide public winSide = CoinSide.UNKNOWN;
struct Bet {
uint256 amount;