Skip to content
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

Registry support #1788

Merged
merged 43 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
b03ae1b
Update all projects dependencies
0237h Nov 26, 2024
7cdb481
Update all projects dependencies
0237h Nov 26, 2024
21c00c2
Update all projects dependencies
0237h Nov 26, 2024
503cad6
add registry support
YaroShkvorets Dec 2, 2024
7d289eb
replace studio url in examples
YaroShkvorets Dec 2, 2024
00043bf
fix sorting
YaroShkvorets Dec 2, 2024
bafbccb
improve prompts
YaroShkvorets Dec 3, 2024
8e88023
Warning for Near chains
YaroShkvorets Dec 3, 2024
78aaa25
fix near handling
YaroShkvorets Dec 3, 2024
d3c442e
refactor init prompts
YaroShkvorets Dec 4, 2024
35f0cb8
add prompt manager
YaroShkvorets Dec 4, 2024
f75cbd5
simplify prompt manager, add non-interactive mode
YaroShkvorets Dec 4, 2024
2343be2
handle skipped steps on escape
YaroShkvorets Dec 4, 2024
5f071bc
delete results for skipped step
YaroShkvorets Dec 4, 2024
ea8c867
refactor prompts
YaroShkvorets Dec 6, 2024
cc123e9
improve init prompt wording
YaroShkvorets Dec 7, 2024
591d3c7
fix broken lock file
YaroShkvorets Dec 7, 2024
f96e92f
Merged chore/update-dependencies branch
YaroShkvorets Dec 8, 2024
e5a7d08
fix lint
YaroShkvorets Dec 9, 2024
cd66585
update snapshot
YaroShkvorets Dec 9, 2024
78685c9
add local registry fallback
YaroShkvorets Dec 9, 2024
4ef945a
changeset
YaroShkvorets Dec 9, 2024
85d1cb0
Merge from main
YaroShkvorets Dec 9, 2024
b6be8ff
add registry json to prettier ignore
YaroShkvorets Dec 9, 2024
212c12e
Merge branch 'main' into yaro/registry-prompt
YaroShkvorets Dec 9, 2024
cab1678
fix example
YaroShkvorets Dec 9, 2024
44a8974
hide subgraph init option
YaroShkvorets Dec 9, 2024
e46c35d
re-add website dev deps
YaroShkvorets Dec 9, 2024
af1edc4
update lock file
YaroShkvorets Dec 9, 2024
ffbc411
add call to action if can't find a network
YaroShkvorets Dec 9, 2024
7e9ff4b
fix indexEvents bug
YaroShkvorets Dec 9, 2024
edfcd6d
fix imports
YaroShkvorets Dec 10, 2024
a7c66da
remove irrelevant comment
YaroShkvorets Dec 10, 2024
746fe0a
rename contracts test file
YaroShkvorets Dec 10, 2024
c83c5c5
fix registry loading on localhost
YaroShkvorets Dec 10, 2024
0295e4d
import createIpfsClient
YaroShkvorets Dec 10, 2024
4ff2c20
add "type to filter" hint
YaroShkvorets Dec 10, 2024
7ebea7b
remove unneeded await
YaroShkvorets Dec 10, 2024
aa2bd67
add more details to changeset
YaroShkvorets Dec 10, 2024
1ed6c12
proper error code on Ctrl-C
YaroShkvorets Dec 10, 2024
1d53441
combine ifs
YaroShkvorets Dec 10, 2024
a88bce0
Merge remote-tracking branch 'my/yaro/registry-prompt' into yaro/regi…
YaroShkvorets Dec 10, 2024
3d8d6a5
fix lint
YaroShkvorets Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/new-gorillas-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphprotocol/graph-cli': minor
---

