Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
96a5f7f
chore: Migrate project from pnpm to bun for dependency management and…
Oba-One Nov 16, 2025
dc667c2
chore: Update package.json scripts and improve client type generation…
Oba-One Nov 16, 2025
fa96f6c
fix(contracts): NFT gating audit fixes and production polish
Oba-One Feb 11, 2026
a55a220
fix(client): NFT gating UI polish, config updates, and test fixes
Oba-One Feb 11, 2026
d750241
fix(ci): resolve contract test, type check, and Vercel deployment fai…
Oba-One Feb 11, 2026
577b724
fix(ci): add OZ v5 ERC777 compatibility shims for Superfluid
Oba-One Feb 11, 2026
e85470f
fix: address CodeRabbit review feedback across 11 files
Oba-One Feb 11, 2026
3873392
fix(client): use as const for tuple inference in useReadContract args
Oba-One Feb 11, 2026
655a9ca
fix(contracts): delegate purpose validation to CookieJarValidation li…
Oba-One Feb 11, 2026
a6a1991
chore: bump version to 3.2.0 and update release notes
Oba-One Feb 11, 2026
d0e43dc
refactor(client): overhaul gating selection UX, accessibility, and ho…
Oba-One Feb 11, 2026
a9fa7b1
feat: enforce v2 poap event gating and chain support
Oba-One Feb 12, 2026
d955e2b
Merge pull request #29 from greenpill-dev-guild/enhancement/gating-se…
Oba-One Feb 12, 2026
eca53d3
fix: address review feedback across client and contracts
Oba-One Feb 12, 2026
857b409
fix: address review feedback across client and contracts
Oba-One Feb 12, 2026
e4dc6e1
fix(client): add missing testing-library dom peer dep
Oba-One Feb 12, 2026
cde3c3a
merge old PR branch history
Oba-One Feb 12, 2026
c60b912
Merge pull request #31 from greenpill-dev-guild/codex/review-feedback…
Oba-One Feb 12, 2026
1c2ff29
chore(deploy): update deployment artifacts and network scripts
Oba-One Feb 12, 2026
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
12 changes: 6 additions & 6 deletions .cursor/rules/deployment.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,19 @@ cast send $CONTRACT_ADDRESS \

```bash
# 1. Deploy to testnet
pnpm deploy:base-sepolia
bun deploy:base-sepolia

# 2. Verify deployment
pnpm verify:deployment
bun verify:deployment

# 3. Seed test data (if needed)
pnpm seed:testnet
bun seed:testnet

# 4. Test frontend integration
pnpm dev:base-sepolia
bun dev:base-sepolia

# 5. Run E2E tests against testnet
pnpm test:e2e:testnet
bun test:e2e:testnet
```

