Giter Club home page Giter Club logo

smart_contracts's Introduction

Art NFT Marketplace

Description

A decentralized application (dApp) is an application built on a decentralized network that combines a smart contract and a frontend user interface. On Ethereum, smart contracts are accessible and transparent – like open APIs – so your dApp can even include a smart contract that someone else has written.

This project demonstrates how to build decentralized applications (dApps) and decentralized storage for non-fungible token (NFT) contracts. We do this by building our (dApp) smart contract on the the ERC-721 Non-Fungible Token Standard defined in the Ethereum Improvement Proposal (EIP)–721.

We use the ERC-721 Non-Fungible Token Standard contract to demostrate how users can buy or sell artwork NFTs in a decentralized marketplace. Users are able to select their accounts and register new artwork tokens through a web interface. Users will also be able to display the tokens for their accounts so that they can display the artwork on the webpage.

Initial SetUp

Installing Required Tools

  • Ganace - Ganache is a tool that allows you to quickly set up a local blockchain, which you can use to test and develop smart contracts. Follow the instructions on the Ganache Download page to download and install this tool on your local machine.

  • Metamask - MetaMask is a digital wallet for the Ethereum blockchain. Follow the instructions on the MetaMask Download page to install MetaMask in your web browser.

  • Pinata (Create a Token) - Pinata is for storing and managing your NFT media . It uses the Interplanetary File System, or IPFS, to create content-addressable hashes of data. Follow the instructions on the Pinata page to create a token and start using Pinata

Other Requirements

Clone

Clone a copy of the repo:

git clone https://github.com/rdillens/Smart_Contracts.git

Change to the SDK's directory:

cd Smart_Contracts

Create virtual environment:

Create new environment in conde with depenencies:

conda create  --name SmartContracts_env python=3.7 --file requirements.txt

Or install the following packages:

pip install streamlit
pip install streamlit-pages
pip install python-dotenv
pip install web3

Getting Started

Step 1: Run Ganache

Choose Quickstart

Ganache provides a local development blockchain for our app.

Step 2: Open Remix

Open Remix

Step 3: Load contract file into Remix

Load Contrat

Step 4: Compile Contract

Deploy Contract

Step 5: Copy Contract Address and Paste Into .env File

Deploy Contract

Step 6: Copy Ganache URI to .env file

The RPC URL needs to be needs to be added to WEB3_PROVIDER_URI property of the .env file.

Ganache RPC URL

The .env file WEB3_PROVIDER_URI containes the Ganache RPC URL to allow the WEB3 Provider to connect to our local block chain provided by Ganache.

PINATA_API_KEY= XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
PINATA_SECRET_API_KEY= XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
WEB3_PROVIDER_URI=http://127.0.0.1:7545
SMART_CONTRACT_ADDRESS= [Address of Deployed Contract]

Step 7: Run Streamlit App

streamlit run app.py

Run Streallit App

Contributors

  • Chafic Charafeddine
  • Remy Dillenseger
  • Gregory Douglas
  • Jose Medina

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.