This is a simple auction written as an ink contract and deployed as a webassembly script on to a locally running substrate node, it is deployed along with a simple front-end which enables creating auctions and bidding on items.
The dApp will accept bids until the bidding time has passed, at which point no more bids will be accepted. Losing bids can be reclaimed at any time, and the winning bid can be claimed/transferred only once the auction has ended.
New auctions can only be started once the previous auction has ended.
$ cd substrate-front-end-template
$ yarn install
$ cd ..
$ cd substrate-node-template
$ WASM_BUILD_TOOLCHAIN=nightly-2020-10-05 cargo build --release
$ ./target/release/node-template --dev
$ cd ..
$ cd ./substrate-front-end-template
$ yarn start
- Now navigate to https://polkadot.js.org/apps/#/contracts making sure that you have the local development environment selected
- Upload the auctions contract (./ink-auction-contract/auction.wasm & ./ink-auction-contract/metadata.json)
- Return to http://localhost:8000/substrate-front-end-template and refresh