Skip to content

Commit 863ccf9

Browse files
committed
chore: update CLI
1 parent 9b996e9 commit 863ccf9

File tree

3 files changed

+1473
-1299
lines changed

3 files changed

+1473
-1299
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"deploy-arbitrum": "yarn && yarn prepare:arbitrum && graph deploy --studio graph-network-arbitrum",
1818
"deploy-sepolia": "yarn && yarn prepare:sepolia && graph deploy --studio graph-network-sepolia",
1919
"deploy-arbitrum-sepolia": "yarn && yarn prepare:arbitrum-sepolia && graph deploy --studio graph-network-arbitrum-sepolia",
20+
"deploy-arbitrum-sepolia-test": "yarn && yarn prepare:arbitrum-sepolia && graph deploy horizon-testing-arb-sepolia -l test-old",
2021
"deploy-studio": "yarn deploy-mainnet && yarn deploy-arbitrum && yarn deploy-sepolia && yarn deploy-arbitrum-sepolia",
2122
"prep:addresses:sepolia": "ts-node config/sepoliaAddressScript.ts && mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts",
2223
"prepare:sepolia": "yarn prep:addresses:sepolia && mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && graph codegen --output-dir src/types/",
@@ -42,7 +43,7 @@
4243
},
4344
"devDependencies": {
4445
"@graphprotocol/contracts": "6.2.0",
45-
"@graphprotocol/graph-cli": "0.68.5",
46+
"@graphprotocol/graph-cli": "0.97.0",
4647
"@graphprotocol/graph-ts": "0.38.0",
4748
"@types/node": "^14.0.13",
4849
"@typescript-eslint/eslint-plugin": "^3.3.0",
@@ -51,6 +52,7 @@
5152
"matchstick-as": "0.6.0-beta.2",
5253
"mustache": "^4.0.1",
5354
"prettier": "^2.0.5",
55+
"ts-node": "^10.9.2",
5456
"typescript": "^3.9.3"
5557
},
5658
"author": "",

