A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/development
Brad Decker 99808eb02c
remove customize-gas modal and related code that is no longer used (#16004)
2 years ago
..
build Adding Icon component and removing BaseIcon component (#15772) 2 years ago
charts Adding artifacts (#15145) 2 years ago
highlights chore: Adjust trailing whitespace (#15636) 2 years ago
lib remove exclusions for mismatched object jsdoc type casing (#15351) 2 years ago
states Adding Sepolia as a default test network (#15787) 2 years ago
ts-migration-dashboard remove customize-gas modal and related code that is no longer used (#16004) 2 years ago
README.md chore: Adjust trailing whitespace (#15636) 2 years ago
announcer.js development scripts: add node shebang; mark as executable (#15655) 2 years ago
chromereload.js Build - refactor background process to use html (#10769) 4 years ago
create-static-server.js development scripts: add node shebang; mark as executable (#15655) 2 years ago
empty.js Build - refactor background process to use html (#10769) 4 years ago
generate-icon-names.js Fix/remove mistake script (#15983) 2 years ago
generate-lavamoat-policies.js development scripts: add node shebang; mark as executable (#15655) 2 years ago
generate-migration.sh Fixing migration script generation paths (#10664) 4 years ago
gource-viz.sh chore: Adjust trailing whitespace (#15636) 2 years ago
jest.config.js Jest tests - incremental coverage (#14612) 3 years ago
metamaskbot-build-announce.js Capture user actions times for MV2 benchmark and generate artifacts (#15353) 2 years ago
missing-locale-strings.js development scripts: add node shebang; mark as executable (#15655) 2 years ago
mock-3box.js @metamask/eslint config@5.0.0 (#10358) 4 years ago
mock-segment.js development scripts: add node shebang; mark as executable (#15655) 2 years ago
run-ganache.sh Adding support for EIP-1559 in E2E tests (#13282) 3 years ago
sentry-publish.js development scripts: add node shebang; mark as executable (#15655) 2 years ago
sentry-upload-artifacts.sh Automate the Flask release process (#13898) 3 years ago
shellcheck.sh Add lint:shellcheck:package (#7568) 5 years ago
show-deps-install-scripts.js development scripts: add node shebang; mark as executable (#15655) 2 years ago
source-map-explorer.sh Excluding sourcemaps comment in production builds (#10695) 4 years ago
sourcemap-validator.js development scripts: add node shebang; mark as executable (#15655) 2 years ago
static-server.js development scripts: add node shebang; mark as executable (#15655) 2 years ago
stream-flat-map.js Build - refactor for bundle factoring and swappable runtime (#11080) 3 years ago
verify-locale-strings.js Remove related UI code from the app dir (#15384) 2 years ago

README.md

Development

Several files which are needed for developing on MetaMask.

Usually each file or directory contains information about its scope / usage.

Segment

Debugging with the Mock Segment API

To start the Mock Segment API:

  • Add/replace the SEGMENT_HOST and SEGMENT_WRITE_KEY variables in .metamaskrc
    SEGMENT_HOST='http://localhost:9090'
    SEGMENT_WRITE_KEY='FAKE'
    
  • Build the project to the ./dist/ folder with yarn dist
  • Run the Mock Segment API from the command line
    node development/mock-segment.js
    

Events triggered whilst using the extension will be logged to the console of the Mock Segment API.

More information on the API and its usage can be found here.

Debugging in Segment

To debug in a production Segment environment:

  • Create a free account on Segment
  • Create a New Workspace
  • Add a Source (Node.js)
  • Copy the Write Key from the API Keys section under Settings
  • Add/replace the SEGMENT_HOST and SEGMENT_WRITE_KEY variables in .metamaskrc
    SEGMENT_HOST='https://api.segment.io'
    SEGMENT_WRITE_KEY='COPIED_WRITE_KEY'
    
  • Build the project to the ./dist/ folder with yarn dist

Events triggered whilst using the extension will be displayed in Segment's Debugger.

Debugging Segment requests in MetaMask

To opt in to MetaMetrics;

  • Unlock the extension
  • Open the Account menu
  • Click the Settings menu item
  • Click the Security & Privacy menu item
  • Toggle the Participate in MetaMetrics menu option to the ON position

You can inspect the requests in the Network tab of your browser's Developer Tools (background.html) by filtering for POST requests to /v1/batch. The full url will be http://localhost:9090/v1/batch or https://api.segment.io/v1/batch respectively.

Sentry

Debugging in Sentry

To debug in a production Sentry environment:

  • If you have not already got a Sentry account, you can create a free account on Sentry
  • Create a New Sentry Organization
    • If you already have an existing Sentry account and workspace, open the sidebar drop down menu, then click Switch organization followed by Create a new organization
  • Create a New Project
  • Copy the Public Key and Project ID from the Client Keys section under your projects Settings
    • Select Settings in the sidebar menu, then select Projects in the secondary menu. Click your project then select Client Keys (DSN) from the secondary menu. Click the Configure button on the Client Keys page and copy your Project Id and Public Key
  • Add/replace the SENTRY_DSN and SENTRY_DSN_DEV variables in .metamaskrc
    SENTRY_DSN_DEV=https://{SENTRY_PUBLIC_KEY}@sentry.io/{SENTRY_PROJECT_ID}
    SENTRY_DSN=https://{SENTRY_PUBLIC_KEY}@sentry.io/{SENTRY_PROJECT_ID}
    
  • Build the project to the ./dist/ folder with yarn dist

Errors reported whilst using the extension will be displayed in Sentry's Issues page.