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

feat: subgraph and subgraph version entities feature parity #62

Merged
merged 1 commit into from Nov 1, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
866 changes: 518 additions & 348 deletions abis/gns.json

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions proto/erc20.proto
Expand Up @@ -74,6 +74,17 @@ message RewardsDenyListUpdatedEvents {
repeated RewardsDenyListUpdated rewards_deny_list_updated_events = 1;
}

message SubgraphPublished1Events {
repeated SubgraphPublished1 subgraph_published1_events = 1;
}
message SubgraphPublished2Events {
repeated SubgraphPublished2 subgraph_published2_events = 1;
}

message SubgraphVersionUpdatedEvents {
repeated SubgraphVersionUpdated subgraph_version_updated_events = 1;
}

message IndexerStakes {
repeated IndexerStake indexer_stakes = 1;
}
Expand Down Expand Up @@ -124,6 +135,9 @@ message Events {
PartialPauseChangedEvents partial_pause_changed_events = 15;
EpochLengthUpdatedEvents epoch_length_updated_events = 16;
RewardsDenyListUpdatedEvents rewards_deny_list_updated_events = 17;
SubgraphPublished1Events subgraph_published1_events = 18;
SubgraphPublished2Events subgraph_published2_events = 19;
SubgraphVersionUpdatedEvents subgraph_version_updated_events = 20;
}

message Transfer {
Expand Down Expand Up @@ -287,6 +301,31 @@ message RewardsDenyListUpdated {
uint64 ordinal = 3;
}

message SubgraphPublished1 {
string id = 1;
bytes graph_account = 2;
string subgraph_number = 3;
bytes subgraph_deployment_id = 4;
bytes version_metadata = 5;
uint64 ordinal = 6;
}

message SubgraphPublished2 {
string id = 1;
string subgraph_id = 2;
bytes subgraph_deployment_id = 3;
string reserve_ratio = 4;
uint64 ordinal = 5;
}

message SubgraphVersionUpdated {
string id = 1;
string subgraph_id = 2;
bytes subgraph_deployment_id = 3;
bytes version_metadata = 4;
uint64 ordinal = 5;
}
juanmardefago marked this conversation as resolved.
Show resolved Hide resolved

message IndexerStake {
string id = 1;
bytes indexer = 2;
Expand Down
22 changes: 22 additions & 0 deletions schema.graphql
Expand Up @@ -208,3 +208,25 @@ type Epoch @entity {
"Total indexing rewards earned in this epoch by delegators"
totalDelegatorRewards: BigInt!
}

type Subgraph @entity {
"Subgraph ID - which is derived from the Organization/Individual graph accountID"
id: ID!
"List of all the subgraph versions included the current one"
versions: [SubgraphVersion!]! @derivedFrom(field: "subgraph")
"Version counter"
versionCount: BigInt!
}

type SubgraphVersion @entity {
"Concatenation of subgraph, subgraph deployment, and version ID"
id: ID!
"Subgraph of this version"
subgraph: Subgraph!
"Subgraph deployment of this version"
subgraphDeployment: SubgraphDeployment!
"Version number"
version: Int!
"Creation timestamp"
createdAt: Int!
}