candle_auction

Crates.iocandle_auction
lib.rscandle_auction
version0.1.0
sourcesrc
created_at2023-03-06 08:34:06.838886
updated_at2023-03-06 08:34:06.838886
descriptionCosmWasm implementing candle auction
homepagehttps://github.com/jacksoom/candle-auction
repositoryhttps://github.com/jacksoom/candle-auction
max_upload_size
id802334
size100,915
jacksoom (jacksoom)

documentation

README

basic workflow test workflow codecov

🕯️ Candle Auctions on CosmWasm! 🎃

This is an CosmWasm smartcontract implementing a candle auction logic.

With this contract, one can set up a candle auction for a NFT collection or a domain name!

Design details

1: Build a auction

Everyone can calling Auction message. Then before the auction has started, transfer the nft to be auctioned into the contract and add it, and add the callback message {id: $[auction_id]},

2: Auction bid

During the duration of the auction, the bidder can bid(CW20 callback or BidForDenom), but the bid must be greater than the previous bid

3: Candle blow

After the auction, Anyone can blowing out the auction candle. The contract will call the random number of the external oracle to confirm auction end time.

end_time = auction_start_time+ random_num % auction_duration

The auction winner is the one with the highest bid less than the end time

  • Auction1: refunds for non-winners.
  • Auction2: Transfer nft to winner.
  • Auction3: Transfer bid currency to seller.

4: Advantage

  • Support multiple nft auctions at one time.

  • Support multiple payment. denom/cw20.

Build

1: Run check and test

make all

2: Build

sh optimize
Commit count: 47

cargo fmt