- Table of Contents
- Introduction
- Features:
- Installation
- Usage
- Jupiter Terminal V2
- Documentation
- Contributing
- License
Welcome to BARK Prediction dApp! This decentralized application (dApp) built on the Solana blockchain empowers users to participate in prediction markets and unleash predictive insights on Solana.
- Prediction Markets: Participate in prediction markets on various assets.
- Real-time Price Feeds: Access up-to-date asset prices including SOL, BARK, BTC, ETH, and more.
- Token Swapping: Seamlessly swap tokens across different clusters. Swap tokens using Jupiter Terminal V2 - Works only mainnet and need custom RPC or Jupiter API.
- Account Management: View balance, transaction history, and more.
- Donation Functionality: Contribute to charitable causes directly from the dApp.
- Integration with BARK Token: Stake BARK tokens, vote on governance proposals, and access premium features.
- Cross-Chain Compatibility: Interact with the dApp using assets from different blockchain networks.
- Decentralized Governance: Participate in decision-making processes related to platform upgrades and feature enhancements.
- Privacy Features: Prioritize user privacy and confidentiality through privacy-enhancing technologies.
To install and run the BARK Prediction dApp locally, follow these steps:
-
Clone the repository:
git clone https://github.com/bark-community/prediction-platform.git
-
Install dependencies:
pnpm install && npx @next/codemod new-link .
-
Start the development server:
pnpm dev
-
Visit
http://localhost:3000
in your browser to access the dApp.
Once the dApp is running, you can start exploring the prediction markets, accessing real-time price feeds, managing your account, and contributing to charitable causes directly from the interface. Follow the on-screen instructions to navigate through the features and functionalities of the dApp.
- Users can now connect to the app with their crypto wallet using the Solana Wallet Adapter.
- Implemented functionality to create and mint basic SPL tokens.
- Added support for creating and minting tokens with metadata using Metaplex MPL-Token-Metadata.
- Users can now connect to all available Chainlink Price Feeds and view real-time price updates on the Devnet for assets like SOL, BTC, ETH, LINK, USDC, and USDT.
- Enabled token swapping functionality using Jupiter Terminal V2.
- Implemented the ability for users to switch between different clusters: Devnet, Local, Testnet, and Mainnet.
- Users can now view their SOL account balance within the app.
- Added functionality for users to view their transaction history.
- Users can now open transaction details in the block explorer directly from the app.
- Implemented a feature for users to request an airdrop on the Devnet.
- Added functionality for users to send SOL to other addresses.
- Implemented the ability for users to copy their address to the clipboard for requesting SOL.
To integrate token swapping using Jupiter Terminal V2, which works only on the mainnet.
-
Integration with Jupiter Terminal V2 API: Incorporate the Jupiter Terminal V2 API into your application to enable token swapping functionality. You'll need to make API requests to perform token swaps, so ensure you have the necessary endpoints and authentication tokens.
-
Custom RPC or Jupiter API Configuration: Set up a custom RPC endpoint or use the Jupiter API to interact with the Jupiter Terminal V2. This involves configuring part of application to communicate with the appropriate network and endpoints required for token swapping.
-
User Interface for Token Swapping: Design and implement a user interface within your application to facilitate token swapping. This interface should allow users to select the BARK and other tokens they want to swap, specify the amount, and initiate the swap transaction.
-
Transaction Handling: Implement logic to handle token swap transactions securely within your application. This includes validating user inputs, executing API requests to initiate swaps, and handling transaction responses (success or failure) from the Jupiter Terminal V2.
-
Error Handling and Feedback: Implement error handling and feedback mechanisms to users during the token swapping process. Inform users of transaction status updates, errors, or any other relevant information to ensure a smooth user experience.
-
Testing and Optimization: Test the token swapping functionality thoroughly to identify and address any bugs or issues. Optimize the performance of your application to ensure seamless token swapping experiences for users.
-
Documentation and Support: Document the token swapping feature within prediction dApp, including usage instructions and any prerequisites. Provide support resources or assistance channels for users who may encounter difficulties during the token swapping process.
-
Implementation: Liquidity Pools and API
- MarginFi: https://www.marginfi.com/
For detailed project documentation, please visit Project Documentation.
Contributions are welcome! If you'd like to contribute to the BARK Prediction dApp, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Make your changes.
- Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Create a new Pull Request.
Please ensure that your contributions adhere to the project's coding standards and follow the Contributor Covenant.