https://github.com/signor1/lottery-contract
https://github.com/signor1/lottery-contract
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/signor1/lottery-contract
- Owner: Signor1
- Created: 2024-02-11T13:33:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-11T13:33:25.000Z (over 2 years ago)
- Last Synced: 2025-01-06T04:12:20.323Z (over 1 year ago)
- Language: TypeScript
- Size: 65.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lottery Contract
This Solidity smart contract enables users to participate in a lottery game. The contract randomly selects a winner among the participants and rewards them with the accumulated prize pool.
## Getting Started
To deploy and interact with the contract, follow the steps below:
### Prerequisites
- Node.js (v14.x or later)
- npm (Node.js package manager)
- Hardhat
### Installation
1. Clone the repository:
```
git clone https://github.com/Signor1/lottery-contract.git
```
2. Navigate to the project directory:
```
cd lottery-contract
```
3. Install dependencies:
```
npm install
```
4. Compile the contracts:
```
npx hardhat compile
```
5. Deploy the contracts to a local Hardhat network:
```
npx hardhat run scripts/deploy.js --network localhost
```
## Testing
Unit tests are included to ensure the functionality of the contract.
1. Run the unit tests:
```
npx hardhat test
```
## Contributing
Contributions are welcome! Feel free to submit issues or pull requests.