Take back the ownership of your social content on-chain, and generate a passive income! :)
Blockify is a decentralized Platform as a Service, for creating fully decentralized blogs. Everyone can be sure that the content won't be lost, even if the application ever goes down still the data will be persisted on the blockchain, Ceramic Protocol, and IPFS. Moreover, to help creators create a passive income from their posts, and incentivize users to use the platform, some actions require pay in Blockify Tokens that are of ERC-20 standard. In this way, the platform can easily generate income for all, maintainers, creators, and even followers. However, to read the blogs, posts, and comments, there is no need to register, pay, or even have a crypto wallet.
The platform works in the following way:
- Creator pays Blockify Tokens to mint his Blog NFT and starts creating posts
- From that moment, there is no need to pay anything not even gas fees by the creator
- Readers can easily reach the content, just by entering the app and reading all of the content
- To interact with the given creator, the blog has to be followed and for that particular action payment in Blockify tokens is required
- At the time when someone follows the creator, the tokens are being distributed among the Creator, platform maintainers and even the followers of the given blog
- The same applied to comment logic, to comment user has to firstly follow the given Blog
- In this way, there is a passive income guaranteed for every side - Maintainers, Creators, and Followers
The smart contracts are built with Solidity and deployed to the Polygon Mumbai network, later on, The Graph is used to query the data from the blockchain. To store publications, Ceramic Protocol is used as it also provided a decentralised way to store data, plus there is no gas fee required, and it's also faster. Since the publications are stored on Ceramic Protocol which is Blockchain agnostic, in case of moving the platform to any other chain, the publications will be preserved.
-
Install all the dependencies -
yarn
-
Create an account on Alchemy, then create a new app and select "Polygon Mumbai" as a network.
-
Create a
.env
file in the root folder and add the following variables:
API_URL=<ALCHEMY_API_URL>
API_KEY=<THE_LAST_PART OF_THE_API_URL>
PRIVATE_KEY=<YOUR_WALLET'S_PRIVATE_KEY>
CONTRACT_ADDRESS=<DEPOLOYED_TOKEN_ADDRESS>
POLYGONSCAN_API_KEY=<POLYGONSCAN_API_KEY>
Hint: You can get your own API key in the alchemy dashboard. The last part can be added after deploying the token.
run npx hardhat compile
command.
- Run
npx hardhat run scripts/deployBlockifyToken.ts --network mumbai
command, to deploy Token's contract - Run
npx hardhat run scripts/deployBlockify.ts --network mumbai
command, to deploy Blockify - Run
npx hardhat verify "<Blockify_Token_Address>" --network mumbai
command, to verify Blockify Token contract - Run
npx hardhat verify "<Blockify_Address>" --network mumbai
command, to verify Blockify contract
- Run
graph init --index-events
command in the empty folder to create the Graph API - Enter all of the realted info
- Run
yarn codegen
to generate schemas - Add
startBlock
value tosubgraph.yaml
file - Run
graph auth
to add The Graph deploy key - Change
undefined
folder name inside ofgenerated
toBlockify
- Run
yarn deploy
to deploy the graph
- Add both BlockifyToken and Blockify abi files to the
abi
folder - Add deployed contracts address to the file inside of
consts
folder - Create
.env
and addREACT_APP_WEB3_STORAGE=<WEB3_STORAGE_API_KEY>
- Run
yarn start
to start the project