Skip to content

Commit

Permalink
Merge branch 'feat/chain-boost-sync' of github.com:balancer/frontend-…
Browse files Browse the repository at this point in the history
…v2 into feat/sync-pool-page
  • Loading branch information
alter-eggo committed Jun 26, 2023
2 parents 1cd936e + 8560cbb commit d378ba7
Show file tree
Hide file tree
Showing 12 changed files with 237 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/allowlist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: Update allowlist'
commit-message: 'chore: Add ${{inputs.poolDescription}} pool to ${{inputs.network}} allowlist'
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@balancer/frontend-v2",
"version": "1.108.4",
"version": "1.108.8",
"engines": {
"node": "=16",
"npm": ">=8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import useNetwork from '@/composables/useNetwork';
import {
deprecatedDetails,
gaugeMigrationDetails,
newVersionDetails,
} from '@/composables/usePoolHelpers';
import NewPoolData from './NewPoolData.vue';
import usePoolsQuery from '@/composables/queries/usePoolsQuery';
Expand All @@ -29,7 +30,10 @@ const { networkSlug } = useNetwork();
const { t } = useI18n();
const migrationInfo = computed(
() => deprecatedDetails(props.poolId) || gaugeMigrationDetails(props.poolId)
() =>
deprecatedDetails(props.poolId) ||
gaugeMigrationDetails(props.poolId) ||
newVersionDetails(props.poolId)
);
const newPoolQueryEnabled = computed(
Expand Down
18 changes: 17 additions & 1 deletion src/composables/usePoolHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from '@/lib/utils';
import { includesWstEth } from '@/lib/utils/balancer/lido';
import { configService } from '@/services/config/config.service';
import { DeprecatedDetails } from '@/types/pools';
import { DeprecatedDetails, NewVersionAvailableDetails } from '@/types/pools';

import { AnyPool, Pool, PoolToken, SubPool } from '@/services/pool/types';
import { hasBalEmissions } from './useAPR';
Expand Down Expand Up @@ -580,6 +580,17 @@ export function deprecatedDetails(id: string): DeprecatedDetails | undefined {
return POOLS.Deprecated?.[id.toLowerCase()];
}

/**
* Checks if pool ID is included in the list of pools that have a new version available (but are not deprecated yet)
* @param {string} id - The pool ID to check
* @returns {boolean} True if included in list
*/
export function newVersionDetails(
id: string
): NewVersionAvailableDetails | undefined {
return POOLS.NewVersionAvailable?.[id.toLowerCase()];
}

/**
* Checks if pool ID is included in the list of deprecated pools
* @param {string} id - The pool ID to check
Expand Down Expand Up @@ -730,6 +741,10 @@ export function usePoolHelpers(pool: Ref<AnyPool> | Ref<undefined>) {
return !!pool.value && !!POOLS.Deprecated?.[pool.value.id];
});

const isNewPoolAvailable = computed(() => {
return !!pool.value && !!POOLS.NewVersionAvailable?.[pool.value.id];
});

return {
// computed
isStablePool,
Expand All @@ -750,6 +765,7 @@ export function usePoolHelpers(pool: Ref<AnyPool> | Ref<undefined>) {
isMainnetWstETHPool,
hasNonApprovedRateProviders,
isDeprecatedPool,
isNewPoolAvailable,
poolJoinTokens,
// methods
isStable,
Expand Down
174 changes: 174 additions & 0 deletions src/data/voting-gauges.json
Original file line number Diff line number Diff line change
Expand Up @@ -4826,6 +4826,180 @@
"0xb371aA09F5a110AB69b39A84B5469d29f9b22B76": "https://raw.githubusercontent.com/balancer/tokenlists/main/src/assets/images/tokens/0xb371aa09f5a110ab69b39a84b5469d29f9b22b76.png"
}
},
{
"address": "0x54f220a891f468629027C3Cc8A58722D4F576402",
"network": 1101,
"isKilled": false,
"relativeWeightCap": "1",
"addedTimestamp": 1687258571,
"pool": {
"id": "0x1d0a8a31cdb04efac3153237526fb15cc65a252000000000000000000000000f",
"address": "0x1d0A8a31CDb04efAC3153237526Fb15cc65A2520",
"poolType": "ComposableStable",
"symbol": "B-rETH-STABLE",
"tokens": [
{
"address": "0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",
"weight": "null",
"symbol": "WETH"
},
{
"address": "0xb23C20EFcE6e24Acca0Cef9B7B7aA196b84EC942",
"weight": "null",
"symbol": "rETH"
}
]
},
"tokenLogoURIs": {
"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9": "https://raw.githubusercontent.com/balancer/tokenlists/main/src/assets/images/tokens/0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9.png",
"0xb23C20EFcE6e24Acca0Cef9B7B7aA196b84EC942": "https://raw.githubusercontent.com/balancer/tokenlists/main/src/assets/images/tokens/0xb23c20efce6e24acca0cef9b7b7aa196b84ec942.png"
}
},
{
"address": "0xce99399fb4De36056A6831b159572E271360ea40",
"network": 1101,
"isKilled": false,
"relativeWeightCap": "1",
"addedTimestamp": 1687258571,
"pool": {
"id": "0xe1f2c039a68a216de6dd427be6c60decf405762a00000000000000000000000e",
"address": "0xe1F2c039a68A216dE6DD427Be6c60dEcf405762A",
"poolType": "ComposableStable",
"symbol": "B-wstETH-STABLE",
"tokens": [
{
"address": "0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",
"weight": "null",
"symbol": "WETH"
},
{
"address": "0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9",
"weight": "null",
"symbol": "wstETH"
}
]
},
"tokenLogoURIs": {
"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9": "https://raw.githubusercontent.com/balancer/tokenlists/main/src/assets/images/tokens/0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9.png",
"0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9": "https://raw.githubusercontent.com/balancer/tokenlists/main/src/assets/images/tokens/0x5d8cff95d7a57c0bf50b30b43c7cc0d52825d4a9.png"
}
},
{
"address": "0x48799A2B0b9ec11E4fa158c781AD8bFAbB892D58",
"network": 1101,
"isKilled": false,
"relativeWeightCap": "1",
"addedTimestamp": 1687258571,
"pool": {
"id": "0xe274c9deb6ed34cfe4130f8d0a8a948dea5bb28600000000000000000000000d",
"address": "0xe274c9deb6ed34cfe4130F8D0A8a948deA5bB286",
"poolType": "ComposableStable",
"symbol": "bb-o-USD",
"tokens": [
{
"address": "0x16C9a4D841E88E52b51936106010F27085a529EC",
"weight": "null",
"symbol": "bb-o-USDC"
},
{
"address": "0x4B718E0E2fEA1dA68b763CD50C446FbA03CEB2Ea",
"weight": "null",
"symbol": "bb-o-USDT"
}
]
},
"tokenLogoURIs": {
"0x16C9a4D841E88E52b51936106010F27085a529EC": "",
"0x4B718E0E2fEA1dA68b763CD50C446FbA03CEB2Ea": ""
}
},
{
"address": "0xF7d515DC47d5BD57786494628ed766d6bF31cd39",
"network": 1101,
"isKilled": false,
"relativeWeightCap": "1",
"addedTimestamp": 1687258571,
"pool": {
"id": "0xdf725fde6e89981fb30d9bf999841ac2c160b512000000000000000000000010",
"address": "0xDF725FdE6E89981Fb30D9bF999841aC2C160b512",
"poolType": "ComposableStable",
"symbol": "B-wstETH/rETH-STABLE",
"tokens": [
{
"address": "0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9",
"weight": "null",
"symbol": "wstETH"
},
{
"address": "0xb23C20EFcE6e24Acca0Cef9B7B7aA196b84EC942",
"weight": "null",
"symbol": "rETH"
}
]
},
"tokenLogoURIs": {
"0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9": "https://raw.githubusercontent.com/balancer/tokenlists/main/src/assets/images/tokens/0x5d8cff95d7a57c0bf50b30b43c7cc0d52825d4a9.png",
"0xb23C20EFcE6e24Acca0Cef9B7B7aA196b84EC942": "https://raw.githubusercontent.com/balancer/tokenlists/main/src/assets/images/tokens/0xb23c20efce6e24acca0cef9b7b7aa196b84ec942.png"
}
},
{
"address": "0xc85679E41f1F98E694D9F8983fdD484F98F2eB02",
"network": 1101,
"isKilled": false,
"relativeWeightCap": "1",
"addedTimestamp": 1687258571,
"pool": {
"id": "0x9e2d87f904862671eb49cb358e74284762cc9f42000200000000000000000013",
"address": "0x9e2D87f904862671eb49cB358E74284762cC9F42",
"poolType": "Weighted",
"symbol": "B-wstETH/bboUSD",
"tokens": [
{
"address": "0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9",
"weight": "0.5",
"symbol": "wstETH"
},
{
"address": "0xe274c9deb6ed34cfe4130F8D0A8a948deA5bB286",
"weight": "0.5",
"symbol": "bb-o-USD"
}
]
},
"tokenLogoURIs": {
"0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9": "https://raw.githubusercontent.com/balancer/tokenlists/main/src/assets/images/tokens/0x5d8cff95d7a57c0bf50b30b43c7cc0d52825d4a9.png",
"0xe274c9deb6ed34cfe4130F8D0A8a948deA5bB286": ""
}
},
{
"address": "0x7949426d750FEFC25754F149B2FB446B60c39387",
"network": 1101,
"isKilled": false,
"relativeWeightCap": "1",
"addedTimestamp": 1687258571,
"pool": {
"id": "0x6f34a44fce1506352a171232163e7716dd073ade000200000000000000000015",
"address": "0x6F34a44FCe1506352A171232163E7716Dd073ade",
"poolType": "Weighted",
"symbol": "B-rETH-bboUSD",
"tokens": [
{
"address": "0xb23C20EFcE6e24Acca0Cef9B7B7aA196b84EC942",
"weight": "0.5",
"symbol": "rETH"
},
{
"address": "0xe274c9deb6ed34cfe4130F8D0A8a948deA5bB286",
"weight": "0.5",
"symbol": "bb-o-USD"
}
]
},
"tokenLogoURIs": {
"0xb23C20EFcE6e24Acca0Cef9B7B7aA196b84EC942": "https://raw.githubusercontent.com/balancer/tokenlists/main/src/assets/images/tokens/0xb23c20efce6e24acca0cef9b7b7aa196b84ec942.png",
"0xe274c9deb6ed34cfe4130F8D0A8a948deA5bB286": ""
}
},
{
"address": "0x359EA8618c405023Fc4B98dAb1B01F373792a126",
"network": 42161,
Expand Down
1 change: 1 addition & 0 deletions src/lib/config/arbitrum/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const pools: Pools = {
'0xd0dc20e6342db2de82692b8dc842301ff9121805000200000000000000000454', // nfte/wsteth-bb-a-weth
'0xbcaa6c053cab3dd73a2e898d89a4f84a180ae1ca000100000000000000000458', // bal/arb/aura
'0xc7fa3a3527435720f0e2a4c1378335324dd4f9b3000200000000000000000459', // auraBAL/wstETH
'0x93b48e950380adcf6d67c392f20d44fb88d258dc000200000000000000000465', // usdc.e/usdc
],
},
Factories: {
Expand Down
27 changes: 15 additions & 12 deletions src/lib/config/mainnet/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ const pools: Pools = {
'0x26c2b83fc8535deead276f5cc3ad9c1a2192e02700020000000000000000056b', // OHM/bbaDAI
'0x18fdf15ff782e44c1f9b6c5846ff6b0f0004f6a2000200000000000000000560', // OHM/LUSD
'0x3b9fb87f7d081ceddb1289258fa5660d955317b6000200000000000000000544', // baoeth/bao
'0x4729f67394030472e853cb61954fe784bfb36c3b000100000000000000000569', // 25WBTC-50USDC-25WETH
],
},
Factories: {
Expand Down Expand Up @@ -500,6 +501,20 @@ const pools: Pools = {
'0x4fd4687ec38220f805b6363c3c1e52d0df3b5023000200000000000000000473', // Euler Boosted USD/wstETH
'0x133d241f225750d2c92948e464a5a80111920331000000000000000000000476', // Euler Boosted USD/dola
],
NewVersionAvailable: {
'0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080': {
newPool:
'0xe0fcbf4d98f0ad982db260f86cf28b49845403c5000000000000000000000504',
description: 'newVersion.Aave3',
title: 'announcement',
},
'0x9c6d47ff73e0f5e51be5fd53236e3f595c5793f200020000000000000000042c': {
newPool:
'0x9001cbbd96f54a658ff4e6e65ab564ded76a543100000000000000000000050a',
description: 'newVersion.Aave3',
title: 'announcement',
},
},
Deprecated: {
'0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063': {},
'0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe': {},
Expand Down Expand Up @@ -538,18 +553,6 @@ const pools: Pools = {
'0x04248aabca09e9a1a3d5129a7ba05b7f17de768400000000000000000000050e',
description: 'deprecatedPool.gaugeKilledReason',
},
'0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080': {
newPool:
'0xe0fcbf4d98f0ad982db260f86cf28b49845403c5000000000000000000000504',
description: 'deprecatedPool.newVersion',
title: 'announcement',
},
'0x9c6d47ff73e0f5e51be5fd53236e3f595c5793f200020000000000000000042c': {
newPool:
'0x9001cbbd96f54a658ff4e6e65ab564ded76a543100000000000000000000050a',
description: 'deprecatedPool.newVersion',
title: 'announcement',
},
},
GaugeMigration: {},
BrandedRedirect: {
Expand Down
9 changes: 8 additions & 1 deletion src/lib/config/zkevm/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ const pools: Pools = {
'0x6b1da720be2d11d95177ccfc40a917c2688f396c': 'erc4626Linear', // ERC4626 LinearPool
},
Stakable: {
VotingGaugePools: [],
VotingGaugePools: [
'0x1d0a8a31cdb04efac3153237526fb15cc65a252000000000000000000000000f',
'0xe1f2c039a68a216de6dd427be6c60decf405762a00000000000000000000000e',
'0xe274c9deb6ed34cfe4130f8d0a8a948dea5bb28600000000000000000000000d',
'0xdf725fde6e89981fb30d9bf999841ac2c160b512000000000000000000000010',
'0x9e2d87f904862671eb49cb358e74284762cc9f42000200000000000000000013',
'0x6f34a44fce1506352a171232163e7716dd073ade000200000000000000000015',
],
AllowList: [
'0x195def5dabc4a73c4a6a410554f4e53f3e55f1a900010000000000000000000a',
'0x1d0a8a31cdb04efac3153237526fb15cc65a252000000000000000000000000f',
Expand Down
6 changes: 4 additions & 2 deletions src/locales/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,10 @@
"title": "Move your liquidity for future BAL incentives",
"description": "Liquidity mining incentives are being phased out for this pool, since upgraded pools are now live. LPs are encouraged to unstake existing positions, withdraw their liquidity and add it to the newly incentivized pools."
},
"gaugeKilledReason": "This pool's gauge will soon be killed. A new version of this pool has been created that uses Aave v3.",
"newVersion": "A new version of this pool has been created that uses Aave v3"
"gaugeKilledReason": "This pool's gauge will soon be killed. A new version of this pool has been created that uses Aave v3."
},
"newVersion": {
"Aave3": "A new version of this pool has been created that uses Aave v3"
},
"highPriceImpact": "High price impact",
"highPriceImpactDetailed": "This swap is significantly moving the market price.",
Expand Down
7 changes: 6 additions & 1 deletion src/pages/pool/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const {
isLiquidityBootstrappingPool,
isComposableStableLikePool,
isDeprecatedPool,
isNewPoolAvailable,
} = usePoolHelpers(poolQuery.data);
//#endregion
Expand Down Expand Up @@ -318,7 +319,11 @@ watch(
class="pool-locking"
/>
<PoolMigrationCard
v-if="poolId && isWalletReady && isDeprecatedPool"
v-if="
poolId &&
isWalletReady &&
(isDeprecatedPool || isNewPoolAvailable)
"
:poolId="poolId"
/>
</BalStack>
Expand Down
Loading

0 comments on commit d378ba7

Please sign in to comment.