Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Add yarn fork command #316

Merged
merged 1 commit into from
Aug 10, 2023
Merged

Add yarn fork command #316

merged 1 commit into from
Aug 10, 2023

Conversation

0xNeshi
Copy link
Contributor

@0xNeshi 0xNeshi commented Aug 10, 2023

Closes #315

Explanation of the solution

Forks a Mumbai blockchain, where the Mumbai RPC URL is read from .env file.

@SovereignAndrey @stevieraykatz implemented it as-is for our immediate purposes where we're mostly debugging Mumbai, so set it as default. Can modify the script to include RPC URL of any blockchain so that we can fork both Polygon Mainnet, Goerli, Ethereum Mainnet etc., but this would require either:

  • setting the RPC URL manually when calling the script
    OR
  • creating a more complex script (possibly converting to bash script) that would accept network names as parameters, e.g. to fork a Mumbai blockchain we'd call yarn fork mumbai and to fork Ethereum Mainnet we'd call yarn fork ethereum etc.

Instructions on making this work

  • run yarn or yarn install to install npm dependencies
  • run yarn fork
  • verify a forked Mumbai blockchain node is run locally

@0xNeshi 0xNeshi added the enhancement New feature or request label Aug 10, 2023
@0xNeshi 0xNeshi self-assigned this Aug 10, 2023
@0xNeshi 0xNeshi changed the title Add 'yarn fork' command Add yarn fork command Aug 10, 2023
@stevieraykatz stevieraykatz merged commit 7b4b610 into master Aug 10, 2023
1 check failed
@stevieraykatz stevieraykatz deleted the fork-script branch August 10, 2023 19:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add yarn script to run a forked blockchain on a local node
2 participants