Git Product home page Git Product logo

auction-platform's Introduction

AuctionPlatform

A smartcontract Dapp with a web based UI that keeps track of contract data by adding it into blocks to be mined on a test network.

Setup

  1. Nodejs (v6.10.0 or greater)— a Javascript runtime for easily building fast and scalable network applications
  2. Npm (v4.3.0 or greater) — Node.js’ package ecosystem. If you already have NodeJs you can simply type: npm update into your terminal.
  3. Solidity Compiler(v0.4.8 or greater) — $ npm install -g solc This is the compiler for smart contract language. You need this to compile all .sol files. If you have a mac, I HIGHLY recommend installing homebrew and following the installation steps here. Also note that if this is your first time downloading solidity this download can take upwards of 20 mins so be patient.
  4. Truffle Framework (v3.1.2 or greater) — $ npm install -g truffle note the -g tag installs truffle globally so don’t worry about being in any specific directory. Truffle is a development framework for Ethereum that has built in smart contract compilation, linking, and deployment.
  5. Testrpc (v3.1.2 or greater) — $ npm install -g ethereumjs-testrpc This will be the blockchain on which contracts will be deployed and mined in testing. Specifically testrpc is an Ethereum client for testing and developing. It comes with the ability to play with accounts pre-filled with millions of dollars worth of Ether (sorry you can’t keep it) and customize everything from hostnames to gasPrice.

Kovan Deployment

  1. in a new terminal window enter $ open -a Google\ Chrome --args --disable-web-security --user-data-dir this disables the chrome browser security check that prevents the app from using the same port as the blockchain.
  2. In a new terminal window $ parity ui --chain=kovan --jsonrpc-apis personal,eth,net,web3 contract is at: 0x8a4f9c87e7066d02b4e97d7bc1e5bff31b96c715
  3. In a new terminal window $ cd smartcontractui
  4. $ npm start
  5. you can now open localhost:3000 if it does not happen automatically and view the Dapp UI

Interface / Methods

Active Contracts

Table of unpublished contracts. Clicking columns changes order by. Clicking rows shows all submitted bids to the contract and ability to publish contract with given contract ID number (cId) from the database and mines the contract on the connected blockchain. The mined contract is immutable and will be displayed in the Closed Contracts table

New Contract

Creates a new contract with the specified Asset, Quantity, Price, and Time. The contract is submitted to the database and is open and able to be edited.

Add Contract Field

Allows user to view and add multiple addition fields to an unpublished contract

Edit Contract

Allows user to edit all aspects of a contract by its cID. Usage: enter in a cID, and wait a few seconds for fields to populate, then edit.

Refresh

Refreshes the database once a contract or bid is added or closed.

New Bid

Generates a new bid for the given cId. A bid consists of a Supplier, Price, and Time that a bidder is willing to bet.

Closed Contracts Table

Table of contracts that have been published to the blockchain. Contracts are immutable and clicking on one will reveal all data about the contract as will as the closing buyer.

Credits:

This smart contract was adapted from a tutorial by Jordan Leigh..

auction-platform's People

Contributors

amousa11 avatar collinc97 avatar varunagarwaldev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auction-platform's Issues

Slide deck

No need to push it here, but we need a slide deck for Thursday. See email for details

Page Organization

Page is unorganized with tables cluttering the screen. Ideally, the screen would have the two tables next to each other with a button below that when clicked would popup the contract creation form. Another button would be below to pop up the contract bidding form

Time units

Time input has no units, could use date object and store in dB the seconds since 1970

Reactify Contract/Bid Table to Prevent Page Refresh

If the page refreshes the user has to login to uPort again which is a terrible UX. Reactifying the bid and contract tables will allow us to update the tables without a refresh. Consider a time interval for the table to pull from the smart contract (5 seconds?) and update its data.

URGENT Edit contract API ERROR

Steps to produce

  1. add contract
  2. edit contract (any field)

Expected Behavior

No error

Actual

Uncaught TypeError: Cannot read property 'rowValues' of undefined
Failed to load resource: the server responded with a status of 503 (Service Unavailable)

Quality Assurance

verify every feature works efficiently and is in good condition for Thursday's presentation

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.