Skip to content

feat: add Ethereum file upload example#19

Merged
0xmaayan merged 3 commits intomainfrom
feat/ethereum-file-upload-example
Jan 29, 2026
Merged

feat: add Ethereum file upload example#19
0xmaayan merged 3 commits intomainfrom
feat/ethereum-file-upload-example

Conversation

@0xmaayan
Copy link
Contributor

@0xmaayan 0xmaayan commented Jan 28, 2026

Summary

Adds a new example application demonstrating how Ethereum developers can build a file upload dApp on Shelby Protocol.

Changes

  • Added apps/ethereum/file-upload - A Next.js app with:

    • File upload to Shelby's decentralized storage
    • Ethereum wallet connection via RainbowKit
    • Drag-and-drop file upload UI
    • Storage account derivation from Ethereum address
  • Updated pnpm-workspace.yaml to include apps/ethereum/*

Key Dependencies

  • @shelby-protocol/sdk - Core TypeScript SDK
  • @shelby-protocol/ethereum-kit - Ethereum wallet integration
  • @shelby-protocol/react - React hooks for blob uploads
  • @rainbow-me/rainbowkit - Wallet connection UI
  • wagmi - Ethereum hooks

How to Test

cd apps/ethereum/file-upload
cp .env.example .env
# Add your Shelby API key to .env
pnpm dev

Note

Medium Risk
Adds a new Next.js app with wallet integration, WebAssembly-enabled build config, and a large dependency/lockfile surface area; risk is mainly build/runtime compatibility and supply-chain footprint rather than core logic changes.

Overview
Adds a new apps/ethereum/file-upload Next.js example app for Ethereum wallet connection (RainbowKit/wagmi) and uploading files to Shelby storage, including docs and env setup (README.md, .env.example).

Introduces app-level tooling/config (next.config.ts enabling asyncWebAssembly, Tailwind/PostCSS config, shadcn components.json, .gitignore) and a new package.json with its own pnpm-lock.yaml. Updates the monorepo workspace (pnpm-workspace.yaml) to include apps/ethereum/*.

Written by Cursor Bugbot for commit fac18e5. This will update automatically on new commits. Configure here.

- Add new example app for Ethereum developers
- Demonstrates file upload to Shelby using RainbowKit wallet connection
- Includes FileUploader component with drag-and-drop UI
- Uses @shelby-protocol/ethereum-kit for Ethereum wallet integration
- Updated pnpm-workspace.yaml to include apps/ethereum/*
- Replace next lint with biome check
- Remove unused eslint dependencies
- Add aria-hidden to decorative SVGs
- Use semantic section element for drop zone
- Fix string concatenation to template literal
@0xmaayan 0xmaayan force-pushed the feat/ethereum-file-upload-example branch from b00e29f to f1d280a Compare January 28, 2026 22:37
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

if (droppedFile) {
setFile(droppedFile);
}
}, []);
Copy link

Choose a reason for hiding this comment

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

Drag-drop during upload causes dropped file to be lost

Low Severity

The handleDrop callback doesn't check isPending before calling setFile(), while the file input correctly uses disabled={isPending}. If a user drops a file during an active upload, the new file is set to state. When the original upload completes, clearFile() clears the state, causing the newly dropped file to be silently lost.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Collaborator

@GhostWalker562 GhostWalker562 left a comment

Choose a reason for hiding this comment

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

LGTM

@0xmaayan 0xmaayan merged commit 4312ac9 into main Jan 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants