PoC: Command to run ganache with mainnet fork + env var to pre-populate development state#19389
Closed
PoC: Command to run ganache with mainnet fork + env var to pre-populate development state#19389
Conversation
…fork flag, using your local infura project id to fork mainnet
…work and onboarding state
…start with DEV_STATE env var
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Contributor
|
This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions. |
Contributor
|
This PR was closed because there has been no follow up activity in the last 14 days. Thank you for your contributions. |
13 tasks
7 tasks
pedronfigueiredo
added a commit
that referenced
this pull request
May 27, 2024
## **Description** - Implements a new development build script that skips onboarding by preloading state from the end-to-end test fixtures. - The vault state is dynamically generated from the environment variables `TEST_SRP` and `PASSWORD`. - This build hides all the "What's New?" modals and the "Product Tour" as well as all onboarding screens. - The network is set to "Sepolia" by default. - Alternatively, onboarding can be skipped without setting a `TEST_SRP`, in which case the e2e tests SRP and accounts are used. [](https://codespaces.new/MetaMask/metamask-extension/pull/23781?quickstart=1) ## **Related issues** Related: #23615, #19389 ## **Manual testing steps** 1. Checkout this branch 2. Set a `TEST_SRP` environment variable on your `.metamaskrc` file as well as `PASSWORD` if you haven't already 3. Run `yarn start:skip-onboarding` 4. Load the extension on your favorite browser and open the popup ## **Screenshots/Recordings** ### **After** https://github.com/MetaMask/metamask-extension/assets/13814744/e34bac0f-8f6f-4d04-8452-b9962c99cfb9 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
The usual local development flow is this:
yarn startyarn start:ganache, or (more effectively) with the flags to fork mainnet (which requires finding your infura id and copying and pasting it into the correct flags)The changes in this PR simplify this to:
yarn start:devStateOpening as a draft for demo and comment.
Screenshots/Screencaps
Before
After
Manual Testing Steps
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Boardlabel.In this case, a QA Engineer approval will be be required.