Giter VIP home page Giter VIP logo

opcode-open-spring-fest / smartbid Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 51 KB

"SmartBid" is blockchain based auction like system that offers enhanced transparency, security, and efficiency compared to traditional methods. In a blockchain-based auction, each item or asset up for bidding is represented as a unique digital token on the blockchain.

JavaScript 1.62% Solidity 98.38%
blockchain smart-contracts solidity iiitbh open-spring-fest type-medium

smartbid's People

Contributors

jagpreet153 avatar mishrasomesh001 avatar shobhit15082003 avatar xtwo56 avatar

Forkers

xtwo56

smartbid's Issues

[Feature]:

So, what is it about?

NFT Integration in English Auction Contract

Add NFT Contract Reference:

  • Add a reference to the ERC721 contract for the NFTs being auctioned.

Bid Placement with NFT:

  • Modifie the placeBid function to accept an additional parameter _tokenId representing the NFT token ID.
  • Bidders must send the NFT token they want to bid with as part of the bid.
  • Add a check to ensure that the bidder owns the NFT they are bidding with.

Finalizing the Auction:

  • Modifie the finalizeAuc function to transfer the NFT to the highest bidder if the auction is not cancelled.
  • Use the safeTransferFrom function from the ERC721 contract to transfer the NFT securely.

Implemente ERC721 Receiver:

  • Implemente the onERC721Received function as required by the IERC721Receiver interface.
  • This function allows the contract to receive NFTs when they are transferred to it.

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]:

So, what is it about?

Bid Placement Event:

Event: BidPlaced

  • Add an event BidPlaced to emit when a bid is placed.
  • This allows external systems to listen for bid placements and track auction activity.

Bidder Withdrawal Function:

Withdraw Function:

  • Add a withdraw function that allows bidders to withdraw their bids if the auction is cancelled.
  • Bidders can call this function to retrieve their bid amount if the auction is cancelled or they are not the highest bidder.

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: optimization

So, what is it about?

Notice: I will accept pr only when you have resolved a significant amount of problem to reduce the gas use(i.e significant amount of decrease in gas utilization) and have a good idea for security enhancement.

Gas Optimization:

Use of uint:

  • Utilized uint instead of uint256 for gas savings, optimizing storage usage.

Compact Data Structures:

  • Minimized storage usage where possible by using compact data structures, such as using uint instead of larger data types.

Security Enhancements:

Input Validation:

  • Ensured that all user inputs are properly validated to prevent vulnerabilities such as reentrancy and denial-of-service attacks.
  • Utilized require statements for input validation to revert transactions with invalid inputs, enhancing security and robustness.

Code of Conduct

  • I agree to follow this project's Code of Conduct

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.