From 6390fe45c0f6b149f53be3c965c371882489d419 Mon Sep 17 00:00:00 2001 From: johngrantuk Date: Thu, 7 Sep 2023 15:01:30 +0100 Subject: [PATCH] chore: More Gyro fields for SOR. --- modules/pool/lib/pool-creator.service.ts | 3 +++ modules/pool/lib/pool-gql-loader.service.ts | 9 +++++++++ modules/pool/pool.gql | 3 +++ modules/pool/pool.prisma | 3 +++ .../balancer-subgraph/balancer-subgraph-queries.graphql | 3 +++ .../20230907135550_gyro_missing_fields/migration.sql | 4 ++++ prisma/schema.prisma | 3 +++ 7 files changed, 28 insertions(+) create mode 100644 prisma/migrations/20230907135550_gyro_missing_fields/migration.sql diff --git a/modules/pool/lib/pool-creator.service.ts b/modules/pool/lib/pool-creator.service.ts index 9005b13ca..51941591f 100644 --- a/modules/pool/lib/pool-creator.service.ts +++ b/modules/pool/lib/pool-creator.service.ts @@ -249,6 +249,9 @@ export class PoolCreatorService { id: pool.id, alpha: pool.alpha || '', beta: pool.beta || '', + sqrtAlpha: pool.sqrtAlpha || '', + sqrtBeta: pool.sqrtBeta || '', + root3Alpha: pool.root3Alpha || '', c: pool.c || '', s: pool.s || '', lambda: pool.lambda || '', diff --git a/modules/pool/lib/pool-gql-loader.service.ts b/modules/pool/lib/pool-gql-loader.service.ts index 268a1d6ee..9a00ec6be 100644 --- a/modules/pool/lib/pool-gql-loader.service.ts +++ b/modules/pool/lib/pool-gql-loader.service.ts @@ -386,6 +386,9 @@ export class PoolGqlLoaderService { type: mappedData.type, alpha: pool.gyroData?.alpha || '', beta: pool.gyroData?.beta || '', + sqrtAlpha: pool.gyroData?.sqrtAlpha || '', + sqrtBeta: pool.gyroData?.sqrtBeta || '', + root3Alpha: pool.gyroData?.root3Alpha || '', c: pool.gyroData?.c || '', s: pool.gyroData?.s || '', lambda: pool.gyroData?.lambda || '', @@ -406,6 +409,9 @@ export class PoolGqlLoaderService { type: mappedData.type, alpha: pool.gyroData?.alpha || '', beta: pool.gyroData?.beta || '', + sqrtAlpha: pool.gyroData?.sqrtAlpha || '', + sqrtBeta: pool.gyroData?.sqrtBeta || '', + root3Alpha: pool.gyroData?.root3Alpha || '', c: pool.gyroData?.c || '', s: pool.gyroData?.s || '', lambda: pool.gyroData?.lambda || '', @@ -426,6 +432,9 @@ export class PoolGqlLoaderService { type: mappedData.type, alpha: pool.gyroData?.alpha || '', beta: pool.gyroData?.beta || '', + sqrtAlpha: pool.gyroData?.sqrtAlpha || '', + sqrtBeta: pool.gyroData?.sqrtBeta || '', + root3Alpha: pool.gyroData?.root3Alpha || '', c: pool.gyroData?.c || '', s: pool.gyroData?.s || '', lambda: pool.gyroData?.lambda || '', diff --git a/modules/pool/pool.gql b/modules/pool/pool.gql index 33e176a24..0b2d39658 100644 --- a/modules/pool/pool.gql +++ b/modules/pool/pool.gql @@ -237,6 +237,9 @@ type GqlPoolGyro implements GqlPoolBase { alpha: String! beta: String! + sqrtAlpha: String! + sqrtBeta: String! + root3Alpha: String! c: String! s: String! lambda: String! diff --git a/modules/pool/pool.prisma b/modules/pool/pool.prisma index faca9af33..8561f31d2 100644 --- a/modules/pool/pool.prisma +++ b/modules/pool/pool.prisma @@ -95,6 +95,9 @@ model PrismaPoolGyroData{ alpha String beta String + sqrtAlpha String? + sqrtBeta String? + root3Alpha String? c String? s String? lambda String? diff --git a/modules/subgraphs/balancer-subgraph/balancer-subgraph-queries.graphql b/modules/subgraphs/balancer-subgraph/balancer-subgraph-queries.graphql index f0f3012a2..f154888d1 100644 --- a/modules/subgraphs/balancer-subgraph/balancer-subgraph-queries.graphql +++ b/modules/subgraphs/balancer-subgraph/balancer-subgraph-queries.graphql @@ -182,6 +182,9 @@ fragment BalancerPool on Pool { amp alpha beta + sqrtAlpha + sqrtBeta + root3Alpha c s lambda diff --git a/prisma/migrations/20230907135550_gyro_missing_fields/migration.sql b/prisma/migrations/20230907135550_gyro_missing_fields/migration.sql new file mode 100644 index 000000000..c3f5623b1 --- /dev/null +++ b/prisma/migrations/20230907135550_gyro_missing_fields/migration.sql @@ -0,0 +1,4 @@ +-- AlterTable +ALTER TABLE "PrismaPoolGyroData" ADD COLUMN "root3Alpha" TEXT, +ADD COLUMN "sqrtAlpha" TEXT, +ADD COLUMN "sqrtBeta" TEXT; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index b725f08d3..a7268cff3 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -141,6 +141,9 @@ model PrismaPoolGyroData{ alpha String beta String + sqrtAlpha String? + sqrtBeta String? + root3Alpha String? c String? s String? lambda String?