From c0b014c3dbcb2f7a89236dd38254d09388f7b486 Mon Sep 17 00:00:00 2001 From: mendesfabio Date: Tue, 15 Oct 2024 16:15:08 -0300 Subject: [PATCH] make pool params as entities --- subgraphs/v3-pools/schema.graphql | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/subgraphs/v3-pools/schema.graphql b/subgraphs/v3-pools/schema.graphql index 393fde5..497808e 100644 --- a/subgraphs/v3-pools/schema.graphql +++ b/subgraphs/v3-pools/schema.graphql @@ -16,6 +16,20 @@ type Factory @entity { pools: [Pool!] @derivedFrom(field: "factory") } +type WeightedParams @entity { + "Unique identifier for the WeightedPoolParams" + id: Bytes! + "Token weights for Weighted Pools" + weights: [BigDecimal!]! +} + +type StableParams @entity { + "Unique identifier for the StablePoolParams" + id: Bytes! + "Amplification parameter for Stable Pools" + amp: BigInt! +} + type Pool @entity { "Unique identifier for the Pool" id: Bytes! @@ -23,8 +37,10 @@ type Pool @entity { address: Bytes! "Factory that created this Pool" factory: Factory! - "Amplification parameter for Stable Pools" - amp: BigInt - "Token weights for Weighted Pools" - weights: [BigDecimal!] + "Type of the pool" + type: PoolType! + "Parameters for Weighted pools (null for other pool types)" + weightedParams: WeightedParams + "Parameters for Stable pools (null for other pool types)" + stableParams: StableParams }