This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 681
feat: add --flavor
feature (ganache chain plugins)
#4362
Merged
Merged
Conversation
This file contains 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
Deploying with Cloudflare Pages
|
davidmurdoch
commented
Apr 15, 2023
davidmurdoch
commented
Apr 15, 2023
This was referenced May 7, 2024
This was referenced May 7, 2024
This was referenced May 18, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Refactor ganache to allow for external plugins, aka "flavors".
Ganache Flavors are plugins that can be used to launch test networks for chains
other than Ganache's built-in Ethereum networks. They are loaded at runtime via
Ganache's
--flavor
flag.We first shipped this as an internal feature in Q2 2021 with the
filecoin
flavor. We are now externalizing this feature by providing a way for the community to build their own ganache flavors.This first external implementation is experimental. We'd like to collect feedback from users and get an idea for what to add or change to the new
@ganache/flavor
package. If you don't like something about this interface or feel like it's missing things (it is!) please open a new issue and let us know about it. We'd be happy to chat about this or even hop on a short call to discuss what you are looking for.What this is not: this is not a way of extending our Ethereum implementation. While we'd love to make our default Ethereum flavor even more flexible and configurable, this is not what this change does.
To create a new flavor, you must create a new package that exports your "Flavor". A
flavor is a JavaScript object that implements our Flavor interface.
Here is an example of a "Hello World"-style flavor in TypeScript:
Check out the example implementation for a more-in-depth example.