A decentralized parimutuel perpetual futures platform built with Next.js, Tailwind CSS, and Foundry for smart contracts. The platform supports multiple blockchain networks including Base Sepolia and Monad Testnet.
frontend/: Next.js application with Tailwind CSS and ThirdWeb integrationfoundry/: Smart contracts built with Foundry
git clone https://github.com/hollowgrahm/parimutuel.git
cd parimutuel
git submodule update --init --recursive- Navigate to the foundry directory:
cd foundry- Install dependencies:
forge install- Create a
.envfile based on the example:
cp .env.example .env-
Update the
.envfile with your private key and RPC URLs. -
Build the contracts:
forge build- Run tests:
forge test- Navigate to the frontend directory:
cd frontend- Install dependencies:
yarn install
# or
npm install- Create a
.env.localfile based on the example:
cp .env.local.example .env.local-
Update the
.env.localfile with your ThirdWeb Client ID and contract addresses. -
Start the development server:
yarn dev
# or
npm run dev- Open http://localhost:3000 in your browser to see the application.
Follow the instructions in foundry/DEPLOYMENT.md to deploy the smart contracts to different blockchain networks.
- Build the frontend:
cd frontend
yarn build
# or
npm run build- Start the production server:
yarn start
# or
npm startThe application supports multiple blockchain networks. See frontend/MULTI_CHAIN_SETUP.md for details on how to configure and use the multi-chain functionality.
Create a .env file in the foundry directory with the following variables:
# Private key for deployments
PRIVATE_KEY=your_private_key_here
# Base Sepolia RPC URL
BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
# Monad Testnet RPC URL
MONAD_TESTNET_RPC_URL=https://testnet-rpc.monad.xyz
# Etherscan API key for contract verification
ETHERSCAN_API_KEY=your_etherscan_api_key_here
# Optional: Default network to use (base_sepolia or monad_testnet)
NETWORK=base_sepolia
Create a .env.local file in the frontend directory with the following variables:
# ThirdWeb Client ID
NEXT_PUBLIC_THIRDWEB_CLIENT_ID=your_thirdweb_client_id
# Base Sepolia Contract Addresses
NEXT_PUBLIC_BASE_SEPOLIA_USD_ADDRESS=0x...
NEXT_PUBLIC_BASE_SEPOLIA_PARIMUTUEL_ADDRESS=0x...
# Monad Testnet Contract Addresses
NEXT_PUBLIC_MONAD_TESTNET_USD_ADDRESS=0x...
NEXT_PUBLIC_MONAD_TESTNET_PARIMUTUEL_ADDRESS=0x...
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request