Inspiration

What it does

This Project called ChainSphere uses Chainlink Price Feed, Chainlink Verifiable Random Function (VRF) and Chainlink Automation to build a Decentralized Social Media Platform where users have control of their data and community beneficial contents are encouraged via periodic issuance of rewards to authors of posts picked randomly using VRF from a set of eligible posts

How I built it

The frontend of ChainSphere is built using react, with a user-centric UI design that gives the users seemless experience on the platform.

From the frontend, a user can register on the platform simply by connecting their wallet, entering their full name and a unique username or nickname, change their username and edit their profile. Users can also create post, view posts by other users, edit their post, delete their post (after paying some fee), cast votes on a post (either an upvote or a downvote) once, comment on posts,like comments, edit comments and also delete comments (this also attracts a fee).

The platform also has a trending posts section where users can see the recent trending posts. Trending posts are those posts that were judged as eligible for reward in the period before the current period.

Pictures uploaded by users on the platform are saved on Interplanatary File System (IPFS) and the image hash is stored on the Smart contract.

The Code base for frontend development of ChainSphere can be found in /frontend repository.

The ChainSphere Decentralized Social Media Application is coordinated by four Contracts (i.e. ChainSphere.sol, ChainSphereUserProfile.sol, ChainSpherePosts and ChainSphereComments.sol) and one library (PriceConverter.sol) all written in Solidity and deployed on the Polygon Amoy test net.

The frontend interacts directly with the ChainSphere.sol contract which in turn delegates all user registration activities to the ChainSphereUserProfile.sol contract, all posts related activities to the ChainSpherePosts contract and all comments related activities to the ChainSphereComments.sol contract. Also, the Code base uses the PriceConverter library to get prices from Chainlink oracles using the Chainlink Price Feed Services.

A more detailed explanation on the Smart Contract Code base is contained in the README.md file in the /contracts folder where the entire Smart Conract Code base lie.

The ChainSphere Smart Contract is deployed on Polygon Amoy test net. We initially wanted to deploy the Contract on Polygon zkm Cardona test net but discovered that Chainlink doesn't provide any services for the network and also confirmed this from Chainlink Labs. Chainlink Labs suggested it was ok to deploy our Contract on the Polygon Amoy test net though it is not a DeFi project since Chainlink provides services for it. Hence our reason for deploying on Polygon Amoy

Challenges I ran into

Accomplishments that I'm proud of

What I learned

I learnt how React and Solidity works with Chainlink Price Feed, Chainlink Verifiable Random Function (VRF) and Chainlink Automation.

What's next for Chainsphere

I plan to improve on the current features, and add more features to make the application more robust

Share this project:

Updates