datatoken-contracts-test v1.0.0
DataToken Contracts
⚠️ Warning: This Smart Contract has not been professionally audited.
Overview
The main goal of this project is to abstract the post and collect functionalities from popular social protocols such as Lens Protocol V2 and Cyber Connect into a unified concept called DataToken. With the help of different types of DataTokenFactory, users can create various types of DataTokens. These DataTokens can then be collected by other users.
DataTokenHub: DataTokenHub contract serves as a central hub for managing DataTokenFactory instances. Its primary functions include whitelisting DataTokenFactories, registering DataTokens, and emitting the "Collected" event in a unified manner.
DataTokenFactory: DataTokenFactory contract is responsible for creating different types of DataTokens. It is categorized into three types: Lens, Cyber, and Profileless. Each type of DataTokenFactory is specialized in creating its corresponding DataToken.
DataToken: DataToken represent ownership of specific data or digital assets. These tokens can be collected, and the resulting revenue will be distributed to the DataToken owners.
Setup
Install Foundry:
curl -L https://foundry.paradigm.xyz | bash
foundryupInstall dependencies:
forge installCompile
npm run buildTest
npm run testTest the code with logs and traces:
npm run test -vvvvDeploy
Please add a new file named .env and configure your environment as .env.example showed.
npm run deploy:polygon_mumbai
npm run deploy:bsc_testnet
npm run deploy:scroll_sepolia
npm run deploy:filecoin_calibrationDeployed Contract Address
The contract addresses deployed on different blockchain networks are listed in the addresses.json file.
2 years ago