From a445c9be714383d91d8fca3fc3294afcb8176c0f Mon Sep 17 00:00:00 2001 From: johngrantuk Date: Wed, 21 Feb 2024 09:56:02 +0000 Subject: [PATCH] feat: Add GyroE V2 support. Bump SOR to 4.1.1-beta.17. --- balancer-js/package.json | 2 +- balancer-js/src/modules/data/pool/onchain-data.ts | 7 +++++++ balancer-js/yarn.lock | 14 +++++++------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/balancer-js/package.json b/balancer-js/package.json index e5a362381..837454c8f 100644 --- a/balancer-js/package.json +++ b/balancer-js/package.json @@ -88,7 +88,7 @@ "typescript": "^4.0.2" }, "dependencies": { - "@balancer-labs/sor": "^4.1.1-beta.16", + "@balancer-labs/sor": "^4.1.1-beta.17", "@ethersproject/abi": "^5.4.0", "@ethersproject/abstract-signer": "^5.4.0", "@ethersproject/address": "^5.4.0", diff --git a/balancer-js/src/modules/data/pool/onchain-data.ts b/balancer-js/src/modules/data/pool/onchain-data.ts index c9f9dc9de..32405656e 100644 --- a/balancer-js/src/modules/data/pool/onchain-data.ts +++ b/balancer-js/src/modules/data/pool/onchain-data.ts @@ -128,6 +128,13 @@ const poolTypeCalls = (poolType: string, poolTypeVersion = 1) => { } else { return do_nothing; } + case 'Gyro2': + if (poolTypeVersion === 2) { + // Gyro2 V2 has tokenRates same as GyroE V2 + return gyroECalls; + } else { + return do_nothing; + } case 'AaveLinear': if (poolTypeVersion === 1) { return linearCalls; diff --git a/balancer-js/yarn.lock b/balancer-js/yarn.lock index afb0ee1af..1c1ba2400 100644 --- a/balancer-js/yarn.lock +++ b/balancer-js/yarn.lock @@ -507,10 +507,10 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" -"@balancer-labs/sor@^4.1.1-beta.16": - version "4.1.1-beta.16" - resolved "https://registry.yarnpkg.com/@balancer-labs/sor/-/sor-4.1.1-beta.16.tgz#bee2a863c751ca10320090b4831db26492b1959f" - integrity sha512-EKS7J78r5jKDsGqOs2gzIyhOqYyDAmrwp/nY2bSsfymNXSTr7g3YS418UJl1hSQMBEeN4N2MnH0neM1oJxHHoQ== +"@balancer-labs/sor@^4.1.1-beta.17": + version "4.1.1-beta.17" + resolved "https://registry.yarnpkg.com/@balancer-labs/sor/-/sor-4.1.1-beta.17.tgz#8c404a86174003cccf2bb87d49221cfdcf083246" + integrity sha512-JcX/HeppyoIs+Sa3Z/pdZhqMOBAGajOwVkBkFA8rehd1K2qaU/k/a3OkbIidXjs4lQI9sJE1WO8RauCLtuLQfg== dependencies: isomorphic-fetch "^2.2.1" @@ -6250,9 +6250,9 @@ webidl-conversions@^3.0.0: integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== whatwg-fetch@>=0.10.0: - version "3.6.17" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.17.tgz#009bbbfc122b227b74ba1ff31536b3a1a0e0e212" - integrity sha512-c4ghIvG6th0eudYwKZY5keb81wtFz9/WeAHAoy8+r18kcWlitUIrmGFQ2rWEl4UCKUilD3zCLHOIPheHx5ypRQ== + version "3.6.20" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz#580ce6d791facec91d37c72890995a0b48d31c70" + integrity sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg== whatwg-fetch@^3.4.1: version "3.6.2"