Descentralized, community driven alternative to Wikipedia. Implemented in Blockchain, IPFS, and Freenet.
To implement the logic to connect, view and edit the repository in a specific ecosystem, a class with these functions should be implemented:
class Article {
name: string,
changelog: Change[],
}
function fetchArticle(name: string): Promise<Article | null>;
Fetches an article given it's name, or null if the article doesn't exist.
function addArticle(name: string): Promise<boolean>;
Adds empty article to repository, returns true if it was successful, false otherwise. An article name must be unique.
function editArticle(name: string, change: Change): Promise<boolean>;
Edits an article in a git style, where only the changes are passed to the method. TODO: standarize change declaration.
There is a directory with the solidity contracts used for this ecosystem. It needs to be provided with a Sepolia API key in the .env
file (see .env.example
) as well as the deployer wallet's private key.
To compile and deploy the smart contracts run the following:
npm run compile-contracts
npm run deploy-contracts
this will create the bytecode and ABI, once deployed it will also save the contract address in a file for later use in the application.