MCPcopy Index your code
hub / github.com/Daltonic/dapplottery

github.com/Daltonic/dapplottery @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
80 symbols 230 edges 34 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

How to Build a Lottery DApp with NextJs, Solidity, and CometChat

Read the full tutorial here: >> How to Build a Lottery DApp with NextJs, Solidity, and CometChat

This example shows How to Build a Lottery DApp with NextJs, Solidity, and CometChat:

Creating a Lottery

Creating a Lottery

Purchasing Ticket

Purchasing Ticket

Live Chat

Live Chat

Technology

This demo uses:

  • Metamask
  • Hardhat
  • Infuira
  • NextJs
  • Tailwind CSS
  • Solidity
  • EthersJs
  • Faucet

Running the demo

To run the demo follow these steps:

  1. Clone the project with the code below.

```sh

# Make sure you have the above prerequisites installed already! git clone https://github.com/Daltonic/dapplottery dappLottery cd dappLottery # Navigate to the new folder. yarn install # Installs all the dependencies. ```

  1. Head to CometChat and create a project.

  2. Create a .env.local file to include the following details. sh NEXT_PUBLIC_APP_ID=<APP_ID> NEXT_PUBLIC_AUTH_KEY=<AUTH_KEY> NEXT_PUBLIC_REGION=<REGION>

  3. Run the app using yarn dev

If your confuse about the installation, check out this TUTORIAL to see how you should run it.

Questions about running the demo? Open an issue. We're here to help ✌️

Useful links

Core symbols most depended-on inside this repo

notifyUser
called by 7
services/blockchain.jsx
reportError
called by 6
services/blockchain.jsx
getEtheriumContract
called by 6
services/blockchain.srr.js
getEthereumContract
called by 4
services/blockchain.jsx
truncate
called by 4
services/blockchain.jsx
getLottery
called by 4
services/blockchain.srr.js
scrollToEnd
called by 3
components/Chat.jsx
toWei
called by 3
services/blockchain.jsx

Shape

Function 80

Languages

TypeScript100%

Modules by API surface

services/blockchain.srr.js13 symbols
services/chat.jsx11 symbols
services/blockchain.jsx11 symbols
scripts/seeder.js6 symbols
components/DrawTime.jsx5 symbols
test/DappLottery.test.js4 symbols
components/Chat.jsx4 symbols
pages/create.jsx3 symbols
components/Generator.jsx3 symbols
components/AuthChat.jsx3 symbols
pages/results/[resultId].jsx2 symbols
pages/jackpots/[jackpotId].jsx2 symbols

For agents

$ claude mcp add dapplottery \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact