Skip to content

Commit

Permalink
add gyro to schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mendesfabio committed Jan 28, 2025
1 parent 5816fcd commit 5b218bc
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
8 changes: 8 additions & 0 deletions networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@
"StablePoolFactory": {
"address": "0xd67F485C07D258B3e93835a3799d862ffcB55923",
"startBlock": 7216947
},
"Gyro2CLPPoolFactory": {
"address": "0x97701aa7c9ae4497874C54B1C779221d6F1081C9",
"startBlock": 7563127
},
"GyroECLPPoolFactory": {
"address": "0xaC06eD505b0d85e46Bf90590f835A12E5EAac86E",
"startBlock": 7563132
}
},
"arbitrum-one": {
Expand Down
32 changes: 32 additions & 0 deletions subgraphs/v3-pools/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
enum PoolType {
Weighted
Stable
Gyro2
GyroE
}

type Factory @entity {
Expand Down Expand Up @@ -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!
Expand All @@ -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
}
2 changes: 2 additions & 0 deletions subgraphs/v3-pools/src/mappings/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5b218bc

Please sign in to comment.