This project implements a query system for a decentralized content rating program on the Solana blockchain. It allows users to retrieve information about content submissions, verifications, and ratings within a specified time frame, all while ensuring transparency through on-chain data validation.
- Installation
- Usage
- Project Structure
- Features
- Helper Query Functions
- API Reference
- Contributing
- License
To set up this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/solana-news-queries.git
-
Navigate to the project directory:
cd solana-news-queries
-
Install dependencies:
npm install
To use this query system:
-
Ensure you have a Solana wallet set up and connected to the desired network (mainnet, testnet, or devnet).
-
Set up your environment variables:
- Copy the
.env.example
file to.env
- Fill in the necessary values, such as your RPC endpoint
- Copy the
-
Run the query script:
npm start
-
The script will prompt you for a content PDA. Enter the public key of the content you want to query.
-
The system will return information about the content, including the time left for rating and the current number of ratings.