-
High - 100xp
-
Medium - 20xp
-
Low - 2xp
-
Starts: February 22, 2024 Noon UTC
-
Ends: February 29, 2024 Noon UTC
- nSLOC: 201
- Complexity Score: 143
This code was created for Codehawks as the first flight. It is made with bugs and flaws on purpose. Don't use any part of this code without reviewing it and audit it.
Created by equious.eth
When opportunity knocks, you gunna answer it? One Shot lets a user mint a rapper NFT, have it gain experience in the streets (staking) and Rap Battle against other NFTs for Cred.
The Rapper NFT.
Users mint a rapper that begins with all the flaws and self-doubt we all experience. NFT Mints with the following properties:
weakKnees
- TrueheavyArms
- TruespaghettiSweater
- TruecalmandReady
- FalsebattlesWon
- 0
The only way to improve these stats is by staking in the Streets.sol
:
Experience on the streets will earn you Cred and remove your rapper's doubts.
- Staked Rapper NFTs will earn 1 Cred ERC20/day staked up to 4 maximum
- Each day staked a Rapper will have properties change that will help them in their next Rap Battle
Users can put their Cred on the line to step on stage and battle their Rappers. A base skill of 50 is applied to all rappers in battle, and this is modified by the properties the rapper holds.
- WeakKnees - False = +5
- HeavyArms - False = +5
- SpaghettiSweater - False = +5
- CalmAndReady - True = +10
Each rapper's skill is then used to weight their likelihood of randomly winning the battle!
- Winner is given the total of both bets
ERC20 token that represents a Rapper's credibility and time on the streets. The primary currency at risk in a rap battle.
User - Should be able to mint a rapper, stake and unstake their rapper and go on stage/battle
- git
- You'll know you did it right if you can run
git --version
and you see a response likegit version x.x.x
- You'll know you did it right if you can run
- foundry
- You'll know you did it right if you can run
forge --version
and you see a response likeforge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
- You'll know you did it right if you can run
forge test
forge coverage
and for coverage based testing:
forge coverage --report debug
- In Scope:
├── src
│ ├── CredToken.sol
│ ├── OneShot.sol
│ ├── RapBattle.sol
│ ├── Streets.sol
- Solc Version:
^0.8.20
- Chain(s) to deploy contract to:
- Ethereum
- Arbitrum
None