How machinalabs/remix-etherscan-plugin works
Remix Etherscan Plugin is a Remix UI for submitting Solidity contract verification requests to Etherscan and checking their receipt status. The principal flow is: Remix provides compilation data, the user submits contract details, the plugin selects the network and sends the verification request, then records and polls the returned receipt. Settings capture the API key; the receipts view also supports manual status checks. Source excerpts show the app shell, routing, verification and status helpers; some view wiring is only evidenced by the source index.
Main entry points: App.tsx Plugin app · routes.tsx Route dispatch · VerifyView.tsx Contract verification · utilities.ts Network and status helpers
Components 18
Plugin and app shell
- Plugin app
src/App.tsx - Route dispatch
src/routes.tsx - Default layout
src/layouts/Default.tsx - Navigation header
src/components/HeaderWithSettings.tsx
User workflows
- Verification home
src/views/HomeView.tsx - Contract verification
src/views/VerifyView.tsx - API key settings
src/views/CaptureKeyView.tsx - Receipt status
src/views/ReceiptsView.tsx - Error view
src/views/ErrorView.tsx - Submit control
src/components/SubmitButton.tsx
Verification services
- Network and status helpers
src/utils/utilities.ts
Shared state
- App context
src/AppContext.tsx - Persistent state hook
src/hooks/useLocalStorage.tsx - Receipt model
src/types/Receipt.ts
Other components
- Plugin user
- Remix IDE
- Etherscan API
- Browser storage
Connections 25
- Plugin user → Plugin app: uses plugin
README.md - Remix IDE → Plugin app: sends compilation events
src/App.tsx - Plugin app → Route dispatch: renders
src/App.tsx - Route dispatch → Verification home: routes to
src/routes.tsx - Route dispatch → Error view: routes to
src/routes.tsx - Route dispatch → Receipt status: routes to
src/routes.tsx - Route dispatch → API key settings: routes to
src/routes.tsx - Route dispatch → Default layout: wraps views
src/routes.tsx - Default layout → Navigation header: renders
src/layouts/Default.tsx - Verification home → Contract verification: uses view
src/views/HomeView.tsx - Contract verification → Network and status helpers: gets network and status
src/views/VerifyView.tsx - Contract verification → Submit control: renders
src/views/VerifyView.tsx - Contract verification → Remix IDE: requests compilation and emits status
src/views/VerifyView.tsx - Contract verification → Etherscan API: posts verification
src/views/VerifyView.tsx - Receipt status → Network and status helpers: checks receipt status
src/views/ReceiptsView.tsx - Receipt status → Submit control: renders
src/views/ReceiptsView.tsx - Network and status helpers → Remix IDE: detects network
src/utils/utilities.ts - Network and status helpers → Etherscan API: queries status
src/utils/utilities.ts - Plugin app → Network and status helpers: polls receipt status
src/App.tsx - Plugin app → App context: provides shared state
src/App.tsx - Plugin app → Persistent state hook: persists API key and receipts
src/App.tsx - Persistent state hook → Browser storage: reads and writes
src/hooks/useLocalStorage.tsx - Plugin app → Receipt model: uses receipt records
src/App.tsx - Plugin user → API key settings: configures key
- Plugin user → Receipt status: checks receipts