Smart contract integration + UI polish#45
Conversation
- New home dashboard UI (agents, trades, bets, chart) - Updated mock data - Added agent API router - Updated market data and trading endpoints - Added pyproject + tools for backend
- Added runtime_agents router - Moved market_data into app/tools - Added tools/__init__.py - Updated executor + main imports - Removed old tools folder
…d main or master-mvp. Hence many issues
Backend: - Add 3 Tournament columns (contract_tournament_id, agent_contract_mapping, betting_closed) - Add on-chain endpoints: create, close betting, settle, cancel tournaments - JWT wallet auth with admin role gating - Update seed/reset scripts to match current schema Frontend: - Fix admin page: center wallet button, static tournament cards, clean error messages - Fix landing page: scroll perf (ParallaxLayer extraction), animation warnings - Fix BetModal: clean viem/contract error display - Improve mutation hooks: surface actual backend error messages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…auth, CORS, navbar, lint
|
HI HI! The last commit a few hours ago was me merging my changes with the main branch as of 02/08/26. Front-end issues:
Back-end: This commit keeps that mapping explicit in the database:
These fields are only used by the scheduler / settlement flow and do not replace UUID usage elsewhere. Other services and the frontend continue to reference tournaments and agents by UUID, so this shouldn’t ripple into unrelated code. |
Error checkAfter last commit, there were some tests that github ran and it failed. One error was that there was unsupported token: WETH and the other was the PERPEXLITY_API_KEY not being found. I think the unsupported token is an issue coming from either:
|
Summary
Root Page Scroll Lag
what was happening:
Admin Page Issues
what was wrong:
Database Changes
3 new columns on
Tournamentmodel:contract_tournament_id—Optional[int], defaultNoneagent_contract_mapping—JSON dict, default{}{"agent-uuid-1": 1, "agent-uuid-2": 2}betting_closed—bool, defaultFalsecloseBetting()beforesettleTournament()these columns have safe defaults — existing data is unaffected
Backend
tournament lifecycle endpoints (all admin-gated):
POST /{id}/onchain/create— creates on-chain, stores contract_tournament_id + agent mappingPOST /{id}/onchain/close— closes betting on-chain, sets betting_closed=TruePOST /{id}/onchain/settle— settles with winner, updates agent win statsPOST /{id}/onchain/cancel— cancels on-chain, refunds betsPOST /{id}/start— initializes agent states, sets status=liveauth:
POST /auth/wallet— verifies wallet signature, returns JWT with roleADMIN_ADDRESSESenv varrequire_admindependency gates mutation endpointsData Shape Reference
tournament (backend → frontend):
{ "id": "6b1a0a2c-...", "name": "February Trading Cup", "status": "live", "start_date": "2026-02-01T00:00:00Z", "end_date": "2026-02-07T00:00:00Z", "prize_pool": "10000.00", "contract_tournament_id": 3, "agent_contract_mapping": { "agent-uuid-1": 1, "agent-uuid-2": 2 }, "betting_closed": false } problems should be fixed. I have been referring to the wallet you gave me and I have been able to successfully chain agents, start tournament, cancel tournament, and end betting. I have checked that betting interface works; despite this I noticed that smart contract integration has led me to struggle with actual betting since I do not have amount in my own wallet. everything else works. This PR is also in relation to the frontend-expansion pull request