# VOR NFT Competition Demo
Our first demo is running on Rinkeby testnet, and showcases the potential of VOR by implementing an NFT competition. Competitions can be created, with an NFT as the prize. Entrants pay a fee in xFUND to enter, and the winner is selected via VOR. The NFT is then minted for the winner.
Contract: 0xE1426CE899537340E5551cF37Db813B75Ec6C579 (opens new window)
Github: https://github.com/unification-com/vor-demos (opens new window)
# Interaction
For the moment, interaction can be done via Etherscan (UI is forthcoming).
# View a Competition
There is currently only one competition running at the moment, for this wonderful unique piece of art (opens new window).
The competition has a maximum of 100 entries, and costs 0.1 xFUNDMOCK to enter.
To see the competition details and current entrants:
- Go to NFT Competition Contract (opens new window) on Etherscan and click the "Read Contract" button.
- Select the
getCompetition
function - Enter
1
as the_competitionId
- Click the "Query" button
# Entering a competition
To enter a competition, you'll need some xFUNDMOCK tokens, and to approve the NFT competition contract to spend some for you to pay for entry fees.
# Getting xFUNDMOCK tokens
- Go to the xFUNDMOCK (opens new window) contract
- Click the "Connect to Web3" button and connect your wallet.
- Click "gimme" function, followed by "Write"
This should give you 10 xFUNDMOCK
tokens.
# Approving the NFT Contract to pay entry fees
- Go to the xFUNDMOCK (opens new window) contract
- Click the "Connect to Web3" button and connect your wallet.
- Click the "increaseAllowance" function.
- Enter
0xE1426CE899537340E5551cF37Db813B75Ec6C579
as thespender
(the NFT Competition contract address) - Enter
5000000000
(5 xFUNDMOCK) as theaddedValue
- Click "Write"
You have now approved the NFT contract to transfer a small amount of xFUNDMOCK on your behalf.
# Enter the Competition
Now we're ready to enter the competition.
- Go to NFT Competition Contract (opens new window) on Etherscan and click the "Write Contract" button.
- Click the "Connect to Web3" button and connect your wallet.
- Click the
enterCompetition
function. - Enter
1
as the_competitionId
- Click the "Write" button.
Once your transaction has been confirmed, you can repeat the steps in the "View a Competition" section and you should see your wallet address in the list of entrants.
# Wen Winner?
The winner will be selected at some point in the future...
In the meantime, check out our guides on deploying your own VOR-enable smart contract, or the Github repo (opens new window) for this demo.