GithubHelp home page GithubHelp logo

rmpasha / dtickets Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pacoard/dtickets

0.0 2.0 0.0 522 KB

ConsenSys Academy 2018 Final Project: Decentralized marketplace for tickets. Ethereum, Solidity, Blockchain, IPFS, ReactJS

License: MIT License

HTML 2.21% JavaScript 97.79%

dtickets's Introduction

dtickets

ConsenSys Academy 2018 Final Project: Decentralized marketplace for tickets. Ethereum, Solidity, Blockchain, IPFS, ReactJS

This project shows a proof of concept of a decentralized ticket sale. The tickets can be used for any type of event, and are modeled as ERC721 tokens (see Cryptokitties and CryptoZombies). As the owner of the sale, a user can manage the state of the sale, manipulate its price, add tickets, change metadata and withdraw all the raised funds.

In order to save ether on the deployment of the contracts, an additional IPFS hash field has been added to the TicketSale contract to point to extra metadata. If it's the valid of a text, PDF or any file uploaded to IPFS, it will be possible to access that file clicking on a link in the UI.

This project has been tested with: Ubuntu 14.04, Ubuntu 16.04, Chrome, MetaMask, Ganache.

Installation

  1. Install the latest versions of NPM, Truffle and Node globally, if you haven't installed them yet.

    curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    sudo apt-get install -y nodejs
    npm install -g truffle
  2. Clone this repository and enter it.

    git clone https://github.com/pacoard/dtickets.git
    cd dtickets
  3. Install the EthPM packages.

    truffle install
  4. Compile, deploy and test them. The easiest way is through the Truffle develop console, but I recommend having Ganache ready and deploy the contracts to it in order to test them later from the UI.

    truffle develop
    > compile // warnings from the installed contracts will appear. It's deprecated code from OpenZeppelin
    > migrate --reset //clean other possible migrations
    > test
    
    // Alternatively
    truffle compile
    truffle migrate --reset
    truffle test

A note on the tests: Although you can only see 5 tests in total, take into the account the code and the amount of asserts and expects that there are. The majority of the tests were heavily focused on the contract TicketSale, as the rest of the contracts were imported from OpenZeppelin and are known to be very secure.

  1. Install the frontend app (takes a few minutes). If you run into errors such as EACCESS or ENOENT, put sudo at the beggining of the command.

    npm install
  2. Start Webpack to be able to access the UI from the browser.

    npm start

If this this doesn't work for any reason, please do not hesitate to contact me. Shoot me a message to [email protected] I have an EC2 instance in AWS ready to serve the UI: <ec2-18-188-38-180.us-east-2.compute.amazonaws.com:8080>

  1. Interact with the smart contracts from the UI. You must use MetaMask + Ganache to interact with the locally deployed contracts.

dtickets's People

Contributors

pacoard avatar

Watchers

James Cloos avatar Rajendra Maharjan avatar

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.