Linked-in profile Github profile Twitter profile Curriculum vitae
Created
15th December 2021
Modified
28th March 2023

Blockchain (Solidity) raffle game, with Next.js

Use any ERC-20 for raffle tickets; optional game pot prizes (ERC-20, ERC-721 (NFT), ERC-1155), optional game and treasury fees

Testnet deployments

The raffle contracts have now been deployed on Goerli, and Sepolia, there are testnet faucets available if you need tokens to play with.

Connect MetaMask (additional wallet support on the way) with either the Goerli, or Sepolia testnets at the following static site deployment, to an AWS S3 bucket.
https://raffle-nextjs-testnet.s3.eu-west-1.amazonaws.com/index.html

Once your wallet is connected, you should see existing open raffles appear. As well as being able to create your own, with any ERC-20 token you’d like to (within limits of the network). After you’ve created a raffle, you can add any optional ERC-20, ERC-721 (NFTs), or ERC-1155 contract assets.

Each raffle can also be created with an optional game fee, sent at the end of the game. This could be used to donate to a charity, fund an artist, etc. As well as a configurable treasury fee system, on top of all games.

If you’ve any feedback or questions, feel free to comment, happy to help anyone looking to get into smart contracts.

A static front-end, for a decentralisation

The reason for deploying the site to object storage, like an AWS S3 bucket, is to demonstrate the potential to eventually push the front-end code, to a decentalised data storage network, such as IPFS, SIA, etc.

The site has been built in Vanilla JavaScript, using the Next.js framework. The source code for the UI can be found at https://github.com/AlexanderGW/raffle-nextjs

The initial contract deployments on the Rinkeby testnet are now no longer available.

Solidity smart contracts

A brief list of tasks and features to be completed on the contracts.

The source code for the Solidity smart contracts can be found at https://github.com/AlexanderGW/raffle-contracts

Gamemaster contract

Will aim to keep this post up to date with the latest contract revisions, for as long as necessary. If information looks to be out of date, check for the latest EOA address transactions, associated with the contract below.

Sepolia

0xac6afffe6a2b4f99f29578ae725322faea590dd7

Leave a Reply