Skip to content

Solidity smart-contracts for a fully on-chain hyper-casual gaming platform!

License

Notifications You must be signed in to change notification settings

Pedrojok01/SmartContracts-GamingPlatform

Repository files navigation

Web3 Gaming Platform

Stargazers Issues MIT License LinkedIn

Description

Smart-contracts to build a whole casual games platform, including a factory allowing anyone to create new games. Many features can still be added, this is just meant to be a good starting point.

Features:

The whole idea is to handle as many things as possible onchain, while generating as little transations as possible. All datas are updated in batches (every hours, twice a day, ...). Withdrawals from players are sent once per day, players are require to submit a request, then all requests are processed at once every day.

  • Factory contract for any publishers to add games (handle all games)
  • Game contract handling players score and stats (per game)
  • Payment manager
  • Weekly tournament reward + distribution
  • NFT collection whitelist for additionnal perks

Contracts addresses on Polygon Mumbai:

You can check the deployed contract at:

RewardStructure:

0xbc02b46612aC64bdf3ABD0682e8E109B4bf30803

LevelLib:

0xdcE9B772A42e1b0190Ab5c147AA2329c05f3b146

GameFactory:

0xd1c20e5d8e8cc48eCC0a6CB47CB7346061c77b48

PaymentManager:

0xA928Cb89535E19EB435E2369Be319f1f59De7Cd6

Built With

  • solidity
  • hardhat
  • ethers.js
  • typescript
  • prettier
  • ESLint

Installation

1. Make sure you have the following ready:

2. Once your config is ready, create a new repo, open your favorite code editor, and clone the repo with the following cmd:

git clone https://github.com/Pedrojok01/Web3-Gaming-Platform.git .

3. Install all package dependancies by running:

yarn install

4. Test the smart-contracts by running:

yarn test

5.Deploy your own smart-contracts:

Edit the deployment scrits scripts/depoy.ts then edit the network on which you want to deploy the platform line 21 in package.json

"deploy": "hardhat run --network mumbai scripts/deploy.ts",

Then simply run the following command:

yarn deploy



Enjoy!!!

⭐️ ... and don't forget to leave a star if you like it! ⭐️

(back to top)

About

Solidity smart-contracts for a fully on-chain hyper-casual gaming platform!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published