hackquest logo

Slinea

Game your way into web3

视频

描述

Slinea App

Welcome to the Slinea App!

This application allows users to connect their wallets and play a game(P2E), luck-based game on the linea blockchain.

Features

Wallet Integration: Connect your wallet to the app using thirdweb walletconnect to enable you to play the game.

Game play: Play the game and get double of bet amount.

Claim wins: Players can withdraw tokens earned, Users can play unlimited game, Winners get double of the bet amount

##Prerequisites

Node.js (v18 or later)

-Yarn or npm

A Web3 wallet(preferably Metamask)

Getting Started

To get started with the Slinea App, follow these steps:

Clone the Repository: Clone this repository to your local machine using:

git clone https://github.com/Afoxcute/slinea.git

Install Dependencies: Navigate to the project directory and install dependencies using npm or yarn:

cd slinea

npm i --force

**Configuration

If you prefer to use your own credentials

You can install dotenv(npm i dotenv --force).

create a .env file in the root directory and add your configuration details:

Example of the credentials you can put in the .env are:

CLIENT_ID=

CONTRACT_ADDRESS=

Run the Development Server: Start the development server to run the app locally:

npm start or yarn start

Open the App: Once the server is running, open your web browser and navigate to http://localhost:3000 to view the app.

Usage

Connect Wallet: Use your metamask to connect to the BSC blockchain

Game Play: Click on the play button to play the game

Game Play: Choose bet amount, bet type and click play

Game Play: Click on the play button to play the game

Users can choose if they want to bet with ROCK, PAPER or SCISSORS

After clicking on PLAY, there is a timer for the house to determine if they want to choose ROCK, PAPER or SCISSORS.

If the bet type is the same with the user bet type, the user wins but if it is not the user lose

Author's Comment The game winner/loser feature works seamlessly on the localhost during development. However, I have experienced some difficulties after hosting the application, If you have issues running the game, Installing dependencies etc, I advice you convert it to js or use the js version on the repository. I am actively working to resolve these issues and appreciate your patience.

CONTRACTS DEPLOYED

https://explorer.sepolia.linea.build/address/0xb8FEA2F4bfFf8801C367EEAfb8241E9f46a99936

https://explorer.sepolia.linea.build/address/0x9889Ad62269F29569205db8c52eC6c27731C11F1



队长
AAfolabi Ifeoluwa
赛道
DeFiGameFiSocialFi