## Deployment Script Pattern
Expand Down Expand Up @@ -200,7 +200,7 @@ contract Deploy is Script {
### Vercel Deployment
```bash
# Build and verify locally first
pnpm build
bun build

# Check for build errors
# Verify environment variables in Vercel dashboard
Expand Down
23 changes: 11 additions & 12 deletions .cursor/rules/root-standards.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ alwaysApply: true
- Web3-native with ethical considerations

## Monorepo Structure
- **pnpm workspaces** for package management
- **bun workspaces** for package management
- **Conventional commits**: `feat:`, `fix:`, `chore:`, `docs:`, `test:`
- **Quality gates**: All PRs require passing build, test, lint, type-check
- **Coverage requirements**: Never decrease below current levels (90%+ for new code)
Expand All @@ -22,16 +22,15 @@ alwaysApply: true

```bash
# Full stack development
pnpm dev # Local with fresh Anvil chain
pnpm dev:ethereum # Fork Ethereum mainnet
pnpm dev:base # Fork Base network
bun dev # Local with fresh Anvil chain

# Testing & quality
pnpm test # All tests across packages
pnpm test:coverage # Coverage report
pnpm lint # Lint all packages
pnpm type-check # Fast TypeScript validation (preferred)
pnpm build # Build all packages
bun run test # All tests across packages (IMPORTANT: use `bun run test`, not `bun test`)
bun run test:client:coverage # Client coverage report
bun run test:contracts:coverage # Contract coverage report
bun lint # Lint all packages
bun type-check # Fast TypeScript validation (preferred)
bun build # Build all packages
Comment on lines +25 to +33
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify bun commands exist in package.json and check for remaining pnpm references

echo "=== Checking package.json scripts ==="
# Verify documented commands exist
for cmd in dev dev:ethereum dev:base test test:coverage lint type-check build; do
  if jq -e ".scripts.\"$cmd\"" package.json >/dev/null 2>&1; then
    echo "$cmd script found"
  else
    echo "$cmd script missing"
  fi
done

echo -e "\n=== Searching for remaining pnpm references ==="
# Find any remaining pnpm references in config/docs
rg -i 'pnpm' \
  --type=json \
  --type=yaml \
  --type=md \
  -g '!**/node_modules/**' \
  -g '!**/.next/**' \
  -g '!**/dist/**' \
  -C 2

echo -e "\n=== Checking for pnpm lock files ==="
fd -H 'pnpm-lock.yaml'

echo -e "\n=== Checking for bun lock files ==="
fd -H 'bun.lockb'

Repository: greenpill-dev-guild/cookie-jar

Length of output: 428


🏁 Script executed:

# Check the content of the file to see lines 77-79
cat -n .cursor/rules/root-standards.mdc | sed -n '20,80p'

Repository: greenpill-dev-guild/cookie-jar

Length of output: 2888


Add missing bun scripts to package.json: dev:ethereum, dev:base, and test:coverage are documented but missing from package.json.

The documentation claims developers can run bun dev:ethereum, bun dev:base, and bun test:coverage, but these scripts don't exist in package.json. Define these scripts in package.json or remove them from the documentation. The commands dev, test, lint, type-check, and build are correctly configured.

🤖 Prompt for AI Agents
In @.cursor/rules/root-standards.mdc around lines 25 - 34, The docs list bun
scripts that are missing from package.json; either add the three scripts
"dev:ethereum", "dev:base", and "test:coverage" to package.json or remove them
from the documentation. If adding, implement "dev:ethereum" and "dev:base" as
variant wrappers of the existing "dev" script that pass the appropriate
network/fork flags used by your dev server (so they call the same underlying
start logic as "dev" but with the Ethereum or Base fork configuration) and
implement "test:coverage" to run the same test runner with coverage enabled
(mirroring how your CI produces coverage, calling your test command with the
coverage flags). Ensure the script names exactly match dev:ethereum, dev:base,
and test:coverage so the docs and package.json stay in sync.

```

## Tech Stack Standards
Expand Down Expand Up @@ -74,9 +73,9 @@ pnpm build # Build all packages

### Pre-Commit Requirements
```bash
pnpm type-check # Must pass (no TypeScript errors)
pnpm lint # Must pass (no ESLint errors)
pnpm build # Must complete successfully
bun type-check # Must pass (no TypeScript errors)
bun lint # Must pass (no ESLint errors)
bun build # Must complete successfully
```

### Common Patterns
Expand Down
35 changes: 21 additions & 14 deletions .cursor/rules/testing-patterns.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -212,21 +212,28 @@ export const TEST_CONTRACTS = {
```

## Testing Commands

> **IMPORTANT**: Always use `bun run <script>` (not `bun test`) to execute npm-style scripts.
> `bun test` invokes Bun's built-in test runner, which bypasses Vitest configuration entirely.

```bash
# Unit tests
pnpm test # All tests
pnpm test:watch # Watch mode
pnpm test:coverage # Coverage report

# E2E tests
pnpm test:e2e # Full E2E suite
pnpm test:e2e:ui # Visual test runner
pnpm test:e2e:debug # Debug mode

# Contract tests
cd contracts && forge test # All contract tests
forge test -vvv # Verbose output
forge coverage # Coverage report
# Unit tests (from repo root)
bun run test # All tests (contracts + client)
bun run test:client # Client tests only (runs vitest)
bun run test:client:coverage # Client coverage report

# Watch mode (from client workspace only)
cd client && bun run test:watch # Vitest watch mode (client workspace only)

# E2E tests (defined at repo root)
bun run test:e2e # Full E2E suite
bun run test:e2e:ui # Visual test runner
bun run test:e2e:debug # Debug mode

# Contract tests (from repo root)
bun run test:contracts # All contract tests
bun run test:contracts:coverage # Contract coverage report
bun run test:contracts:gas # Gas report
```

## CI/CD Requirements
Expand Down
22 changes: 10 additions & 12 deletions .github/actions/setup-node-pnpm/action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: 'Setup Node.js and pnpm'
description: 'Setup Node.js, pnpm, and install dependencies for Cookie Jar project'
name: 'Setup Node.js and bun'
description: 'Setup Node.js, bun, and install dependencies for Cookie Jar project'

inputs:
node-version:
description: 'Node.js version to use'
required: false
default: '18'
pnpm-version:
description: 'pnpm version to use'
bun-version:
description: 'bun version to use'
required: false
default: '8'
default: '1.0'
working-directory:
description: 'Working directory to run commands'
required: false
Expand All @@ -22,13 +22,11 @@ runs:
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: 'npm'
cache-dependency-path: '${{ inputs.working-directory }}/pnpm-lock.yaml'

- name: Setup pnpm
uses: pnpm/action-setup@v3
- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
version: ${{ inputs.pnpm-version }}
bun-version: ${{ inputs.bun-version }}

- name: Install dependencies
shell: bash
Expand All @@ -37,8 +35,8 @@ runs:
# Try frozen lockfile first, fallback to regular install in CI
if [ "$CI" = "true" ] || [ "$GITHUB_ACTIONS" = "true" ]; then
echo "🤖 CI environment detected"
pnpm install --no-frozen-lockfile || pnpm install
bun install --no-frozen-lockfile || bun install
else
echo "🔒 Using frozen lockfile for local consistency"
pnpm install --frozen-lockfile
bun install --frozen-lockfile
fi
8 changes: 4 additions & 4 deletions .github/workflows/accessibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
NODE_VERSION: '18'
PNPM_VERSION: '8'
BUN_VERSION: '1.0'

jobs:
accessibility-tests:
Expand All @@ -25,11 +25,11 @@ jobs:
with:
submodules: recursive

- name: Setup Node.js and pnpm
- name: Setup Node.js and bun
uses: ./.github/actions/setup-node-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
bun-version: ${{ env.BUN_VERSION }}

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:

# Start client
cd client
pnpm generate
bun run generate
npm run dev &
CLIENT_PID=$!
echo "CLIENT_PID=$CLIENT_PID" >> $GITHUB_ENV
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
NODE_VERSION: '18'
PNPM_VERSION: '8'
BUN_VERSION: '1.0'

jobs:
code-quality:
Expand All @@ -20,19 +20,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js and pnpm
- name: Setup Node.js and bun
uses: ./.github/actions/setup-node-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
bun-version: ${{ env.BUN_VERSION }}

- name: Lint client code
run: |
cd client
echo "🔍 Running ESLint..."

# Use Next.js lint - allow warnings but fail on errors
if pnpm run lint 2>&1 | tee lint-output.log; then
if bun run lint 2>&1 | tee lint-output.log; then
echo "✅ ESLint completed successfully"
else
# Check if there are actual errors (not just warnings)
Expand All @@ -50,20 +50,20 @@ jobs:
- name: TypeScript type checking
run: |
cd client
pnpm run type-check
bun run type-check

- name: Format check
run: |
cd client
echo "🎨 Checking code formatting..."

if pnpm run format:check 2>&1 | tee format-output.log; then
if bun run format:check 2>&1 | tee format-output.log; then
echo "✅ Code formatting is consistent"
else
echo ""
echo "⚠️ Code formatting issues found in some files"
echo "📝 This is not critical, but helps maintain code consistency"
echo "💡 To fix locally: 'pnpm run format' or 'npx prettier --write .'"
echo "💡 To fix locally: 'bun run format' or 'npx prettier --write .'"
echo ""
echo "🔍 Consider setting up Prettier in your IDE for auto-formatting on save"
echo " • VS Code: Install 'Prettier' extension"
Expand Down
31 changes: 23 additions & 8 deletions .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,34 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

# Skip all pnpm/Node.js dependencies - contracts tests don't need them

# Skip all bun/Node.js dependencies - contracts tests don't need them

- name: Create OZ v5 compatibility shims
run: ./scripts/oz-compat.sh

- name: Build contracts
run: |
echo "🔧 Building contracts..."
cd contracts


# Use dev profile (matches local package.json scripts)
export FOUNDRY_PROFILE=dev

# Build contracts with size reporting
forge build --sizes

if [ $? -ne 0 ]; then
echo "❌ Contract compilation failed"
exit 1
fi

echo "✅ Contracts compiled successfully"
echo ""
echo "📊 Contract sizes:"
Expand All @@ -54,7 +61,10 @@ jobs:
run: |
echo "🧪 Running Foundry test suite..."
cd contracts


# Use dev profile (matches local package.json scripts)
export FOUNDRY_PROFILE=dev

# Run tests with detailed output and gas reporting
forge test -vvv --gas-report

Expand All @@ -72,7 +82,10 @@ jobs:
run: |
echo "📊 Generating coverage report..."
cd contracts


# Use dev profile (matches local package.json scripts)
export FOUNDRY_PROFILE=dev

# Generate coverage in lcov format for better tooling support
forge coverage --report lcov

Expand Down Expand Up @@ -105,7 +118,9 @@ jobs:
run: |
echo "🔍 Running basic security analysis..."
cd contracts


export FOUNDRY_PROFILE=dev

echo "📋 Checking compilation warnings:"
forge build 2>&1 | tee build-warnings.log

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
NODE_VERSION: '18'
PNPM_VERSION: '8'
BUN_VERSION: '1.0'

jobs:
e2e-tests:
Expand All @@ -25,11 +25,11 @@ jobs:
with:
submodules: recursive

- name: Setup Node.js and pnpm
- name: Setup Node.js and bun
uses: ./.github/actions/setup-node-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
bun-version: ${{ env.BUN_VERSION }}

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:

# Start client dev server
cd client
pnpm generate
bun run generate
npm run dev &
CLIENT_PID=$!
echo "CLIENT_PID=$CLIENT_PID" >> $GITHUB_ENV
Expand Down
Loading
Loading