diff --git a/README.md b/README.md index 4f15e138be56..db7e1a2f7f33 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,17 @@ To learn how to contribute to the MetaMask codebase, visit our [Contributor Docs To learn how to contribute to the MetaMask Extension project itself, visit our [Extension Docs](https://github.com/MetaMask/metamask-extension/tree/develop/docs). +## Table of Contents + +- [GitHub Codespaces quickstart](#github-codespaces-quickstart) +- [Building on your local machine](#building-on-your-local-machine) +- [Git Hooks](#git-hooks) +- [Contributing](#contributing) +- [Architecture](#architecture) +- [Other Docs](#other-docs) +- [Dapp Developer Resources](#dapp-developer-resources) +- [Repository Overview](#repository-overview) + ## GitHub Codespaces quickstart As an alternative to building on your local machine, there is a new option to get a development environment up and running in less than 5 minutes by using GitHub Codespaces. Please note that there is a [Limited Free Monthly Quota](https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces), and after that GitHub will start charging you. @@ -254,4 +265,21 @@ Whenever you change dependencies (adding, removing, or updating, either in `pack - [Prompt your users to add and switch to a new network.](https://docs.metamask.io/wallet/how-to/add-network/) - [Change the logo that appears when your dapp connects to MetaMask.](https://docs.metamask.io/wallet/how-to/display/icon/) -[1]: http://www.nomnoml.com/#view/%5B%3Cactor%3Euser%5D%0A%0A%5Bmetamask-ui%7C%0A%20%20%20%5Btools%7C%0A%20%20%20%20%20react%0A%20%20%20%20%20redux%0A%20%20%20%20%20thunk%0A%20%20%20%20%20ethUtils%0A%20%20%20%20%20jazzicon%0A%20%20%20%5D%0A%20%20%20%5Bcomponents%7C%0A%20%20%20%20%20app%0A%20%20%20%20%20account-detail%0A%20%20%20%20%20accounts%0A%20%20%20%20%20locked-screen%0A%20%20%20%20%20restore-vault%0A%20%20%20%20%20identicon%0A%20%20%20%20%20config%0A%20%20%20%20%20info%0A%20%20%20%5D%0A%20%20%20%5Breducers%7C%0A%20%20%20%20%20app%0A%20%20%20%20%20metamask%0A%20%20%20%20%20identities%0A%20%20%20%5D%0A%20%20%20%5Bactions%7C%0A%20%20%20%20%20%5BbackgroundConnection%5D%0A%20%20%20%5D%0A%20%20%20%5Bcomponents%5D%3A-%3E%5Bactions%5D%0A%20%20%20%5Bactions%5D%3A-%3E%5Breducers%5D%0A%20%20%20%5Breducers%5D%3A-%3E%5Bcomponents%5D%0A%5D%0A%0A%5Bweb%20dapp%7C%0A%20%20%5Bui%20code%5D%0A%20%20%5Bweb3%5D%0A%20%20%5Bmetamask-inpage%5D%0A%20%20%0A%20%20%5B%3Cactor%3Eui%20developer%5D%0A%20%20%5Bui%20developer%5D-%3E%5Bui%20code%5D%0A%20%20%5Bui%20code%5D%3C-%3E%5Bweb3%5D%0A%20%20%5Bweb3%5D%3C-%3E%5Bmetamask-inpage%5D%0A%5D%0A%0A%5Bmetamask-background%7C%0A%20%20%5Bprovider-engine%5D%0A%20%20%5Bhooked%20wallet%20subprovider%5D%0A%20%20%5Bid%20store%5D%0A%20%20%0A%20%20%5Bprovider-engine%5D%3C-%3E%5Bhooked%20wallet%20subprovider%5D%0A%20%20%5Bhooked%20wallet%20subprovider%5D%3C-%3E%5Bid%20store%5D%0A%20%20%5Bconfig%20manager%7C%0A%20%20%20%20%5Brpc%20configuration%5D%0A%20%20%20%20%5Bencrypted%20keys%5D%0A%20%20%20%20%5Bwallet%20nicknames%5D%0A%20%20%5D%0A%20%20%0A%20%20%5Bprovider-engine%5D%3C-%5Bconfig%20manager%5D%0A%20%20%5Bid%20store%5D%3C-%3E%5Bconfig%20manager%5D%0A%5D%0A%0A%5Buser%5D%3C-%3E%5Bmetamask-ui%5D%0A%0A%5Buser%5D%3C%3A--%3A%3E%5Bweb%20dapp%5D%0A%0A%5Bmetamask-contentscript%7C%0A%20%20%5Bplugin%20restart%20detector%5D%0A%20%20%5Brpc%20passthrough%5D%0A%5D%0A%0A%5Brpc%20%7C%0A%20%20%5Bethereum%20blockchain%20%7C%0A%20%20%20%20%5Bcontracts%5D%0A%20%20%20%20%5Baccounts%5D%0A%20%20%5D%0A%5D%0A%0A%5Bweb%20dapp%5D%3C%3A--%3A%3E%5Bmetamask-contentscript%5D%0A%5Bmetamask-contentscript%5D%3C-%3E%5Bmetamask-background%5D%0A%5Bmetamask-background%5D%3C-%3E%5Bmetamask-ui%5D%0A%5Bmetamask-background%5D%3C-%3E%5Brpc%5D%0A +## Repository Overview + +The MetaMask Browser Extension repository is organized with the following directories and configuration files: + +- Configuration files: + - `.browserslistrc` + - `.circleci/config.yml` + - `.eslintrc.js` + - `.prettierrc.yml` +- Directories: + - `.circleci`: Includes scripts and configuration files for continuous integration and deployment. + - `.devcontainer`: Contains configuration files for development containers, including `devcontainer.json` and various setup scripts. + - `.github`: Contains GitHub-specific files like issue templates, pull request templates, and GitHub Actions workflows. + - `app`: Holds the main source code for the MetaMask extension, including localization files, images, scripts, and HTML files. + - `docs`: Contains documentation related to the project. + - `shared`: Includes shared constants, modules, and utilities. + - `test`: Has test data, helpers, and end-to-end tests. + - `ui`: Contains React components, hooks, contexts, and styles used in the MetaMask extension's user interface. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 000000000000..0ce4f77aef77 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to MetaMask + +Thank you for your interest in contributing to the MetaMask Browser Extension! This document provides guidelines and instructions to help you navigate the repository and contribute effectively. + +## How to Navigate the Repository + +The MetaMask Browser Extension repository is organized into several directories, each serving a specific purpose. Here is a brief description of each directory: + +- `.circleci`: Contains scripts and configuration files for continuous integration and deployment using CircleCI. +- `.devcontainer`: Contains configuration files for development containers, including `devcontainer.json` and various setup scripts. +- `.github`: Contains GitHub-specific files, such as issue templates, pull request templates, and GitHub Actions workflows. +- `app`: Contains the main source code for the MetaMask extension, including localization files, images, scripts, and HTML files. +- `docs`: Contains documentation related to the project, such as publishing guides, QA guides, and design system information. +- `shared`: Contains shared constants, modules, and utilities used across the project. +- `test`: Contains test data, helpers, and end-to-end tests for the project. +- `ui`: Contains the React components, hooks, contexts, and styles used in the MetaMask extension's user interface. + +## Relevant Documentation + +Here are some links to relevant documentation files that will help you get started: + +- [How to add custom build to Chrome](./add-to-chrome.md) +- [How to add custom build to Firefox](./add-to-firefox.md) +- [Publishing Guide](./publishing.md) +- [How to add a feature behind a secret feature flag](./secret-preferences.md) +- [Developing on MetaMask](../development/README.md) diff --git a/docs/README.md b/docs/README.md index 80f5901b57ba..f955ef337e9b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,6 +10,19 @@ For up to the minute news, follow our [Twitter](https://twitter.com/metamask_io) To learn how to develop MetaMask-compatible applications, visit our [Developer Docs](https://metamask.github.io/metamask-docs/). +## Repository Structure + +The MetaMask Browser Extension repository is organized into several directories, each serving a specific purpose. Here is a brief description of each directory: + +- `.circleci`: Contains scripts and configuration files for continuous integration and deployment using CircleCI. +- `.devcontainer`: Contains configuration files for development containers, including `devcontainer.json` and various setup scripts. +- `.github`: Contains GitHub-specific files, such as issue templates, pull request templates, and GitHub Actions workflows. +- `app`: Contains the main source code for the MetaMask extension, including localization files, images, scripts, and HTML files. +- `docs`: Contains documentation related to the project, such as publishing guides, QA guides, and design system information. +- `shared`: Contains shared constants, modules, and utilities used across the project. +- `test`: Contains test data, helpers, and end-to-end tests for the project. +- `ui`: Contains the React components, hooks, contexts, and styles used in the MetaMask extension's user interface. + - [How to add custom build to Chrome](./add-to-chrome.md) - [How to add custom build to Firefox](./add-to-firefox.md) - [Publishing Guide](./publishing.md) diff --git a/docs/REPOSITORY_STRUCTURE.md b/docs/REPOSITORY_STRUCTURE.md new file mode 100644 index 000000000000..d05a153b0690 --- /dev/null +++ b/docs/REPOSITORY_STRUCTURE.md @@ -0,0 +1,77 @@ +# MetaMask Browser Extension Repository Structure + +The MetaMask Browser Extension repository is organized into several directories, each serving a specific purpose. Below is a detailed description of each directory and its purpose, along with examples of important files and their roles. + +## Directories + +### `.circleci` +Contains scripts and configuration files for continuous integration and deployment using CircleCI. + +**Examples of important files:** +- `config.yml`: Main configuration file for CircleCI. + +### `.devcontainer` +Contains configuration files for development containers, including `devcontainer.json` and various setup scripts. + +**Examples of important files:** +- `devcontainer.json`: Configuration file for the development container. + +### `.github` +Contains GitHub-specific files, such as issue templates, pull request templates, and GitHub Actions workflows. + +**Examples of important files:** +- `CODEOWNERS`: Defines the code owners for the repository. +- `CONTRIBUTING.md`: Guidelines for contributing to the project. +- `pull-request-template.md`: Template for pull requests. + +### `app` +Holds the main source code for the MetaMask extension, including localization files, images, scripts, and HTML files. + +**Examples of important files:** +- `background.html`: Background page for the extension. +- `home.html`: Home page for the extension. +- `scripts/background.js`: Background script for the extension. + +### `docs` +Contains documentation related to the project, such as publishing guides, QA guides, and design system information. + +**Examples of important files:** +- `README.md`: Overview of the documentation. +- `publishing.md`: Guide for publishing the extension. +- `QA_Guide.md`: Quality assurance guide. + +### `shared` +Includes shared constants, modules, and utilities used across the project. + +**Examples of important files:** +- `constants/accounts.ts`: Shared constants related to accounts. +- `constants/gas.ts`: Shared constants related to gas. + +### `test` +Has test data, helpers, and end-to-end tests for the project. + +**Examples of important files:** +- `e2e/tests`: End-to-end tests for the extension. +- `unit`: Unit tests for the extension. + +### `ui` +Contains React components, hooks, contexts, and styles used in the MetaMask extension's user interface. + +**Examples of important files:** +- `components`: React components used in the extension. +- `hooks`: Custom hooks used in the extension. +- `styles`: Styles used in the extension. + +## Configuration Files + +### `.browserslistrc` +Specifies the list of browsers that the project supports. + +### `.circleci/config.yml` +Main configuration file for CircleCI. + +### `.eslintrc.js` +Configuration file for ESLint, specifying linting rules for the project. + +### `.prettierrc.yml` +Configuration file for Prettier, specifying code formatting rules for the project. diff --git a/package.json b/package.json index fad9fae96418..c31a7bc2e4f5 100644 --- a/package.json +++ b/package.json @@ -353,14 +353,14 @@ "@metamask/scure-bip39": "^2.0.3", "@metamask/selected-network-controller": "^18.0.1", "@metamask/signature-controller": "^19.1.0", - "@metamask/smart-transactions-controller": "^13.0.0", + "@metamask/smart-transactions-controller": "^14.0.0", "@metamask/snaps-controllers": "^9.7.0", "@metamask/snaps-execution-environments": "^6.7.2", "@metamask/snaps-rpc-methods": "^11.1.1", "@metamask/snaps-sdk": "^6.5.1", "@metamask/snaps-utils": "^8.1.1", "@metamask/transaction-controller": "^37.2.0", - "@metamask/user-operation-controller": "^13.0.0", + "@metamask/user-operation-controller": "^14.0.1", "@metamask/utils": "^9.3.0", "@ngraveio/bc-ur": "^1.1.12", "@noble/hashes": "^1.3.3",