Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions create_quest_batch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Description
Creating multiple quests requires separate transactions, which is expensive and slow during large game deployments.

## Expected Behavior
Admins or quest creators should be able to create multiple quests in a single transaction.

## Proposed Changes

```
function createQuestBatch(QuestParams[] calldata quests) external;
```

## Acceptance Criteria

- Batch creation works for arrays of any valid size
- Gas usage is measurably lower than equivalent individual calls
- Tests cover batch success and partial failure scenarios
20 changes: 20 additions & 0 deletions difficulty_tiers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Description
All quests currently have the same reward structure regardless of complexity or challenge level.

## Expected Behavior
Quests should have difficulty tiers that influence reward multipliers.

## Proposed Changes

```
enum Difficulty { Easy, Medium, Hard, Legendary }
```

- Add `Difficulty difficulty` to the quest struct
- Apply reward multipliers: Easy 1x, Medium 1.5x, Hard 2x, Legendary 3x

## Acceptance Criteria

- Difficulty is set at quest creation
- Reward payout respects the difficulty multiplier
- Tests cover all four difficulty levels
16 changes: 16 additions & 0 deletions emergency_pause.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Description
There is currently no way to halt the contract in case of an exploit or vulnerability discovery.

## Expected Behavior
The contract owner should be able to pause all quest creation and completions instantly.

## Proposed Changes

- Integrate OpenZeppelin `Pausable`
- Add `whenNotPaused` modifier to `createQuest()` and `completeQuest()`

## Acceptance Criteria

- Owner can pause and unpause the contract
- All state-changing functions respect the pause state
- Tests cover paused and unpaused scenarios
18 changes: 18 additions & 0 deletions fuzz_quest_completion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Description
The quest completion function handles reward calculations and player validation but lacks fuzz testing for edge cases.

## Expected Behavior
Foundry fuzz tests should stress-test the completion logic with randomized inputs.

## Scope

- Reward calculation edge cases
- Re-entrancy scenarios
- Invalid quest IDs and player addresses
- Boundary conditions on timestamps and amounts

## Acceptance Criteria

- Fuzz tests written using Foundry
- No failures across minimum 10,000 runs
- Re-entrancy guard confirmed effective under fuzz