Rejuve.ai revolutionizes data management and monetization by leveraging blockchain technology and NFTs, ensuring secure and transparent transactions while giving users full control and ownership over their data.
- Project Purpose
- Rejuve Platform Contracts Repository
- Specification
- Roles
- Technologies Used
- Project Structure
- Getting Started
- Contact
The Rejuve Data NFT project aims to revolutionize the way data is managed and monetized through the use of Non-Fungible Tokens (NFTs). By leveraging blockchain technology, Rejuve ensures secure, transparent, and efficient data transactions, empowering users to have greater control and ownership over their data.
This repository contains the smart contracts for the Rejuve platform, facilitating the core functionalities and operations of our decentralized application.
The Rejuve platform contracts are designed to implement the following functionalities,
-
Identity Token
- Allows Rejuve admin to create identities on the behalf of the user, taking their signature as permission to create identity.
- ERC721 token Implementation
-
Data Management
- Provides data submission and data access permission features.
- Allows a caller to request specific data access by taking data owner's signature as permission.
-
Product NFT
- Allow a registered identity to create a product.
- Allow Linking new data with existing product
- ERC721 token Implementation
-
Product Shards
- Product shards creation and allocation mechanism
- ERC1155 token implementation
-
Future Shards
- Shards creation for future contributors.
- Inherits Product shards
-
Transfer Shards
- Shards Transfer mechanism for both "Tradable" and "Locked" types
- Inherits Future Shards
-
Profit Distribution
- RJV token submission by users
- Shard holders profit claim based on their shard holdings
-
Shards Marketplace
- Shards listing
- Discounts mechanism
- Shards trading
-
Voting
- To store proposal information & voting result on-chain
- The Technical requirements for blockchain are detailed and outlined.
- Refer to the architecture for additional context.
- Smart contract flows are provided to illustrate the contract processes.
-
IdentityToken Contract
-
Ownable
:- "Ownable" from OpenZeppelin is used to manage various permission.
- Only owner can pause and unpause the contract.
- By default, the owner account will be the one that deploys the contract.
- The owner can transfer ownership to a new account.
-
Rejuve/Sponsor
:- Can create identity tokens on the behalf of user
-
User
:- A user can burn his identity token
-
-
DataManagement Contract
-
Ownable
:- "Ownable" from OpenZeppelin is used to manage various permission.
- Only owner can pause and unpause the contract.
- By default, the owner account will be the one that deploys the contract.
- The owner can transfer ownership to a new account.
-
Rejuve/Sponsor
:- Can submit data on the behalf of user
-
Data Requester
:- Can get permission to access the data
-
-
Product NFT contract
- "AccessControl" from OpenZeppelin is used to manage different roles:
DEFAULT_ADMIN_ROLE
: Can grant and revoke any role.PAUSER_ROLE
: Can pause and unpause the contract.`SIGNER_ROLE
: Rejuve admin who signs the dataHashes, credit scores & related.User (Lab)
:- A user(Lab) can create a product
- A user(Lab) can link new data with existing product
-
ProductShards, FutureShards and TransferShards Contracts
-
Ownable
:- "Ownable" from OpenZeppelin is used to manage various permission.
- Can pause and unpause the contract.
- Can create & distribute shards to initial & future data contributors
- By default, the owner account will be the one that deploys the contract.
- The owner can transfer ownership to a new account.
-
Shard Owner
- Can transfer shards (Check TransferShards contract)
-
-
ProfitDistribution Contract
-
Ownable
:- "Ownable" from OpenZeppelin is used to manage various permission.
- Can pause and unpause the contract.
- By default, the owner account will be the one that deploys the contract.
- The owner can transfer ownership to a new account.
-
User
- Can deposit RJV tokens
-
Shard Holder
- Can withdraw earning as per his shards holding
-
-
ShardMarketplace Contract
-
Ownable
:- "Ownable" from OpenZeppelin is used to manage various permission.
- Can pause and unpause the contract.
- By default, the owner account will be the one that deploys the contract.
- The owner can transfer ownership to a new account.
-
Shard Holder
- Can list his shards on the marketplace
- Can update and cancel the list
-
Buyer
- Can purchase shards
- Can benefit from discount coupons if available
-
-
DistributorAgreement Contracts
-
Ownable
:- "Ownable" from OpenZeppelin is used to manage various permission.
- Can pause and unpause the contract.
- By default, the owner account will be the one that deploys the contract.
- The owner can transfer ownership to a new account.
-
User (Distributor)
:- A user(Distributer) with a valid signature can create an agreement
-
-
Voting Contract
Ownable
:- "Ownable" from OpenZeppelin is used to manage various permission.
- Can pause and unpause the contract.
- Can add proposal & voting result details on-chain
- By default, the owner account will be the one that deploys the contract.
- The owner can transfer ownership to a new account.
-
Programming Languages & Development tools
- Solidity: The primary programming language used for smart contract development.
- Hardhat: A comprehensive development environment for compiling, testing, and deploying smart contracts.
- Javascript: Utilized for writing tests and scripts to interact with the smart contracts.
-
Libraries
- Openzeppelin: A library for secure smart contract development, providing reusable and tested modules.
├── contracts # Solidity contracts
│ ├── Interfaces # Contract interfaces
│ ├── mocks # Mock contracts
├── scripts # Deployment scripts
├── test # Unit tests for contracts
├── hardhat.config.js # Hardhat configuration
└── README.md # Project documentation
Ensure you have the following installed:
- Node.js (>=12.x)
- npm (>=6.x)
- Hardhat (>=2.x)
Clone the repository and install dependencies:
git clone https://github.com/Rejuve/rejuve-platform-contracts.git
cd rejuve-platform-contracts
npm install
Compile the smart contracts using Hardhat:
npx hardhat compile
Run the tests to ensure everything is working correctly:
npx hardhat test
Run the command below to ensure 100% coverage
npx hardhat coverage
Replace "deployContractNameHere.js" with file name in scripts folder to deploy a specific contract to the specified network. Check the "Project scripts" section for reference.
npx hardhat run scripts/deployContractNameHere.js --network <network-name>
# Deployment script for identity token contract
scripts/deployIdentityToken.js
# Deployment script for data management contract
scripts/deployDataMgt.js
# Deployment script for product NFT contract
scripts/deployProductNFT.js
# Deployment script for product shards contract
scripts/deployProductShards.js
For questions or support, please contact us at [email protected].