schema.graphql

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Graph Network global parameters and contract addresses
33
"""
4-
type GraphNetwork @entity {
4+
type GraphNetwork @entity(immutable: false) {
55
"ID is set to 1"
66
id: ID!
77
"Controller address"
@@ -243,7 +243,7 @@ type GraphNetwork @entity {
243243
currentL1BlockNumber: BigInt
244244
}
245245

246-
type DataService @entity {
246+
type DataService @entity(immutable: false) {
247247
"Data Service address"
248248
id: ID!
249249

@@ -291,7 +291,7 @@ type DataService @entity {
291291
An account within the graph network. Contains metadata and all relevant data for this accounts
292292
delegating, curating, and indexing.
293293
"""
294-
type GraphAccount @entity {
294+
type GraphAccount @entity(immutable: false) {
295295
"Graph account ID"
296296
id: ID!
297297
"All names this graph account has claimed from all name systems"
@@ -384,7 +384,7 @@ type GraphAccountMeta @entity(immutable:true) {
384384
A name chosen by a Graph Account from a Name System such as ENS. This allows Graph Accounts to be
385385
recognized by name, rather than just an Ethereum address
386386
"""
387-
type GraphAccountName @entity {
387+
type GraphAccountName @entity(immutable: false) {
388388
"Name system concatenated with the unique ID of the name system"
389389
id: ID!
390390
"Name system for this name"
@@ -407,7 +407,7 @@ name chosen a unique combination. When a Curator singals on a Subgraph, they rec
407407
"Name Signal" resolves into the underlying "Signal" of the SubgraphDeployment. The metadata of the
408408
subgraph is stored on IPFS.
409409
"""
410-
type Subgraph @entity {
410+
type Subgraph @entity(immutable: false) {
411411
"Subgraph ID - which is derived from the Organization/Individual graph accountID"
412412
id: ID!
413413
"Graph account that owns this subgraph"
@@ -524,7 +524,7 @@ type SubgraphMeta @entity(immutable:true) {
524524
categories: [String!]
525525
}
526526

527-
type CurrentSubgraphDeploymentRelation @entity {
527+
type CurrentSubgraphDeploymentRelation @entity(immutable: false) {
528528
"Auxiliary entity used to batch update Subgraph entities when signalling on the deployment changes. ID replicates the deployment ID and adds a counter, to make it easy to reproduce."
529529
id: ID!
530530

@@ -545,7 +545,7 @@ deployment, while keeping the same endpoint. The metadata and label are stored o
545545
is for the developer to provide a semantic version. This is different from the version, which is
546546
just a counter than increases each time a new SubgraphVersion is created for a Subgraph.
547547
"""
548-
type SubgraphVersion @entity {
548+
type SubgraphVersion @entity(immutable: false) {
549549
"Concatenation of subgraph, subgraph deployment, and version ID"
550550
id: ID!
551551
"Subgraph of this version"
@@ -586,7 +586,7 @@ what to index. The entity stores relevant data for the SubgraphDeployment on how
586586
staked on and signaled on in the contracts, as well as how it is performing in query fees. It is
587587
related to a SubgraphVersion.
588588
"""
589-
type SubgraphDeployment @entity {
589+
type SubgraphDeployment @entity(immutable: false) {
590590
"Subgraph Deployment ID. The IPFS hash with Qm removed to fit into 32 bytes"
591591
id: ID!
592592
"IPFS hash of the subgraph manifest"
@@ -717,7 +717,7 @@ type SubgraphDeploymentManifest @entity(immutable:true) {
717717
"""
718718
Meta for the Indexer along with parameters and staking data
719719
"""
720-
type Indexer @entity {
720+
type Indexer @entity(immutable: false) {
721721
"Eth address of Indexer"
722722
id: ID!
723723
"Time this indexer was created"
@@ -844,7 +844,7 @@ type Indexer @entity {
844844
stakingEfficiency: BigDecimal!
845845
}
846846

847-
type PaymentSource @entity {
847+
type PaymentSource @entity(immutable: false) {
848848
"Address used on the payment"
849849
id: ID!
850850

@@ -867,7 +867,7 @@ type PaymentSource @entity {
867867
graphNetwork: GraphNetwork! # to make a derived list on GraphNetwork
868868
}
869869

870-
type IndexerQueryFeePaymentAggregation @entity {
870+
type IndexerQueryFeePaymentAggregation @entity(immutable: false) {
871871
"Join ID of indexer address and PaymentSource address"
872872
id: ID!
873873

@@ -883,7 +883,7 @@ type IndexerQueryFeePaymentAggregation @entity {
883883
paymentSource: PaymentSource!
884884
}
885885

886-
type HorizonOperator @entity {
886+
type HorizonOperator @entity(immutable: false) {
887887
"Joint address of all 3 parties involved (Operator, Indexer, DataService)"
888888
id: ID!
889889

@@ -907,7 +907,7 @@ type HorizonOperator @entity {
907907
908908
Once the Stage 2 subgraph is implemented, the Provision entity will have to be more generic, and particular data service fields will need to be restructured.
909909
"""
910-
type Provision @entity {
910+
type Provision @entity(immutable: false) {
911911
"Join ID of indexer address (service provider) and DataService address"
912912
id: ID!
913913

@@ -1010,7 +1010,7 @@ enum ThawRequestType {
10101010
Delegation
10111011
}
10121012

1013-
type ThawRequest @entity {
1013+
type ThawRequest @entity(immutable: false) {
10141014
id: ID!
10151015

10161016
type: ThawRequestType!
@@ -1037,7 +1037,7 @@ type ThawRequest @entity {
10371037
"""
10381038
A state channel Allocation representing a single Indexer/Provision-SubgraphDeployment stake
10391039
"""
1040-
type Allocation @entity {
1040+
type Allocation @entity(immutable: false) {
10411041
"Channel Address"
10421042
id: ID!
10431043
"Indexer of this allocation"
@@ -1125,7 +1125,7 @@ type Allocation @entity {
11251125
annualizedReturn: BigDecimal!
11261126
}
11271127

1128-
type PoiSubmission @entity {
1128+
type PoiSubmission @entity(immutable: true) {
11291129
id: ID!
11301130

11311131
allocation: Allocation!
@@ -1137,7 +1137,7 @@ type PoiSubmission @entity {
11371137
presentedAtTimestamp: Int!
11381138
}
11391139

1140-
type PublicPoiSubmission @entity {
1140+
type PublicPoiSubmission @entity(immutable: true) {
11411141
id: ID!
11421142

11431143
allocation: Allocation!
@@ -1161,7 +1161,7 @@ enum AllocationStatus {
11611161
[DEPRECATED] Global pool of query fees for closed state channels. Each Epoch has a single pool,
11621162
hence why they share the same IDs.
11631163
"""
1164-
type Pool @entity {
1164+
type Pool @entity(immutable: false) {
11651165
"Epoch number of the pool"
11661166
id: ID!
11671167
"Total effective allocation tokens from all allocations closed in this epoch"
@@ -1179,7 +1179,7 @@ type Pool @entity {
11791179
"""
11801180
Delegator with all their delegated stakes towards Indexers
11811181
"""
1182-
type Delegator @entity {
1182+
type Delegator @entity(immutable: false) {
11831183
"Delegator address"
11841184
id: ID!
11851185
"Graph account of the delegator"
@@ -1207,7 +1207,7 @@ type Delegator @entity {
12071207
"""
12081208
Delegator stake for a single Indexer
12091209
"""
1210-
type DelegatedStake @entity {
1210+
type DelegatedStake @entity(immutable: false) {
12111211
"Concatenation of Delegator address and Indexer address"
12121212
id: ID!
12131213
"Indexer the stake is delegated to"
@@ -1257,7 +1257,7 @@ type DelegatedStake @entity {
12571257
"""
12581258
Curator with all Signals and metrics
12591259
"""
1260-
type Curator @entity {
1260+
type Curator @entity(immutable: false) {
12611261
"Eth address of the Curator"
12621262
id: ID!
12631263
"Time this curator was created"
@@ -1323,7 +1323,7 @@ type Curator @entity {
13231323
"""
13241324
Curator Signal for a single SubgraphDeployment
13251325
"""
1326-
type Signal @entity {
1326+
type Signal @entity(immutable: false) {
13271327
"Eth address + subgraph deployment ID"
13281328
id: ID!
13291329
"Eth address of the curator"
@@ -1362,7 +1362,7 @@ type Signal @entity {
13621362
"""
13631363
Curator Name Signal for a single Subgraph
13641364
"""
1365-
type NameSignal @entity {
1365+
type NameSignal @entity(immutable: false) {
13661366
"Eth address + subgraph ID"
13671367
id: ID!
13681368
"Eth address of the curator"
@@ -1427,7 +1427,7 @@ type NameSignal @entity {
14271427
"""
14281428
Auxiliary entity to be able to batch update NameSignal entities
14291429
"""
1430-
type NameSignalSubgraphRelation @entity {
1430+
type NameSignalSubgraphRelation @entity(immutable: false) {
14311431
"Subgraph ID + index"
14321432
id: ID!
14331433

@@ -1439,7 +1439,7 @@ type NameSignalSubgraphRelation @entity {
14391439
"""
14401440
Dispute of a query. Includes single query, conflicting attestation, and indexing disputes
14411441
"""
1442-
type Dispute @entity {
1442+
type Dispute @entity(immutable: false) {
14431443
"Dispute ID"
14441444
id: ID!
14451445
"Subgraph deployment being disputed"
@@ -1478,7 +1478,7 @@ type Dispute @entity {
14781478
"""
14791479
Attestation of a dispute
14801480
"""
1481-
type Attestation @entity {
1481+
type Attestation @entity(immutable: false) {
14821482
"Concatenation of the requestCID and responseCID"
14831483
id: ID!
14841484
"Subgraph deployment being disputed"
@@ -1515,7 +1515,7 @@ enum DisputeStatus {
15151515
"""
15161516
Epoch aggregate data for network statistics on signaling, rewards, and query fees
15171517
"""
1518-
type Epoch @entity {
1518+
type Epoch @entity(immutable: false) {
15191519
"Epoch number"
15201520
id: ID!
15211521
"Start block of the epoch"
@@ -1564,7 +1564,7 @@ interface Transaction {
15641564
"""
15651565
All relevant data for a Name Signal Transaction in The Graph Network
15661566
"""
1567-
type NameSignalTransaction implements Transaction @entity {
1567+
type NameSignalTransaction implements Transaction @entity(immutable: false) {
15681568
id: ID!
15691569
blockNumber: Int!
15701570
timestamp: Int!
@@ -1583,7 +1583,7 @@ type NameSignalTransaction implements Transaction @entity {
15831583
"""
15841584
All relevant data for a Signal Transaction in The Graph Network
15851585
"""
1586-
type SignalTransaction implements Transaction @entity {
1586+
type SignalTransaction implements Transaction @entity(immutable: false) {
15871587
id: ID!
15881588
blockNumber: Int!
15891589
timestamp: Int!
@@ -1602,7 +1602,7 @@ type SignalTransaction implements Transaction @entity {
16021602
"""
16031603
All relevant data for a bridge withdrawal Transaction in The Graph Network
16041604
"""
1605-
type BridgeWithdrawalTransaction implements Transaction @entity {
1605+
type BridgeWithdrawalTransaction implements Transaction @entity(immutable: false) {
16061606
id: ID!
16071607
blockNumber: Int!
16081608
timestamp: Int!
@@ -1621,7 +1621,7 @@ type BridgeWithdrawalTransaction implements Transaction @entity {
16211621
"""
16221622
All relevant data for a bridge deposit Transaction in The Graph Network
16231623
"""
1624-
type BridgeDepositTransaction implements Transaction @entity {
1624+
type BridgeDepositTransaction implements Transaction @entity(immutable: false) {
16251625
id: ID!
16261626
blockNumber: Int!
16271627
timestamp: Int!
@@ -1642,7 +1642,7 @@ type BridgeDepositTransaction implements Transaction @entity {
16421642
"""
16431643
All relevant data for arbitrum retryable tickets
16441644
"""
1645-
type RetryableTicket @entity {
1645+
type RetryableTicket @entity(immutable: false) {
16461646
id: ID!
16471647
"hash of the retryable ticket creation transaction"
16481648
txHash: Bytes
@@ -1651,7 +1651,7 @@ type RetryableTicket @entity {
16511651
redeemCount: Int
16521652
}
16531653

1654-
type RetryableTicketRedeemAttempt @entity {
1654+
type RetryableTicketRedeemAttempt @entity(immutable: false) {
16551655
id: ID!
16561656
ticketId: RetryableTicket!
16571657
txHash: Bytes
@@ -1672,7 +1672,7 @@ enum TransactionType {
16721672
"""
16731673
The Token manager data
16741674
"""
1675-
type TokenManager @entity {
1675+
type TokenManager @entity(immutable: false) {
16761676
"Token manager address"
16771677
id: ID!
16781678
"Master copy address"
@@ -1690,7 +1690,7 @@ type TokenManager @entity {
16901690
"""
16911691
Authorized functions for the Manager
16921692
"""
1693-
type AuthorizedFunction @entity {
1693+
type AuthorizedFunction @entity(immutable: false) {
16941694
"Function signature (string)"
16951695
id: ID!
16961696
"The contract address that is authorized to have this function called on itself"
@@ -1703,7 +1703,7 @@ type AuthorizedFunction @entity {
17031703
"""
17041704
Token Lock Wallets which hold locked GRT
17051705
"""
1706-
type TokenLockWallet @entity {
1706+
type TokenLockWallet @entity(immutable: false) {
17071707
"The address of the token lock wallet"
17081708
id: ID!
17091709
"The Manager address"

0 commit comments

Comments
 (0)