Inspiration
Chet and I wanted to learn solidity and get some hands on experience running apps on the block chain.
What it does
Our App functions like most other fantasy football league managers found online. Players can engage with the contract to join the league, pay the entry fee, and claim a franchise. The UI then helps them facilitate a draft, lets them trade their picks, and maps out the season schedule. During the regular season players set their weekly lineup, we compare scores with their opponent, and assign a result when all the IRL NFL games complete. At the end of the season, rewards are paid out to the top teams.
How we built it
We have a main contract, 'FantasyLeague', that manages the "game logic" and the general administration functions. A set of support libraries performs the bulk of the processing and validation required for data stored in the main contract. We then use a coordinator contract that can be deployed to a node, to allow us to communicate with our UI and the real world. For our purposes, we built a data scraper that collects game data from an Official NFL website and feeds it into that coordinator contact for use in the main contract.
Challenges we ran into
We certainly got distracted by some shiny mapping shaped objects. We also struggled to adapt our design mindset from the object oriented style we normally use to the hybrid object/functional style needed to keep contracts efficient.
Accomplishments that we're proud of
The data scraper works great. We built a decent set of libraries that reduced overall cost. Our modules communicate using loosely coupled data objects that made integration simple. We also used the logging system to record events and a large portion of our transient data allowing us to use the smallest amount of storage.
What we learned
A lot. This project opened our eyes to some cool opportunities allowed us to explore how we might implement systems that already exist more efficiently on the block chain.
What's next for Fantasy League
We'd like add more to the features we planned, but didn't have time to implement.
Built With
- hardhat
- solidity
Log in or sign up for Devpost to join the conversation.