From 2e082dd2d5001484ae2f222a82ddf0a777968aa8 Mon Sep 17 00:00:00 2001 From: piekczyk Date: Wed, 5 Jun 2024 11:47:14 +0200 Subject: [PATCH] Add woeth-eth support (#683) --- packages/addresses/package.json | 2 +- packages/deploy-configurations/configs/arbitrum.conf.ts | 8 ++++++++ packages/deploy-configurations/configs/mainnet.conf.ts | 8 ++++++++ .../configs/shared/common-defaults.ts | 4 ++++ .../configs/shared/empty-ajna-pools.ts | 4 ++++ .../types/deployment-config/ajna-protocol.ts | 1 + .../types/deployment-config/tokens.ts | 1 + packages/dma-library/package.json | 2 +- packages/dma-library/src/utils/swap/fee-resolver.ts | 1 + 9 files changed, 29 insertions(+), 2 deletions(-) diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 9ec9234a2..24b0bdb41 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -1,6 +1,6 @@ { "name": "@oasisdex/addresses", - "version": "0.1.69", + "version": "0.1.70", "typings": "lib/index.d.ts", "types": "lib/index.d.ts", "main": "lib/index.js", diff --git a/packages/deploy-configurations/configs/arbitrum.conf.ts b/packages/deploy-configurations/configs/arbitrum.conf.ts index 052fc542f..ab1074da5 100644 --- a/packages/deploy-configurations/configs/arbitrum.conf.ts +++ b/packages/deploy-configurations/configs/arbitrum.conf.ts @@ -621,6 +621,10 @@ export const config: SystemConfig = { address: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', serviceRegistryName: SERVICE_REGISTRY_NAMES.common.WETH, }, + WOETH: { + name: 'WOETH', + address: '0xd8724322f44e5c58d7a815f542036fb17dbbf839', + }, WLD: { name: 'WLD', address: '0x0000000000000000000000000000000000000000', @@ -1014,6 +1018,10 @@ export const config: SystemConfig = { name: 'AjnaPoolPairs_MOOAURAGYROAUSDCN/AUSDTNUSDC', address: '0x263482c6879677494d4c51b5577188a722ec7f8c', }, + AjnaPoolPairs_WOETHETH: { + name: 'AjnaPoolPairs_WOETHETH', + address: '0xd36E05257143cD89B51F928951d0e803f84C8F4d', + }, AjnaPoolInfo: { name: 'AjnaPoolInfo', address: '0x8a7F5aFb7E3c3fD1f3Cc9D874b454b6De11EBbC9', diff --git a/packages/deploy-configurations/configs/mainnet.conf.ts b/packages/deploy-configurations/configs/mainnet.conf.ts index 7ecb5f09e..3e1b4e077 100644 --- a/packages/deploy-configurations/configs/mainnet.conf.ts +++ b/packages/deploy-configurations/configs/mainnet.conf.ts @@ -857,6 +857,10 @@ export const config: SystemConfig = { address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', serviceRegistryName: SERVICE_REGISTRY_NAMES.common.WETH, }, + WOETH: { + name: 'WOETH', + address: '0xdcee70654261af21c44c093c300ed3bb97b78192', + }, WLD: { name: 'WLD', address: '0x163f8c2467924be0ae7b5347228cabf260318753', @@ -1716,6 +1720,10 @@ export const config: SystemConfig = { name: 'AjnaPoolPairs_UNI-V2DAI', address: '0xc71ad394818474f87f27a5525243de52c278dcb8', }, + AjnaPoolPairs_WOETHETH: { + name: 'AjnaPoolPairs_WOETHETH', + address: '0xDD433012C0d99AEbE83FFf55B4D405831DE85fbc', + }, AjnaPoolInfo: { name: 'AjnaPoolInfo', address: '0x30c5eF2997d6a882DE52c4ec01B6D0a5e5B4fAAE', diff --git a/packages/deploy-configurations/configs/shared/common-defaults.ts b/packages/deploy-configurations/configs/shared/common-defaults.ts index d8f3275dd..c590e63db 100644 --- a/packages/deploy-configurations/configs/shared/common-defaults.ts +++ b/packages/deploy-configurations/configs/shared/common-defaults.ts @@ -197,6 +197,10 @@ export const commonDefaults = { name: 'PTWEETH', address: ADDRESS_ZERO, }, + WOETH: { + name: 'WOETH', + address: ADDRESS_ZERO, + }, 'UNI-V2': { name: 'UNI-V2', address: ADDRESS_ZERO, diff --git a/packages/deploy-configurations/configs/shared/empty-ajna-pools.ts b/packages/deploy-configurations/configs/shared/empty-ajna-pools.ts index 3ca4caf3c..bd4b5f564 100644 --- a/packages/deploy-configurations/configs/shared/empty-ajna-pools.ts +++ b/packages/deploy-configurations/configs/shared/empty-ajna-pools.ts @@ -257,4 +257,8 @@ export const emptyAjnaPools = { name: 'AjnaPoolPairs_SUSDCYUSDC', address: ADDRESS_ZERO, }, + AjnaPoolPairs_WOETHETH: { + name: 'AjnaPoolPairs_WOETHETH', + address: ADDRESS_ZERO, + }, } as const diff --git a/packages/deploy-configurations/types/deployment-config/ajna-protocol.ts b/packages/deploy-configurations/types/deployment-config/ajna-protocol.ts index 150f92768..851830d13 100644 --- a/packages/deploy-configurations/types/deployment-config/ajna-protocol.ts +++ b/packages/deploy-configurations/types/deployment-config/ajna-protocol.ts @@ -67,6 +67,7 @@ export type AjnaProtocol = | 'AjnaPoolPairs_UNI-V2DAI' | 'AjnaPoolPairs_MOOAURAGYROAUSDCN/AUSDTNUSDC' | 'AjnaPoolPairs_SUSDCYUSDC' + | 'AjnaPoolPairs_WOETHETH' | 'AjnaProxyActions' | 'AjnaRewardsClaimer' | 'AjnaRewardsManager' diff --git a/packages/deploy-configurations/types/deployment-config/tokens.ts b/packages/deploy-configurations/types/deployment-config/tokens.ts index 93483742b..ea9e9ca3d 100644 --- a/packages/deploy-configurations/types/deployment-config/tokens.ts +++ b/packages/deploy-configurations/types/deployment-config/tokens.ts @@ -77,6 +77,7 @@ export type Tokens = | 'WBTC' | 'WETH' | 'WEETH' + | 'WOETH' | 'WLD' | 'WSTETH' | 'XETH' diff --git a/packages/dma-library/package.json b/packages/dma-library/package.json index bed440038..74fd662ef 100644 --- a/packages/dma-library/package.json +++ b/packages/dma-library/package.json @@ -1,6 +1,6 @@ { "name": "@oasisdex/dma-library", - "version": "0.6.53", + "version": "0.6.54", "typings": "lib/index.d.ts", "types": "lib/index.d.ts", "main": "lib/index.js", diff --git a/packages/dma-library/src/utils/swap/fee-resolver.ts b/packages/dma-library/src/utils/swap/fee-resolver.ts index 3f496add3..fe5d30c5a 100644 --- a/packages/dma-library/src/utils/swap/fee-resolver.ts +++ b/packages/dma-library/src/utils/swap/fee-resolver.ts @@ -65,6 +65,7 @@ export function isCorrelatedPosition(symbolA: string, symbolB: string) { 'AWSTETH', 'ASETH', 'CWETHV3', + 'WOETH', ], // ETH correlated assets ['WBTC', 'TBTC'], // BTC correlated assets ['USDC', 'DAI', 'GHO', 'SDAI', 'USDT', 'CDAI', 'AUSDC', 'PYUSD'], // USDC correlated assets