Description
Display battle results showing the top 3 winners, prize distribution, and NFT minting status on the battle results page.
Tasks
Contract Functions Used
VotingEngine.getTop3(uint256) - Get top 3 meme IDs and vote weights
MemeRegistry.getMeme(uint256) - Get meme details for winners
WinningMemeNFT.tokenOfMeme(uint256) - Get NFT token ID for winning meme
BattleManager.getBattleState(uint256) - Verify battle is finalized
Files to Modify
frontend/app/battles/[id]/results/page.tsx
frontend/components/podium.tsx
frontend/hooks/useBattleResults.ts (new file)
Description
Display battle results showing the top 3 winners, prize distribution, and NFT minting status on the battle results page.
Tasks
useBattleResults(battleId)that:VotingEngine.getTop3(battleId)WinningMemeNFT.tokenOfMeme(memeId)FINALIZEDorARCHIVEDContract Functions Used
VotingEngine.getTop3(uint256)- Get top 3 meme IDs and vote weightsMemeRegistry.getMeme(uint256)- Get meme details for winnersWinningMemeNFT.tokenOfMeme(uint256)- Get NFT token ID for winning memeBattleManager.getBattleState(uint256)- Verify battle is finalizedFiles to Modify
frontend/app/battles/[id]/results/page.tsxfrontend/components/podium.tsxfrontend/hooks/useBattleResults.ts(new file)