Skip to content

0xv1bh4/dapp-tictactoe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum Smart Contract Game with Solidity, Foundry, and React.js

Overview

This project implements a simple game on the Ethereum blockchain using Solidity for the smart contract, Foundry for development, and React.js for the user interface (UI). The game allows users to connect their wallets via Metamask, create or join a game, and bet ERC-20 tokens. The game is designed for two players, and the winner takes the total bet amount. If the game ends in a draw, the bet amount is returned to each player.

Flow

Game Flow

Features

  • Wallet Integration: Users can connect their Ethereum wallets directly through the UI using Metamask.
  • Game Creation: Users can create a new game by specifying the ERC-20 token contract address and the bet amount.
  • Join Game: Other users can join an existing game by choosing the bet amount and the same ERC-20 tokens.
  • Gameplay: The game requires two players. The winner takes the total bet amount, or if it's a draw, the bet amount is returned to each player.
  • Token Transfer: The smart contract manages the transfer of ERC-20 tokens securely.

Project Structure

  • Smart Contract: Built using Solidity with Foundry for developing, testing, and deploying the game logic and token handling.
    You can view the smart contract code in this repository.

  • Frontend: Developed with React.js for creating the UI.

Prerequisites

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors