ic-raffle/README.md
2024-08-01 23:14:47 +03:00

79 lines
2.8 KiB
Markdown

# IC-Raffle
IC-Raffle is a decentralized raffle system built on ICP Chain Fusion. This project allows users to participate in and manage raffles using smart contracts deployed on the ICP blockchain. The system supports various raffle functionalities, including ticket purchases and winner selection.
Table of Contents
Introduction
Features
Project Structure
Installation
Usage
Configuration
Contracts
Scripts
Contributing
License
Introduction
IC-Raffle provides a decentralized solution for managing raffles on the ICP blockchain. It leverages smart contracts to handle raffle ticket purchases, raffle draws, and winner selection, ensuring transparency and fairness.
Features
Decentralized Raffles: Conduct and manage raffles in a decentralized manner.
Ticket Management: Allow users to purchase and manage raffle tickets.
Winner Selection: Automated and fair winner selection using smart contracts.
Project Structure
vbnet
Kodu kopyala
ic-raffle/
├── .devcontainer/
├── canisters/
│ └── contracts/
│ ├── Coprocessor.sol
│ └── Raffle.sol
├── lib/
├── packages/
├── script/
│ ├── Coprocessor.s.sol
│ ├── DeployRaffle.s.sol
│ ├── HelperConfig.s.sol
│ └── Interactions.s.sol
└── README.md
Installation
To get started with IC-Raffle, follow these steps:
Clone the repository:
bash
git clone https://github.com/arhansuba/ic-raffle.git
cd ic-raffle
Install dependencies for the project (if applicable):
npm install
Usage
Deploying the Contracts
To deploy the smart contracts, use the provided scripts in the script directory. For example:
npx hardhat run script/DeployRaffle.s.sol
Interacting with the Raffle
To interact with the raffle system, you can use the scripts provided in the script directory for various interactions, such as ticket purchases and winner selection.
Configuration
Configuration files and deployment settings can be found in the script directory. Adjust these files as needed to fit your deployment environment and requirements.
Contracts
The smart contracts are located in the canisters/contracts directory. Key contracts include:
Coprocessor.sol: Auxiliary contract for additional functionalities.
Raffle.sol: Core raffle contract for managing ticket purchases, draws, and winner selection.
Scripts
Scripts for deployment and interactions are located in the script directory:
Coprocessor.s.sol: Script for deploying or interacting with the Coprocessor contract.
DeployRaffle.s.sol: Script for deploying the Raffle contract.
HelperConfig.s.sol: Script for configuration and setup.
Interactions.s.sol: Script for interacting with the Raffle contract.
Contributing
We welcome contributions to IC-Raffle! Please open an issue or submit a pull request on GitHub.
License
This project is licensed under the MIT License. See the LICENSE file for details.