Giter VIP home page Giter VIP logo

v4.0's Introduction

Basic Dutch Auction

Name: Arjun Raja Yogidas

The NFTDutchAuction_ERC20Bids.sol contract works as follows:

  • We use UUPS proxy mechanism.
  • All bids are to be made using HuskyCoins an ERC20 token.
  • The seller instantiates a DutchAuction contract to manage the auction of a single, nft item at a single auction event. The contract is initialized with the following parameters:
    • _erc20TokenAddress: the address of the HuskyCoin contract
    • _erc721TokenAddress: Address of the Nft contract
    • _nftTokenId: unique token id
    • reservePrice: the minimum amount of HUSKY coin that the seller is willing to accept for the item
    • numBlocksAuctionOpen: the number of blockchain blocks that the auction is open for
    • offerPriceDecrement: the amount of HUSKY coin that the auction price should decrease by during each subsequent block.
  • The seller is the owner of the contract.
  • Nft's are minted by the owner here for reduced comlexity
  • Nft contract approves the required addresses for the auction to continue uninterupted
  • The auction begins at the block in which the contract is created.
  • The initial price of the item is derived from reservePrice, numBlocksAuctionOpen, and offerPriceDecrement: initialPrice = reservePrice + numBlocksAuctionOpen*offerPriceDecrement
  • A bid can be submitted by any Ethereum externally-owned account.
  • The first bid processed by the contract that sends HUSKY coin greater than or equal to the current price is the winner. The HUSKY coin should be transferred immediately to the seller and the contract should not accept any more bids. All bids besides the winning bid should be refunded immediately.
npx hardhat compile //to compile
npx hardhat run scripts/deployBDA.ts //to deploy
npx hardhat test //to run test cases
npx hardhat coverage //to generate coverage report

Test Coverage Report

Coverage Report

v4.0's People

Contributors

coderbirju avatar

Watchers

 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.