BottomsInTopsIn is a smart contract-based game where two tokens compete in epochs. The winner is determined by the change in total market cap, using Chainlink price feeds for token prices.
- Epoch-based competition between two tokens
- Winner determination based on market cap changes
- Reward distribution to token holders
- Liquidity provision to a DEX (Thruster)
- Checkpoints for tracking token supplies and market cap
BottomsInTopsIn.sol
: Main contract implementing the game logicBottomToken.sol
: ERC20 token contract for the Bottom tokenTopToken.sol
: ERC20 token contract for the Top token
- OpenZeppelin Contracts
- Chainlink Contracts
- Clone the repository
- Install dependencies:
npm install
- Compile contracts:
npx hardhat compile
- Run tests:
npx hardhat test
To deploy the contracts:
- Set up your
.env
file with the required environment variables (see.env.example
) - Run the deployment script:
npx hardhat run scripts/deploy.js --network <your-network>
The project includes a comprehensive test suite.
Make sure to Run npx hardhat clean
each time to make edits to the smart contract.
(Generally considered good practice to recompile when changes are made.)