From 78ef92701aecd8ba3c1cbd40b041e408d09fbc64 Mon Sep 17 00:00:00 2001 From: piekczyk Date: Tue, 25 Jun 2024 10:13:00 +0200 Subject: [PATCH] Add bsdeth base morpho market (#3965) --- blockchain/token-metadata-list/token-configs.ts | 12 ++++++++++++ blockchain/tokens/base.ts | 1 + features/omni-kit/helpers/isYieldLoopPair.ts | 1 + .../omni-kit/protocols/morpho-blue/settings.ts | 3 ++- package.json | 4 ++-- theme/icons/bsdeth_circle_color.tsx | 16 ++++++++++++++++ theme/icons/index.ts | 1 + yarn.lock | 16 ++++++++-------- 8 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 theme/icons/bsdeth_circle_color.tsx diff --git a/blockchain/token-metadata-list/token-configs.ts b/blockchain/token-metadata-list/token-configs.ts index a928a3c7de..44f9f55e7b 100644 --- a/blockchain/token-metadata-list/token-configs.ts +++ b/blockchain/token-metadata-list/token-configs.ts @@ -10,6 +10,7 @@ import { bal_circle, bat, bat_circle_color, + bsdeth_circle_color, cbeth_circle_color, chainlink, chainlink_circle_color, @@ -320,6 +321,17 @@ export const tokenConfigs: TokenConfig[] = [ rootToken: 'ETH', tags: [], }, + { + symbol: 'BSDETH', + precision: 18, + digits: 5, + name: 'Based ETH', + icon: bsdeth_circle_color, + iconCircle: bsdeth_circle_color, + coinGeckoTicker: 'based-eth', + rootToken: 'ETH', + tags: [], + }, { symbol: 'BAT', precision: 18, diff --git a/blockchain/tokens/base.ts b/blockchain/tokens/base.ts index 9932cfc6b7..882d9f9fc6 100644 --- a/blockchain/tokens/base.ts +++ b/blockchain/tokens/base.ts @@ -39,4 +39,5 @@ export const tokensBase = { AERO: contractDesc(erc20, base.common.AERO), PRIME: contractDesc(erc20, base.common.PRIME), EZETH: contractDesc(erc20, base.common.EZETH), + BSDETH: contractDesc(erc20, base.common.BSDETH), } as Record diff --git a/features/omni-kit/helpers/isYieldLoopPair.ts b/features/omni-kit/helpers/isYieldLoopPair.ts index 0c6b38137b..4e1d458e92 100644 --- a/features/omni-kit/helpers/isYieldLoopPair.ts +++ b/features/omni-kit/helpers/isYieldLoopPair.ts @@ -23,6 +23,7 @@ export const yieldLoopDefinition = { 'ETH', 'WETH', 'WOETH', + 'BSDETH', ], // its a stable coin yield loop if both the collateral and debt token are on this list stableCoinYieldTokens: [ diff --git a/features/omni-kit/protocols/morpho-blue/settings.ts b/features/omni-kit/protocols/morpho-blue/settings.ts index 921d83f042..85376bb533 100644 --- a/features/omni-kit/protocols/morpho-blue/settings.ts +++ b/features/omni-kit/protocols/morpho-blue/settings.ts @@ -59,6 +59,7 @@ export const morphoMarkets: NetworkIdsWithValues<{ [key: string]: string[] }> = 'AERO-USDC': ['0xdaa04f6819210b11fe4e3b65300c725c32e55755e3598671559b9ae3bac453d7'], 'EZETH-USDC': ['0xf24417ee06adc0b0836cf0dbec3ba56c1059f62f53a55990a38356d42fa75fa2'], 'EZETH-ETH': ['0xdf13c46bf7bd41597f27e32ae9c306eb63859c134073cb81c796ff20b520c7cf'], + 'BSDETH-ETH': ['0xdf6aa0df4eb647966018f324db97aea09d2a7dde0d3c0a72115e8b20d58ea81f'], }, } @@ -90,7 +91,7 @@ export const settings: OmniProtocolSettings = { 'MKR', 'CBETH', ], - [NetworkIds.BASEMAINNET]: ['DAI', 'ETH', 'USDC', 'WBTC', 'WEETH', 'WSTETH', 'CBETH'], + [NetworkIds.BASEMAINNET]: ['DAI', 'ETH', 'USDC', 'WBTC', 'WEETH', 'WSTETH', 'CBETH', 'BSDETH'], }, steps: { borrow: { diff --git a/package.json b/package.json index 1e3e37ae03..a1b747bc0d 100644 --- a/package.json +++ b/package.json @@ -43,9 +43,9 @@ "@lifi/wallet-management": "^2.6.1", "@lifi/widget": "^2.10.2", "@metamask/eth-sig-util": "^5.0.2", - "@oasisdex/addresses": "0.1.71", + "@oasisdex/addresses": "0.1.72", "@oasisdex/automation": "1.6.5-morpho.6", - "@oasisdex/dma-library": "0.6.55", + "@oasisdex/dma-library": "0.6.56", "@oasisdex/multiply": "^0.2.11", "@oasisdex/transactions": "0.1.4-alpha.0", "@oasisdex/utils": "^0.0.8", diff --git a/theme/icons/bsdeth_circle_color.tsx b/theme/icons/bsdeth_circle_color.tsx new file mode 100644 index 0000000000..bcaddc6a9d --- /dev/null +++ b/theme/icons/bsdeth_circle_color.tsx @@ -0,0 +1,16 @@ +import React from 'react' + +export const bsdeth_circle_color = { + path: ( + <> + + + + ), + viewBox: '0 0 32 32', +} diff --git a/theme/icons/index.ts b/theme/icons/index.ts index d954d3720a..99870eea4e 100644 --- a/theme/icons/index.ts +++ b/theme/icons/index.ts @@ -310,3 +310,4 @@ export { zerox_color } from './zerox_color' export { woeth_circle_color } from './woeth_circle_color' export { rays } from './rays' export { clock_colorful } from './clock_colorful' +export { bsdeth_circle_color } from './bsdeth_circle_color' diff --git a/yarn.lock b/yarn.lock index 987baca90d..b9fa58be48 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2502,10 +2502,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@oasisdex/addresses@0.1.71": - version "0.1.71" - resolved "https://registry.yarnpkg.com/@oasisdex/addresses/-/addresses-0.1.71.tgz#d391c11bf60067c7ad55a89abb9096ed1b596fa7" - integrity sha512-Dbftd+mWWNhEsjNmRoCMYxu92qoWfdwe03Z3FoQgVnz0aLmPhgiwNxNbyl4gREfS/TLZlWb3H4l4C5BbuKZTGw== +"@oasisdex/addresses@0.1.72": + version "0.1.72" + resolved "https://registry.yarnpkg.com/@oasisdex/addresses/-/addresses-0.1.72.tgz#2d94414350ed8793242203375d51799dc05814f0" + integrity sha512-u4HQJ7Qoeb/AWlyneYXJZETlKy+bpI+BYr3JsAAl70OIUz7YYkXGZKdMyUgjKk+GKjubN1vCi+OY/M0LpSPVEQ== "@oasisdex/automation@1.6.5-morpho.6": version "1.6.5-morpho.6" @@ -2514,10 +2514,10 @@ dependencies: ethers "^5.6.2" -"@oasisdex/dma-library@0.6.55": - version "0.6.55" - resolved "https://registry.yarnpkg.com/@oasisdex/dma-library/-/dma-library-0.6.55.tgz#202cbb95cc58756c49a9152a1e562f35f2d49cf4" - integrity sha512-Dh9TrX4Z995Ees3vUVNwxm7G/ZvucXns62oreoXEK6P36ImYDm1o0GJmPTrTgRi0u94SyCDnAHXWCeZ/lcl5Ag== +"@oasisdex/dma-library@0.6.56": + version "0.6.56" + resolved "https://registry.yarnpkg.com/@oasisdex/dma-library/-/dma-library-0.6.56.tgz#c9fda74198d26845f1c846c399600fa6a2eb1341" + integrity sha512-z+RxqqgPfnwCN3YqPGkKvgKalo/IaXRx0cUiTSczmdsyMcLOnYwNknLzsLxjYmXpyKuBavAOcEi8B8K5fPkhQA== dependencies: bignumber.js "9.0.1" ethers "^5.7.2"