-
Notifications
You must be signed in to change notification settings - Fork 15
Frontend contract integration #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis update delivers a comprehensive overhaul of the hackathon platform's codebase, focusing on blockchain integration, ERC20 token prize support, and UI/UX refinement. Major changes include new and updated contract ABIs, removal of mock data, dynamic blockchain data fetching, ERC20 approval logic, timezone-aware date handling, and significant UI restyling. Several new client components and utilities were introduced, while obsolete hooks and theme providers were deprecated or removed. Changes
Sequence Diagram(s)ERC20 Prize Hackathon Creation and SubmissionsequenceDiagram
participant User
participant CreatePage
participant ERC20Token
participant HackHubFactory
User->>CreatePage: Fill form (select ERC20, enter token address)
CreatePage->>ERC20Token: Check allowance
alt Not approved
CreatePage->>ERC20Token: Send approve(prizeAmount)
ERC20Token-->>CreatePage: Approval receipt
end
User->>CreatePage: Submit form
CreatePage->>HackHubFactory: createHackathon(..., prizeToken, prizeAmount)
HackHubFactory-->>CreatePage: Transaction receipt
Judge Voting FlowsequenceDiagram
participant Judge
participant JudgeVotingClient
participant HackHubContract
Judge->>JudgeVotingClient: Allocate votes to projects
JudgeVotingClient->>HackHubContract: vote(projectId, tokenAmount) [per project or batch]
HackHubContract-->>JudgeVotingClient: Vote confirmation
JudgeVotingClient-->>Judge: Update UI with new vote status
Organizer Management FlowsequenceDiagram
participant Organizer
participant ManagePage
participant HackHubContract
Organizer->>ManagePage: Adjust judge tokens
ManagePage->>HackHubContract: adjustJudgeTokens(judge, amount)
HackHubContract-->>ManagePage: Confirmation
Organizer->>ManagePage: Conclude hackathon
ManagePage->>HackHubContract: concludeHackathon()
HackHubContract-->>ManagePage: Confirmation
Estimated code review effort🎯 5 (Critical) | ⏱️ ~90+ minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (26)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit
New Features
UI/UX Improvements
Bug Fixes
Chores