- add networks registry support
- improve `graph init` flow
YaroShkvorets marked this conversation as resolved.
Show resolved Hide resolved
- allow ipfs/url for substreams package
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ generated
packages/cli/tests/cli/init
packages/cli/tests/cli/validation
packages/cli/tests/cli/add
packages/cli/config/TheGraphNetworksRegistry.json
0237h marked this conversation as resolved.
Show resolved Hide resolved
pnpm-lock.yaml
website/src/graphql-env.d.ts
4 changes: 2 additions & 2 deletions examples/aggregations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"scripts": {
"build": "graph build",
"codegen": "graph codegen",
"create": "graph create example --node https://api.thegraph.com/deploy/",
"create": "graph create example --node https://api.studio.thegraph.com/deploy/",
"create-local": "graph create example --node http://127.0.0.1:8020",
"deploy": "graph deploy example --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy": "graph deploy example --ipfs https://api.thegraph.com/ipfs/ --node https://api.studio.thegraph.com/deploy/",
"deploy-local": "graph deploy example --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"test": "graph test"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/arweave-blocks-transactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"scripts": {
"build": "graph build",
"codegen": "graph codegen",
"create": "graph create arweave-example --node https://api.thegraph.com/deploy/",
"create": "graph create arweave-example --node https://api.studio.thegraph.com/deploy/",
"create-local": "graph create arweave-example --node http://localhost:8020",
"deploy": "graph deploy arweave-example --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy": "graph deploy arweave-example --ipfs https://api.thegraph.com/ipfs/ --node https://api.studio.thegraph.com/deploy/",
"deploy-local": "graph deploy arweave-example -l v0.1.0 --ipfs http://localhost:5001 --node http://localhost:8020",
"remove-local": "graph remove arweave-example --node http://localhost:8020"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/cosmos-block-filtering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"scripts": {
"build": "graph build",
"codegen": "graph codegen",
"create": "graph create cosmos-block-filtering --node https://api.thegraph.com/deploy/",
"create": "graph create cosmos-block-filtering --node https://api.studio.thegraph.com/deploy/",
"create-local": "graph create cosmos-block-filtering --node http://127.0.0.1:8020",
"deploy": "graph deploy cosmos-block-filtering --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy": "graph deploy cosmos-block-filtering --ipfs https://api.thegraph.com/ipfs/ --node https://api.studio.thegraph.com/deploy/",
"deploy-local": "graph deploy cosmos-block-filtering -l v0.1.0 --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"prepare:cosmoshub": "mustache config/cosmoshub.json subgraph.template.yaml > subgraph.yaml",
"prepare:osmosis": "mustache config/osmosis.json subgraph.template.yaml > subgraph.yaml",
Expand Down
4 changes: 2 additions & 2 deletions examples/cosmos-osmosis-token-swaps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"scripts": {
"build": "graph build",
"codegen": "graph codegen",
"create": "graph create osmosis-token-swaps --node https://api.thegraph.com/deploy/",
"create": "graph create osmosis-token-swaps --node https://api.studio.thegraph.com/deploy/",
"create-local": "graph create osmosis-token-swaps --node http://0.0.0.0:8020",
"deploy": "graph deploy osmosis-token-swaps --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy": "graph deploy osmosis-token-swaps --ipfs https://api.thegraph.com/ipfs/ --node https://api.studio.thegraph.com/deploy/",
"deploy-local": "graph deploy osmosis-token-swaps -l v0.1.0 --ipfs http://0.0.0.0:5001 --node http://0.0.0.0:8020",
"remove-local": "graph remove osmosis-token-swaps --node http://0.0.0.0:8020"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/cosmos-validator-delegations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"scripts": {
"build": "graph build",
"codegen": "graph codegen",
"create": "graph create cosmos-validator-delegations --node https://api.thegraph.com/deploy/",
"create": "graph create cosmos-validator-delegations --node https://api.studio.thegraph.com/deploy/",
"create-local": "graph create cosmos-validator-delegations --node http://127.0.0.1:8020",
"deploy": "graph deploy cosmos-validator-delegations --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy": "graph deploy cosmos-validator-delegations --ipfs https://api.thegraph.com/ipfs/ --node https://api.studio.thegraph.com/deploy/",
"deploy-local": "graph deploy cosmos-validator-delegations -l v0.1.0 --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"prepare:cosmoshub": "mustache config/cosmoshub.json subgraph.template.yaml > subgraph.yaml",
"prepare:osmosis": "mustache config/osmosis.json subgraph.template.yaml > subgraph.yaml",
Expand Down
4 changes: 2 additions & 2 deletions examples/cosmos-validator-rewards/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"scripts": {
"build": "graph build",
"codegen": "graph codegen",
"create": "graph create cosmos-validator-rewards --node https://api.thegraph.com/deploy/",
"create": "graph create cosmos-validator-rewards --node https://api.studio.thegraph.com/deploy/",
"create-local": "graph create cosmos-validator-rewards --node http://127.0.0.1:8020",
"deploy": "graph deploy cosmos-validator-rewards --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy": "graph deploy cosmos-validator-rewards --ipfs https://api.thegraph.com/ipfs/ --node https://api.studio.thegraph.com/deploy/",
"deploy-local": "graph deploy cosmos-validator-rewards -l v0.1.0 --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020",
"prepare:cosmoshub": "mustache config/cosmoshub.json subgraph.template.yaml > subgraph.yaml",
"prepare:osmosis": "mustache config/osmosis.json subgraph.template.yaml > subgraph.yaml",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const path = require('node:path');
const { system, patching, filesystem } = require('gluegun');
const { createApolloFetch } = require('apollo-fetch');
const { ethers } = require('hardhat');
const { expect } = require('chai');
import path from 'node:path';
import { createApolloFetch } from 'apollo-fetch';
import { expect } from 'chai';
import { filesystem, patching, system } from 'gluegun';
import { ethers } from 'hardhat';

const srcDir = path.join(__dirname, '..');

Expand Down Expand Up @@ -56,7 +56,7 @@ describe('Basic event handlers', () => {
await patching.replace(
path.join(srcDir, 'subgraph.yaml'),
'DEPLOYED_CONTRACT_ADDRESS',
registry.target,
String(registry.target),
);

await registry.setMythicalGravatar();
Expand Down
3 changes: 2 additions & 1 deletion examples/ethereum-basic-event-handlers/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist"
"outDir": "dist",
"esModuleInterop": true
}
}
4 changes: 2 additions & 2 deletions examples/ethereum-gravatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"build": "graph build",
"build:contract": "hardhat compile",
"codegen": "graph codegen",
"create": "graph create example --node https://api.thegraph.com/deploy/",
"create": "graph create example --node https://api.studio.thegraph.com/deploy/",
"create-local": "graph create example --node http://127.0.0.1:8020",
"deploy": "graph deploy example --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy": "graph deploy example --ipfs https://api.thegraph.com/ipfs/ --node https://api.studio.thegraph.com/deploy/",
"deploy-local": "graph deploy example --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/near-blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"scripts": {
"build": "graph build",
"codegen": "graph codegen",
"create": "graph create example --node https://api.thegraph.com/deploy/",
"create": "graph create example --node https://api.studio.thegraph.com/deploy/",
"create-local": "graph create example --node http://127.0.0.1:8020",
"deploy": "graph deploy example --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy": "graph deploy example --ipfs https://api.thegraph.com/ipfs/ --node https://api.studio.thegraph.com/deploy/",
"deploy-local": "graph deploy example --ipfs http://localhost:5001 --node http://127.0.0.1:8020"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/near-receipts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"scripts": {
"build": "graph build",
"codegen": "graph codegen",
"create": "graph create example --node https://api.thegraph.com/deploy/",
"create": "graph create example --node https://api.studio.thegraph.com/deploy/",
"create-local": "graph create example --node http://127.0.0.1:8020",
"deploy": "graph deploy example --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy": "graph deploy example --ipfs https://api.thegraph.com/ipfs/ --node https://api.studio.thegraph.com/deploy/",
"deploy-local": "graph deploy example --ipfs http://localhost:5001 --node http://127.0.0.1:8020"
},
"devDependencies": {
Expand Down
Loading
Loading