-
Notifications
You must be signed in to change notification settings - Fork 229
Add network config file #848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add network config file #848
Conversation
…xtract logic from init.js to network.js
… config. Always udpade templates network. Othe small changes
I just pushed a copy of your branch to trigger the CI. I'll try to get write access to you LimeChain folks soon 🙂 Edit: it passed 🎉 , I'll try to review this between today and tomorrow 👩💻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll approve and merge it for now so I don't block you further, we can do the fix of the HELP
string later.
--skip-migrations Skip subgraph migrations (default: false) | ||
-w, --watch Regenerate types when subgraph files change (default: false) | ||
--network <name> Network to use from networks.json | ||
--network-file <path> Networks file (default: "./networks.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is missing a space before Networks file
@dimitrovmaksim I just released this on Soon I'll fix the Release page in Github because we have the tags but not the release notes for them (most of them are on PRs). |
Resolves #837
What this PR does:
graph init
will now also generatenetworks.json
from the data insubgraph.yaml
file in the format specified in the linked Issue.graph build
:--network <name>
and--network-file <path>
--network <name>
option will update thenetwork
,address/account
(NEAR usesaccount
) andstartBlock
for each dataSources in subgraph.yaml to the values defined in the networks.json file. Also automatically updates all templates' (if any) network to the one passed with--network
option. After that the build command will continue with the existingbuild
functionality.Issues:
When running yarn test, jest does not exit, but if I run every test suite separately it exits correctly