From 5b218bc4c1f9e8fa4b99c2dfc29cc6aaf17f34a1 Mon Sep 17 00:00:00 2001 From: mendesfabio Date: Mon, 27 Jan 2025 22:47:50 -0300 Subject: [PATCH] add gyro to schema --- networks.json | 8 ++++++ subgraphs/v3-pools/schema.graphql | 32 +++++++++++++++++++++++ subgraphs/v3-pools/src/mappings/common.ts | 2 ++ 3 files changed, 42 insertions(+) diff --git a/networks.json b/networks.json index 93b4ba0..1280cee 100644 --- a/networks.json +++ b/networks.json @@ -51,6 +51,14 @@ "StablePoolFactory": { "address": "0xd67F485C07D258B3e93835a3799d862ffcB55923", "startBlock": 7216947 + }, + "Gyro2CLPPoolFactory": { + "address": "0x97701aa7c9ae4497874C54B1C779221d6F1081C9", + "startBlock": 7563127 + }, + "GyroECLPPoolFactory": { + "address": "0xaC06eD505b0d85e46Bf90590f835A12E5EAac86E", + "startBlock": 7563132 } }, "arbitrum-one": { diff --git a/subgraphs/v3-pools/schema.graphql b/subgraphs/v3-pools/schema.graphql index fd62639..65241df 100644 --- a/subgraphs/v3-pools/schema.graphql +++ b/subgraphs/v3-pools/schema.graphql @@ -1,6 +1,8 @@ enum PoolType { Weighted Stable + Gyro2 + GyroE } type Factory @entity { @@ -30,6 +32,32 @@ type StableParams @entity { amp: BigInt! } +type Gyro2Params @entity { + "Unique identifier for the Gyro2Params" + id: Bytes! + sqrtAlpha: BigDecimal! + sqrtBeta: BigDecimal! +} + +type GyroEParams @entity { + "Unique identifier for the GyroEParams" + id: Bytes! + alpha: BigDecimal! + beta: BigDecimal! + c: BigDecimal + s: BigDecimal + lambda: BigDecimal! + tauAlphaX: BigDecimal + tauAlphaY: BigDecimal + tauBetaX: BigDecimal + tauBetaY: BigDecimal + u: BigDecimal + v: BigDecimal + w: BigDecimal + z: BigDecimal + dSq: BigDecimal +} + type Pool @entity { "Unique identifier for the Pool" id: Bytes! @@ -41,4 +69,8 @@ type Pool @entity { weightedParams: WeightedParams "Parameters for Stable pools (null for other pool types)" stableParams: StableParams + "Parameters for Gyro2 pools (null for other pool types)" + gyro2Params: Gyro2Params + "Parameters for GyroE pools (null for other pool types)" + gyroEParams: GyroEParams } diff --git a/subgraphs/v3-pools/src/mappings/common.ts b/subgraphs/v3-pools/src/mappings/common.ts index 495e180..d0e6dcc 100644 --- a/subgraphs/v3-pools/src/mappings/common.ts +++ b/subgraphs/v3-pools/src/mappings/common.ts @@ -6,6 +6,8 @@ import { Pool } from "../types/schema"; export namespace PoolType { export const Weighted = "Weighted"; export const Stable = "Stable"; + export const Gyro2 = "Gyro2"; + export const GyroE = "GyroE"; } export function createBasePool(