GithubHelp home page GithubHelp logo

blockchain-based-e-auction-using-smart-contract's Introduction

Blockchain-Based-E-Auction-using-Smart-Contract

Smart contracts use blockchain technology to verify, validate, capture and enforce agreed-upon terms between multiple parties. Smart contracts on the blockchain allow for transactions and agreements to be carried out among anonymous parties without the need for a central entity, external enforcement, or legal system. It is built using the programming language, Solidity. The bytecode of smart contract redeemed with JSON format is utilized for broadcasting all the nodes of blockchain and then wait for verifying. If it is true, the contract is with individual contract address and JSON interface to allow the other person to get in.

As for the contract, we define the functions below:

(1) blindAuction()

Activate the contract by calling this function, and use the auctionStart and biddingEnd to record the start and end time.

(2) Bid()

This function can be called by anyone to initialize the bidding action. Before the function is executed, AuctionStart and biddingTime are used to judge whether the contract is expired. If not, the bidder can send the bid envelope if the price is greater than the current highest price. The contract system will use highestBid and highestBidder to record the current highest price and the corresponding bidder’s address.

(3) revealwinners()

Checks and compares the prices of all the tickets to attain the final winner when the Auction is closed.

(4) AuctionClose()

In this function, AuctionStart and biddingTime are automatically used to compute the contract validity time. If the effective time ends, the successful bidder’s Address and the current highest price will be automatically sent to the tenderer. This function will be disabled to avoid repeated execution.

(5) withdraw()

Returns the number of bids tendered by bidders other than the successful bidder.

Below are few screenshots of transactions performed using the Remix IDE:

  1. Register current account in the chosen environment.



  2. Show registered account details



  3. Overview of a transaction



  4. Beneficiary details



  5. Auction winner details after auction close



blockchain-based-e-auction-using-smart-contract's People

Contributors

monicasai7 avatar

Watchers

James Cloos avatar  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.