Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 13 additions & 2 deletions packages/subgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ npm run deploy-local

The subgraph will be available at: http://localhost:8000/subgraphs/name/DataProtector/graphql

### Thegraph network

To deploy this subgraph on Thegraph network:

1. Update `networks.json` file to use the correct addresses for the correct network.

2. Authenticate: `npx graph auth <token>`

3. Deploy: `npx graph deploy <slug> --network <name>`


### Hosted Production Environments

We use CI/CD pipelines to deploy our subgraphs to hosted environments.
Expand Down Expand Up @@ -53,7 +64,7 @@ For zero-downtime updates to the production subgraph:

2. **Wait for Indexing Completion**
- Monitor the temporary deployment until it's fully synced

3. **Deploy to Production (Zero Downtime)**
- Once temporary deployment is ready, trigger: `subgraph-deploy-prod`
- This swaps the deployments with no service interruption
Expand Down Expand Up @@ -108,7 +119,7 @@ query MyQuery($requiredSchema: [String!]!, $start: Int!, $range: Int!) {

1. Update schema.graphql and subgraph.yaml as needed
2. Run codegen to generate TypeScript types: `npm run codegen`
3. Implement mapping handlers in src/ files
3. Implement mapping handlers in src/ files
4. Build the subgraph: `npm run build`
5. Test locally before deploying to production environments

Expand Down
20 changes: 10 additions & 10 deletions packages/subgraph/networks.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"fuji": {
"DataProtector": {
"address": "0x2296daeDD3090750a80fFB2D0147669984909ED2",
"startBlock": 39768073
"address": "0x2296daeDD3090750a80fFB2D0147669984909ED2",
"startBlock": 39768073
},
"DatasetRegistry": {
"address": "0x3441A0C9FE488c51fcABa2bAAA048720f4D4F72D",
Expand All @@ -23,29 +23,29 @@
},
"arbitrum-sepolia": {
"DataProtector": {
"address": "0x2296daeDD3090750a80fFB2D0147669984909ED2",
"startBlock": 145960686
"address": "0x2296daeDD3090750a80fFB2D0147669984909ED2",
"startBlock": 145960686
},
"DatasetRegistry": {
"address": "0x3441A0C9FE488c51fcABa2bAAA048720f4D4F72D",
"startBlock": 145960686
},
"DataProtectorSharing": {
"address": "0x0000000000000000000000000000000000000000",
"startBlock": 0
"address": "0x2485Ed90d4566516298B7D01462df8d1A41E13AE",
"startBlock": 145960686
},
"AppRegistry": {
"address": "0x4a6531ce5150ee716b2d93865D0fbB9ce5492D17",
"startBlock": 0
"startBlock": 145960686
},
"AddOnlyAppWhitelistRegistry": {
"address": "0x0000000000000000000000000000000000000000",
"startBlock": 0
"address": "0x9902e2F89DCC4dcCb75805096Ead2e58Fc389b7D",
"startBlock": 145960686
}
},
"bellecour": {
"DataProtector": {
"address": "0x3a4Ab33F3D605e75b6D00A32A0Fa55C3628F6A59",
"address": "0x3a4Ab33F3D605e75b6D00A32A0Fa55C3628F6A59",
"startBlock": 25455501
},
"DatasetRegistry": {
Expand Down
23 changes: 19 additions & 4 deletions packages/subgraph/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading