Skip to content

Raffl allows users to create and participate in raffles and lotteries with complete transparency, security, and fairness.

Notifications You must be signed in to change notification settings

Raffleth/protocol

Repository files navigation

Logo

Raffl Protocol

Welcome to the repository of Raffl, a decentralized platform built on the Ethereum blockchain. Raffl allows users to create and participate in raffles and lotteries with complete transparency, security, and fairness. This project is a collection of our web3 protocol smart contracts, developed using Foundry.

Usage

This is a list of the most frequently needed commands.

Build

Build the contracts:

$ forge build

Clean

Delete the build artifacts and cache directories:

$ forge clean

Compile

Compile the contracts:

$ forge build

Coverage

Get a test coverage report:

$ forge coverage

Deploy

Deploy to Anvil:

$ forge script script/Deploy.s.sol --broadcast --fork-url http://localhost:8545

For this script to work, you need to have a MNEMONIC environment variable set to a valid BIP39 mnemonic.

For instructions on how to deploy to a testnet or mainnet, check out the Solidity Scripting tutorial.

Format

Format the contracts:

$ forge fmt

Gas Usage

Get a gas report:

$ forge test --gas-report

Lint

Lint the contracts:

$ bun run lint

Test

Run the tests:

$ forge test

Generate test coverage and output result to the terminal:

$ bun run test:coverage

Generate test coverage with lcov report (you'll have to open the ./coverage/index.html file in your browser, to do so simply copy paste the path):

$ bun run test:coverage:report

About

Raffl allows users to create and participate in raffles and lotteries with complete transparency, security, and fairness.

Resources

Stars

Watchers

Forks