Skip to content

Latest commit

Β 

History

History
121 lines (85 loc) Β· 3.25 KB

File metadata and controls

121 lines (85 loc) Β· 3.25 KB

πŸ“° PolkaNews β€” A Credibility-First News Platform

PolkaNews is a decentralized news platform where reporters are rewarded for publishing truthful content. It uses an AI-based oracle to verify the authenticity of news submissions and mints on-chain rewards (TruthTokens) for verified content.

PolkaNews

---

🌐 Why Polkadot AssetHub?

We chose Polkadot's AssetHub for its:

  • EVM compatibility: Seamless deployment of Solidity contracts using PolkaVM.
  • Low gas fees: Cost-effective transaction execution for a high-frequency app like news publishing.
  • Interoperability: Opens up future integration with other parachains and data layers.
  • Native asset support: Makes reward distribution and fee mechanics more efficient via native token standards.

πŸ› οΈ Features of AssetHub that Enable PolkaNews

  • βœ… Smart contract support via PolkaVM
  • βœ… Native assets creation and transfer
  • βœ… Custom fee structures for fine-grained control
  • βœ… Support for event-based off-chain triggers
  • βœ… Bridges and XCMP-ready for future composability

PolkaNews

---

πŸ”— Project Links

  • 🧠 Frontend GitHub: PolkaNews Frontend
  • πŸ” Smart Contract GitHub: PolkaNews Contracts
  • πŸ§ͺ Deployed Contract Addresses (AssetHub Testnet):
    • TruthToken: 0x4437F9F98613A0269d7b37D35a37025D8e240881
    • SubscriptionManager: 0x0aAFC279D67297BeF1cB717d51342EdBDA266798
    • PolkaNews: 0x74863B9AAECCB34238FA5f607B03242ddc62e1aF

πŸ’» How to Run Locally

🧱 Prerequisites

  • Node.js + npm
  • Hardhat
  • Git
  • A local HTTP RPC URL or Polkadot AssetHub testnet endpoint

πŸ“¦ Installation

git clone https://github.com/Raaghav-m/PolkaNews
cd PolkaNews
Frontend
bash
cd frontend
npm install
npm run dev

Backend (New Terminal)

cd server
npm install
node script.js

πŸ” Environment Variables Make sure to create a .env file in both the frontend/ and server/ directories.

frontend/.env

NEXT_PUBLIC_TRUTH_TOKEN_ADDRESS=0x4437F9F98613A0269d7b37D35a37025D8e240881
NEXT_PUBLIC_POLKANEWS_ADDRESS=0x74863B9AAECCB34238FA5f607B03242ddc62e1aF
NEXT_PUBLIC_SUBSCRIPTION_ADDRESS=0x0aAFC279D67297BeF1cB717d51342EdBDA266798
NEXT_PUBLIC_PINATA_API_KEY=<pinata_api_key>
NEXT_PUBLIC_PINATA_SECRET=<pinata_api_secret>

server/.env

ORACLE_PRIVATE_KEY=<oracle_private_key>
OPENAI_API_KEY=<openai_api_key>
PINATA_API_KEY=<pinata_api_key>
PINATA_SECRET_KEY=<pinata_api_secret>
RPC_URL=https://testnet-passet-hub-eth-rpc.polkadot.io
POLKANEWS_ADDRESS=0x815F645cc9090CB289AA6653a02Dc0Bcac10a13E

PolkaNews

πŸš€ Future Improvements (Phase 2)

-🧠 Integrate ZK-based proofs for oracle validation

-πŸ—³ Implement community-based upvote/downvote system

-πŸ›° Enable news cross-posting across parachains using XCMP

-πŸ“² Add reporter and user reputation scores on-chain

πŸ™Œ Credits

-πŸ’» Developed by Raaghav Manivel

-🧠 AI Oracle powered by OpenAI's GPT-4

-βš™οΈ Built during the Polkadot AssetHub Hackathon

-πŸ“· UI/UX inspired by decentralized publishing tools