Improving Voting System and Ranking Mechanism for Tagged Collections in NFT Platform

This State Changers meeting revolved around creating a voting system for a tag-based ranking system. The discussion uncovered challenges in storing votes for each collection and ranking collections per tag. The biggest challenge was in reinitializing an array inside a loop, causing only the last tag to be added. Potential solutions included creating workarounds such as utility functions or modules to keep track of fields and values.


The State Changers suggested using a 'for each' loop to iterate over database records, employing restrictions to abstract essential data and prevent redundant storage. The abstraction level significantly reduced when they decided to simplify querying all records to querying single records. Consequently, they created a list of IDs that served as the key to the final outcome. The meeting also discussed changing the concept into a function, making it easier to manipulate than API calls. The function was created to identify how many votes each tag received. Towards the end of the State Changers meeting, they showed how to use 'aggregation' in output using count as an aggregator. This meeting would be beneficial for those working with complex nested arrays, functions, database record management and developing tag-based ranking systems. The discussion keywords included: Javascript, Typescript, serverless, State Change, and data manipulation.


(Source: Office Hours 9/14 )

State Change Members Can View The Video Here
chris-montgomery-smgTvepind4-unsplash.jpg

View This Video Now

Join State Change Risk-Free