Skip to content

Commit

Permalink
Release 1.109.0 (#3580)
Browse files Browse the repository at this point in the history
* Add automatic workflow for allowlist

* Change inputs

* Updated risks page: Rate provider bridges (#3533)

* Updated risks page: Rate provider bridges

* chore: Refactor risks for risk keys

* chore: Use RiskKey

* chore: Fix risk tests

* chore: Use risk keys as ids

* chore: Add pool risk list component

* chore: Cleanup risks section

* chore: Fix tests

* Fix Composable Stable risk link

---------

Co-authored-by: Gareth Fuller <[email protected]>
Co-authored-by: Alberto Gualis <[email protected]>

* Add 80mooMvxMVLP-20wUSDR pool

This pool is designed to make the mooMvxMVLP directly trade-able without having to withdraw from the compounding vault. It is intended for use in other balancer pools as a high yield managed portfolio token.

* Move hardcoded config from voting gauge generator to config files

* Add NodeJS version check

* Add error if VITE_RPC_URL_1 is not set

* additional gauge updates

* add reth/weth pool to allowlist

* Fixed broken veBAL learn more link

* Added boosted pool icons to Polygon zkevm pools

* Improve Allowlisting

* Updated Polygon zkEVM promo message (#3576)

* Update allow list (#3577)

* Allowlist 50ETHx-50WETH and 80BIDS-20WETH in mainnet.
* Allowlist uniETH-WETH in goerli.

* Allowlist STARV2-SuperPoolV1 in polygon (#3579)

* 1.109.0

---------

Co-authored-by: Tim Robinson <[email protected]>
Co-authored-by: pkattera <[email protected]>
Co-authored-by: Gareth Fuller <[email protected]>
Co-authored-by: Anastasios <[email protected]>
Co-authored-by: Tim Robinson <[email protected]>
Co-authored-by: dakotajakiser <[email protected]>
Co-authored-by: ZeKraken <[email protected]>
  • Loading branch information
8 people committed Jun 26, 2023
1 parent e365750 commit 16c8db0
Show file tree
Hide file tree
Showing 29 changed files with 394 additions and 198 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/allowlist-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Allowlist pool

on:
workflow_dispatch:
inputs:
network:
type: choice
description: Network
required: true
options:
- mainnet
- polygon
- arbitrum
- gnosis-chain
poolType:
type: choice
description: Pool Type
required: true
options:
- Weighted
- Stable
poolId:
type: string
description: Pool ID
required: true
poolDescription:
type: string
description: Pool Description
required: false

jobs:
allowlist-pool:
uses: ./.github/workflows/allowlist.yml
with:
network: ${{ github.event.inputs.network }}
poolType: ${{ github.event.inputs.poolType }}
poolId: ${{ github.event.inputs.poolId }}
poolDescription: ${{ github.event.inputs.poolDescription }}
14 changes: 14 additions & 0 deletions .github/workflows/allowlist-webhook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Allowlist Pool Webhook

on:
repository_dispatch:
types: ['allowlist_pool']

jobs:
allowlist-pool:
uses: ./.github/workflows/allowlist.yml
with:
network: ${{ github.event.client_payload.network }}
poolType: ${{ github.event.client_payload.poolType }}
poolId: ${{ github.event.client_payload.poolId }}
poolDescription: ${{ github.event.client_payload.poolDescription }}
27 changes: 7 additions & 20 deletions .github/workflows/allowlist.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,24 @@
name: Allowlist pool

on:
workflow_dispatch:
workflow_call:
inputs:
network:
type: choice
description: Network
type: string
required: true
options:
- mainnet
- polygon
- arbitrum
- gnosis-chain
poolType:
type: choice
description: Pool Type
type: string
required: true
options:
- Weighted
- Stable
poolId:
type: string
description: Pool ID
required: true
poolDescription:
type: string
description: Pool Description
required: false

jobs:
allowlist-pool:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand All @@ -44,21 +31,21 @@ jobs:
- name: Install deps
run: npm install cac
- name: Run allowlist script
run: npx vite-node ./src/lib/scripts/automatic-prs/allowlist-pool.ts --network ${{github.event.inputs.network}} --poolType ${{github.event.inputs.poolType}} --poolId \"${{github.event.inputs.poolId}}\" --poolDescription "${{github.event.inputs.poolDescription}}"
run: npx vite-node ./src/lib/scripts/automatic-prs/allowlist-pool.ts --network ${{inputs.network}} --poolType ${{inputs.poolType}} --poolId \"${{inputs.poolId}}\" --poolDescription "${{inputs.poolDescription}}"
- name: Run eslint fix of updated config files
run: npm run lint:fix:config
- name: Create Pull Request
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
branch: update-allowlist
branch: update-allowlist-${{inputs.network}}-${{inputs.poolId}}
base: master
delete-branch: true
title: 'Update pool allowlist'
title: 'Allowlist ${{inputs.poolDescription}} pool'
body: |
This PR was autogenerated by the allowlist manual Github action.
draft: 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.9",
"version": "1.109.0",
"engines": {
"node": "=16",
"npm": ">=8"
Expand Down
1 change: 1 addition & 0 deletions src/assets/images/icons/protocols/0vix.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions src/components/contextual/pages/pool/risks/PoolRiskList.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script lang="ts" setup>
import { Risk } from '@/composables/usePoolRisks';
interface Props {
risks: Risk[];
}
defineProps<Props>();
</script>

<template>
<ul class="px-8 lg:px-4 list-disc">
<li v-for="{ title, hash } in risks" :key="hash" class="mb-1 link">
<router-link :to="{ name: 'risks', hash }">{{ title }}</router-link>
</li>
</ul>
</template>
39 changes: 19 additions & 20 deletions src/components/contextual/pages/pool/risks/PoolRisks.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<script setup lang="ts">
import { Pool } from '@/services/pool/types';
import { riskLinks, risksTitle, poolSpecificRisks } from './pool-risks';
import {
riskLinks,
risksTitle,
poolSpecificRisks,
} from '@/composables/usePoolRisks';
import PoolRiskList from './PoolRiskList.vue';
/**
* TYPES
Expand All @@ -12,35 +17,29 @@ type Props = {
/**
* PROPS
*/
defineProps<Props>();
const props = defineProps<Props>();
const _poolSpecificRisks = poolSpecificRisks(props.pool);
const _poolGeneralRisks = riskLinks(props.pool);
const hasSpecificRisks = _poolSpecificRisks.length > 0;
</script>

<template>
<div id="risks-section">
<h3 class="px-4 lg:px-0 mb-5" v-text="$t('poolRisks.title')" />
<h3 class="px-4 lg:px-0 mb-3" v-text="$t('poolRisks.title')" />

<p v-if="poolSpecificRisks(pool)" class="px-4 lg:px-0 mb-5">
{{ poolSpecificRisks(pool) }}
</p>
<PoolRiskList
v-if="hasSpecificRisks"
:risks="_poolSpecificRisks"
class="mb-3"
/>

<p class="px-4 lg:px-0 mb-3">
{{ risksTitle(pool) }}
</p>

<ul class="px-8 lg:px-4 list-disc">
<li
v-for="{ title, hash } in riskLinks(pool)"
:key="hash"
class="mb-1 link"
>
<router-link :to="{ name: 'risks', hash }">{{ title }}</router-link>
</li>
<li class="link">
<router-link :to="{ name: 'risks', hash: '#general-risks' }"
>General Balancer protocol risks</router-link
>
</li>
</ul>
<PoolRiskList :risks="_poolGeneralRisks" />
</div>
</template>

8 changes: 4 additions & 4 deletions src/components/contextual/pages/pools/ZkevmPromo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const { networkSlug } = useNetwork();
>
<div class="z-10 max-w-3xl">
<h5 class="mb-1 font-bold text-white">
Balancer is live on Polygon zkEVM
Get ready for BAL incentives for Polygon zkEVM
</h5>
<p class="md:text-sm leading-6 text-white">
Polygon zkEVM Beta harnesses the power of ZK proofs to reduce
transaction cost and massively increase throughput, all while
inheriting the security of Ethereum L1.
BAL incentives on selected Polygon zkEVM pools go live on Thursday
29 June. veBAL holders can vote for these pools now. LPs can prepare
by bridging and adding liquidity to the Polygon zkEVM network.
</p>
</div>
<div class="z-10 mt-4">
Expand Down
2 changes: 1 addition & 1 deletion src/components/contextual/pages/vebal/Hero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function navigateToGetVeBAL() {
</BalBtn>
<BalBtn
tag="a"
href="https://docs.balancer.fi/ecosystem/vebal-and-gauges"
href="https://docs.balancer.fi/concepts/governance/veBAL/"
target="_blank"
rel="noreferrer"
color="white"
Expand Down
5 changes: 5 additions & 0 deletions src/composables/useBoostedPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export enum BoostedProtocol {
Reaper = 'reaper',
Tetu = 'tetu',
Granary = 'granary',
Zerovix = '0vix',
}

export const boostedProtocolIconPaths: Record<BoostedProtocol, string> = {
Expand Down Expand Up @@ -67,4 +68,8 @@ export const boostedProtocolIconPaths: Record<BoostedProtocol, string> = {
'@/assets/images/icons/protocols/tetu.png',
import.meta.url
).href,
[BoostedProtocol.Zerovix]: new URL(
'@/assets/images/icons/protocols/0vix.svg',
import.meta.url
).href,
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
generateThirdPartyComposabilityRisks,
riskLinks,
risksTitle,
} from './pool-risks';
} from './usePoolRisks';
import { aWeightedPool } from '@/__mocks__/weighted-pool';
import { aPool } from '@tests/unit/builders/pool.builders';
import { PoolType } from '@balancer-labs/sdk';
Expand Down Expand Up @@ -46,6 +46,10 @@ describe('Generates links for', () => {
"hash": "#composability-risk",
"title": "Third party DeFi composability risks: Aave, Morpho",
},
{
"hash": "#general-risks",
"title": "General Balancer protocol risks",
},
]
`);
});
Expand All @@ -67,6 +71,10 @@ describe('Generates links for', () => {
"hash": "#mutable-attributes-risk",
"title": "Mutable attributes risks",
},
{
"hash": "#general-risks",
"title": "General Balancer protocol risks",
},
]
`);
});
Expand All @@ -84,6 +92,10 @@ describe('Generates links for', () => {
"hash": "#polygon",
"title": "Layer 2 network risks: Polygon",
},
{
"hash": "#general-risks",
"title": "General Balancer protocol risks",
},
]
`);
});
Expand All @@ -92,17 +104,21 @@ describe('Generates links for', () => {
withGnosis();
expect(riskLinks(aPool({ poolType: PoolType.ComposableStable })))
.toMatchInlineSnapshot(`
[
{
"hash": "#composable-pools",
"title": "Composable stable pool risks",
},
{
"hash": "#gnosis",
"title": "Layer 2 network risks: Gnosis",
},
]
`);
[
{
"hash": "#composable-pools",
"title": "Composable Stable pool risks",
},
{
"hash": "#gnosis",
"title": "Layer 2 network risks: Gnosis",
},
{
"hash": "#general-risks",
"title": "General Balancer protocol risks",
},
]
`);
});

test('a composable stable pool with Delegate Owner', () => {
Expand All @@ -114,6 +130,10 @@ describe('Generates links for', () => {
"hash": "#composable-pools",
"title": "MetaStable pool risks",
},
{
"hash": "#general-risks",
"title": "General Balancer protocol risks",
},
]
`);
});
Expand Down
Loading

0 comments on commit 16c8db0

Please sign in to comment.