blocklet / nft-lottery-demo

ABT Node blocklet project, contained a lottery game can buy gift with NFT-store
2 stars 1 forks source link

NFT Lottery Demo

Blocklet that demos how to develop a simple lottery game that mint nft for winners.

Launch on Blocklet Server

Launch on Blocklet Server

Run and debug in local

Setup

yarn global add @blocklet/cli
git clone git@github.com:blocklet/nft-lottery-demo.git
cd nft-lottery-demo
yarn

Start your local node

blocklet server init -f --mode debug
blocklet server start

Configure the blocklet

Create .env.development file under your local repo root, and add SERVER_URL="http://{YOUR_LOCAL_IP}"

# Change the following IP to your local IP
SERVER_URL="http://192.168.123.236"

Create .env.local file under your local repo root

PAYMENT_TOKEN_ID=“z35n6UoHSi9MED4uaQy6ozFgKPaZj2UKrurBG”
REACT_APP_APP_NAME=“NFT Lottery Demo”
CHAIN_HOST=“https://beta.abtnetwork.io/api”
SERVER_URL=“http://ddns.paddings.cn”
PAYMENT_TOKEN_ID=“z35n6UoHSi9MED4uaQy6ozFgKPaZj2UKrurBG”
CONFIG_API=“https://50ba8217-znkidjks9e8tdu3czp4kcreoaqkbkfmsa9va.did.abtnet.io/api/nft/config”

Start the blocklet

blocklet dev

License

The code is licensed under the Apache 2.0 license found in the LICENSE file.