A Chrome extension that intercepts and simulates Web3 transactions before they reach your wallet. This helps you understand the potential outcome and effects of a transaction before actually executing it.
This project is supported by the ETH Rangers Program and Ethereum Foundation Ecosystem Support Program (ESP), under Grant #FY25-1948, Q1-2025.
- Intercepts Web3 transactions before they reach your wallet
- Simulates transaction outcomes
- Displays gas estimates and success probability
- Shows potential effects and security considerations
- Modern, clean UI for viewing simulation results
Follow these instructions to set up the extension for development.
-
Clone the repository:
git clone <your-repository-url> cd <repository-directory>
-
Install dependencies:
npm install
-
Build the extension:
npm run build
This command compiles the TypeScript/React source and packages it into the
distdirectory. For development, you can usenpm startto enable hot-reloading.
- Open Google Chrome and navigate to
chrome://extensions/. - Enable "Developer mode" using the toggle in the top-right corner.
- Click the "Load unpacked" button.
- Select the
distdirectory from this project.
The extension should now be loaded and active.
- The extension will automatically intercept any Web3 transactions on websites you visit.
- When a transaction is detected, the extension icon will become active.
- Click the extension icon to view the simulation results.
- Review the transaction details, gas estimates, and potential effects.
- Based on the simulation results, decide whether to proceed with the transaction.
src/- Contains all the source code for the extension.background/index.ts- The background service worker, responsible for handling simulation requests.contentScript/index.tsx- Injected into web pages to interceptwindow.ethereumtransaction requests.popup/- The React application for the extension's popup UI.services/- Contains services for simulation and storage.types/- TypeScript type definitions.
public/- Static assets that are copied to the build directory.manifest.json- The extension's manifest file, defining permissions and capabilities.index.html- Base HTML file.
dist/- The compiled and packaged extension, generated after building. This is the directory you load into Chrome.
The current implementation uses a mock simulation engine. To connect to your actual simulation engine:
- Modify the
simulateTransactionfunction insrc/background/index.ts. - Replace the mock implementation with your actual simulation engine API endpoint.
- Update the response handling to match your API's response format.
- The extension only intercepts transaction requests and does not modify them.
- No private keys or sensitive data are accessed or stored.
- All simulation results are stored locally in the extension's storage.
- The extension operates in an isolated environment.
Feel free to submit issues and enhancement requests!
This project is licensed under the MIT License. See the COPYING file for details.