beubeubeubeu / SafeTickets

Final project during Alyra blockchain developer training
https://safe-tickets.vercel.app
0 stars 0 forks source link

SafeTickets

hardhat tests workflow

Vercel Deploy

Final project during Alyra blockchain developer training.

This is a simple NFT marketplace.

NFT's are images and information about physical tickets of passed concert tickets.

The targetted users are concert tickets collectors like Stevie Dixon.

Table of Contents

Features

As a user I can:

Demo

Video

YouTube video Safe Tickets demo

YouTube link

Dapp

If application is deployed it should be here: https://safe-tickets.vercel.app

Contracts on OpenSea and Sepolia

Contracts architecture

Contracts

Oppenzeppelin contracts dependency:

Description

Diagrams

Contract architecture

Mint process

Contracts deployment

Coverage & security

Coverage

A coverage screen 08-04-24 15:00.

Screenshot 2024-04-08 at 16 11 52

Slither

Slither does not pass, some warnings are from Openzeppelin contracts. Other need a timely refacto. Here is a screen of Slither report launched within a GitHub workflow action.

slither

Stack

Smart Contracts

File upload

Front

CI/CD

Dapp

Important issues

Run the app locally

Run front

cd ./frontend
yarn install
touch .env.local
yarn run dev

.env.local:

NEXT_PUBLIC_NETWORK=hardhat
NEXT_PUBLIC_ENABLE_TESTNETS=true
NEXT_PUBLIC_EVENT_BLOCK_NUMBER=0
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID={REPLACE}
NEXT_PUBLIC_PINATA_GATEWAY_URL={REPLACE}
PINATA_JWT={REPLACE}
// hardhat local invariable addresses:
NEXT_PUBLIC_MARKETPLACE_CONTRACT_ADDRESS="0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0"
NEXT_PUBLIC_SAFE_TICKETS_CONTRACT_ADDRESS="0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"
NEXT_PUBLIC_USER_COLLECTION_CONTRACT_ADDRESS="0x5FbDB2315678afecb367f032d93F642f64180aa3"
NEXT_PUBLIC_USER_COLLECTION_FACTORY_CONTRACT_ADDRESS="0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"

Run blockchain

cd ./blockchain
touch .env
yarn install
yarn hardhat node --network hardhat

.env

LOCAL=true
INFURA_PK={REPLACE}
ETHERSCAN_API_KEY={REPLACE}
INFURA_URL={REPLACE}
WALLET_PK={REPLACE}
ALCHEMY_URL={REPLACE}

Deploy

yarn hardhat run scripts/deploy.js --network localhost

to Sepolia

yarn hardhat run scripts/deploy.js --network sepolia

local "seed" script (local)

yarn hardhat run scripts/createCollection.js --network localhost