🛠Contribution Guidelines
Welcome to our project! We appreciate your interest in contributing. This document provides detailed instructions on setting up the development environment, running the demo, and performing end-to-end testing.
Development Environment Setup
To get started with development, follow these steps:
-
Install pnpm: If you haven't already, make sure to install pnpm, which is our package manager of choice.
-
Install Project Dependencies: Run the following command to install the project's dependencies:
pnpm install
- Start the Development Build: Launch the development server with this command:
pnpm run dev
- Load Extension in Your Browser: Load the dist directory as an unpacked extension in your web browser.
Running the Demo
To run the project's demo, follow these steps:
-
Development Environment: Ensure you have set up the development environment as outlined above.
-
Build or Start the Demo: Choose one of the following options based on your preference:
- To build the demo, make sure you finished the setup steps.
- To start the merkle tree mock server, execute these commands:
pnpm run merkle:start
- To start the demo, execute these commands:
pnpm run demo:start
End-to-End Testing
If you'd like to contribute by running end-to-end tests, follow these steps:
- Install Playwright Dependencies: Install Playwright dependencies for Chromium by running the following command:
pnpx playwright install --with-deps chromium
- Install Extension and Demo Dependencies: Make sure you have installed dependencies for both the extension and the demo:
pnpm install
-
Configure .env.test File:
- Create a
.env.test
file and set theMETAMASK_EXTENSION_ID
. - You can find the
METAMASK_EXTENSION_ID
in the log output when running the end-to-end testspnpm run e2e
. Different environments may require differentMETAMASK_EXTENSION_ID
values, so be sure to specify it explicitly.
- Create a
-
Build the Extension for Testing: Build the extension for end-to-end testing:
pnpm run build:e2e
- Run End-to-End Tests: Execute the following command to run Playwright end-to-end tests:
pnpm run e2e
Thank you for considering contributing to our project. We look forward to your valuable contributions!