Skip to content

Commit

Permalink
Merge branch 'master' into veboostv2-deployment
Browse files Browse the repository at this point in the history
* master:
  Remove salt from veboost domain separator and expose version (#2085)
  Add totalSupply to VotingEscrowDelegationProxy (#2098)
  Deploy L2 Gauge Checkpointer (#2114)
  Nuke distributors package (#2111)
  Replace gauge manager with authorizer adaptor (#2108)
  Deployment preparation: L2 gauge checkpointer (#1601)
  • Loading branch information
TomAFrench committed Dec 6, 2022
2 parents e0e3d39 + d0729bc commit 07cf750
Show file tree
Hide file tree
Showing 42 changed files with 730 additions and 1,970 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,6 @@ jobs:
- name: Benchmark Join/Exit
run: yarn workspace @balancer-labs/v2-benchmarks measure-join-exit

merkle-claim:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Benchmark Merkle Claim
run: yarn workspace @balancer-labs/v2-benchmarks measure-merkle-claim

relayer:
runs-on: ubuntu-latest
steps:
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,25 +163,6 @@ jobs:
- name: Run Forge tests
run: yarn workspace @balancer-labs/v2-pool-linear test-fuzz

test-distributors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile
run: yarn build
- name: Test
run: yarn workspace @balancer-labs/v2-distributors test
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run Forge tests
run: yarn workspace @balancer-labs/v2-distributors test-fuzz

test-liquidity-mining:
runs-on: ubuntu-latest
steps:
Expand Down
67 changes: 0 additions & 67 deletions audits/test-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,73 +138,6 @@ codes instead of standard revert strings.
➤ [@balancer-labs/v2-asset-manager-utils]:
➤ [@balancer-labs/v2-asset-manager-utils]: 54 passing (41s)
➤ [@balancer-labs/v2-asset-manager-utils]:
➤ [@balancer-labs/v2-distributors]:
➤ [@balancer-labs/v2-distributors]:
➤ [@balancer-labs/v2-distributors]: MerkleRedeem
➤ [@balancer-labs/v2-distributors]: ✓ stores an allocation (284ms)
➤ [@balancer-labs/v2-distributors]: ✓ emits RewardAdded when an allocation is stored (252ms)
➤ [@balancer-labs/v2-distributors]: ✓ requisitions tokens when it stores a balance
➤ [@balancer-labs/v2-distributors]: ✓ reverts when unauthorized to seed allocation
➤ [@balancer-labs/v2-distributors]: ✓ stores multiple allocations
➤ [@balancer-labs/v2-distributors]: with an allocation
➤ [@balancer-labs/v2-distributors]: ✓ allows the user to claimWeek (255ms)
➤ [@balancer-labs/v2-distributors]: ✓ emits RewardPaid when an allocation is claimed
➤ [@balancer-labs/v2-distributors]: ✓ marks claimed weeks as claimed
➤ [@balancer-labs/v2-distributors]: ✓ allows the user to claimWeek to internal balance
➤ [@balancer-labs/v2-distributors]: ✓ reverts when a user attempts to claim for another user
➤ [@balancer-labs/v2-distributors]: ✓ reverts when the user attempts to claim the wrong balance
➤ [@balancer-labs/v2-distributors]: ✓ reverts when the user attempts to claim twice
➤ [@balancer-labs/v2-distributors]: ✓ reverts when an admin attempts to overwrite an allocationn
➤ [@balancer-labs/v2-distributors]: with several allocations
➤ [@balancer-labs/v2-distributors]: ✓ allows the user to claim multiple weeks at once
➤ [@balancer-labs/v2-distributors]: ✓ reports weeks as unclaimed
➤ [@balancer-labs/v2-distributors]: ✓ returns an array of merkle roots
➤ [@balancer-labs/v2-distributors]: When a user has claimed one of their allocations
➤ [@balancer-labs/v2-distributors]: ✓ reports one of the weeks as claimed
➤ [@balancer-labs/v2-distributors]:
➤ [@balancer-labs/v2-distributors]: Staking contract
➤ [@balancer-labs/v2-distributors]: isAllowlistedRewarder
➤ [@balancer-labs/v2-distributors]: ✓ allows thet asset managers to allowlist themselves
➤ [@balancer-labs/v2-distributors]: ✓ allows the owner to allowlist someone
➤ [@balancer-labs/v2-distributors]: ✓ returns false for random users
➤ [@balancer-labs/v2-distributors]: addReward
➤ [@balancer-labs/v2-distributors]: ✓ sets up a reward for an asset manager
➤ [@balancer-labs/v2-distributors]: stakeWithPermit
➤ [@balancer-labs/v2-distributors]: ✓ stakes with a permit signature
➤ [@balancer-labs/v2-distributors]: ✓ stakes with a permit signature to a recipient
➤ [@balancer-labs/v2-distributors]: with two stakes
➤ [@balancer-labs/v2-distributors]: ✓ sends expected amount of reward token to the rewards contract
➤ [@balancer-labs/v2-distributors]: ✓ emits RewardAdded when an allocation is stored
➤ [@balancer-labs/v2-distributors]: when the rewarder has called notifyRewardAmount
➤ [@balancer-labs/v2-distributors]: ✓ distributes the reward according to the fraction of staked LP tokens
➤ [@balancer-labs/v2-distributors]: ✓ allows a user to claim the reward to an EOA
➤ [@balancer-labs/v2-distributors]: ✓ allows a user to claim the reward to internal balance
➤ [@balancer-labs/v2-distributors]: ✓ emits RewardPaid when an allocation is claimed
➤ [@balancer-labs/v2-distributors]: with a second distribution from the same rewarder
➤ [@balancer-labs/v2-distributors]: ✓ calculates totalEarned from both distributions
➤ [@balancer-labs/v2-distributors]: with a second distributions from another rewarder
➤ [@balancer-labs/v2-distributors]: ✓ calculates totalEarned from both distributions
➤ [@balancer-labs/v2-distributors]: with two pools
➤ [@balancer-labs/v2-distributors]: ✓ allows you to claim across multiple pools (431ms)
➤ [@balancer-labs/v2-distributors]: - emits RewardPaid for each pool
➤ [@balancer-labs/v2-distributors]:
➤ [@balancer-labs/v2-distributors]: Staking contract
➤ [@balancer-labs/v2-distributors]: with a stake and a reward
➤ [@balancer-labs/v2-distributors]: ✓ allows a user to claim the reward to a callback contract
➤ [@balancer-labs/v2-distributors]: ✓ calls the callback on the contract
➤ [@balancer-labs/v2-distributors]:
➤ [@balancer-labs/v2-distributors]: Reinvestor
➤ [@balancer-labs/v2-distributors]: with a stake and a reward
➤ [@balancer-labs/v2-distributors]: with a pool to claim into
➤ [@balancer-labs/v2-distributors]: ✓ emits PoolBalanceChanged when a LP claims to weighted pool (413ms)
➤ [@balancer-labs/v2-distributors]: ✓ mints bpt to a LP when they claim to weighted pool (380ms)
➤ [@balancer-labs/v2-distributors]: addReward
➤ [@balancer-labs/v2-distributors]: ✓ returns rewards that are unused in reinvestment (438ms)
➤ [@balancer-labs/v2-distributors]:
➤ [@balancer-labs/v2-distributors]:
➤ [@balancer-labs/v2-distributors]: 37 passing (41s)
➤ [@balancer-labs/v2-distributors]: 1 pending
➤ [@balancer-labs/v2-distributors]:
➤ [@balancer-labs/v2-solidity-utils]:
➤ [@balancer-labs/v2-solidity-utils]:
➤ [@balancer-labs/v2-solidity-utils]: BalancerErrors
Expand Down
13 changes: 13 additions & 0 deletions pkg/balancer-js/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,16 @@ export type PoolBalanceOp = {
token: string;
amount: BigNumberish;
};

// Stakeless gauges

export enum GaugeType {
LiquidityMiningCommittee = 0,
veBAL,
Ethereum,
Polygon,
Arbitrum,
Optimism,
Gnosis,
ZkSync,
}
6 changes: 6 additions & 0 deletions pkg/deployments/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### New Deployments

- Deployed `L2GaugeCheckpointer` to Mainnet.

## 3.1.1 (2022-12-01)

### Bugfixes
Expand Down
1 change: 1 addition & 0 deletions pkg/deployments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Returns an object with all contracts from a deployment and their addresses.
| Composable Stable Pools V2 | [`20221122-composable-stable-pool-v2`](./tasks/20221122-composable-stable-pool-v2) |
| Authorizer Adaptor Entrypoint | [`20221124-authorizer-adaptor-entrypoint`](./tasks/20221124-authorizer-adaptor-entrypoint) |
| Timelock Authorizer, governance contract | [`20221202-timelock-authorizer`](./tasks/20221202-timelock-authorizer) |
| L2 Gauge Checkpointer | [`20221205-l2-gauge-checkpointer`](./tasks/20221205-l2-gauge-checkpointer) |

## Scripts

Expand Down
3 changes: 2 additions & 1 deletion pkg/deployments/deployment-txs/goerli.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,6 @@
"0x8E5698dC4897DC12243c8642e77B4f21349Db97C": "0x3e8485ee25b828946c7aea95388214d7d208d85b50e96860e4a8e00afa6daa74",
"0xee47ef369CDa5a65639D7794b70a4d247826DdF3": "0x2e73806eba95a16ee3009eb8da077d1faa39db65ad2b6b63a114b1c10dba4352",
"0x85a80afee867aDf27B50BdB7b76DA70f1E853062": "0x652709f2f555d1d38febfd567abf9b4bd0fcccda6ad0eb0341c540730bc6f740",
"0x373b347bc87998b151A5E9B6bB6ca692b766648a": "0xb0f85bd0cb95451e8dc26d4956699a16cd7ad47d3c0f1a952de77e937af17a8c"
"0x373b347bc87998b151A5E9B6bB6ca692b766648a": "0xb0f85bd0cb95451e8dc26d4956699a16cd7ad47d3c0f1a952de77e937af17a8c",
"0xf23b4DB826DbA14c0e857029dfF076b1c0264843": "0xd97f6363f6067ff3dc12a8748d2c8307256d07532428e549db5e2c5b1e5a9788"
}
3 changes: 2 additions & 1 deletion pkg/deployments/deployment-txs/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,6 @@
"0xfBF475f236b58A1F2c0A98BcF29033ef4C30bD7c": "0xfe9f6e3f6ce99d0b07bbeb8ab6eaed28575de360edbff9bfc79f38052626c5ad",
"0xf8ee6f1F9B54F9b2C192D703ea2d22112cBC062b": "0x20eb23f4393fd592240ec788f44fb9658cc6ef487b88398e9b76c910294c4eae",
"0x85a80afee867aDf27B50BdB7b76DA70f1E853062": "0x0042954a30f282acd402606c83163c95fc6e0484a56b87dee0d9685cd0de1662",
"0x373b347bc87998b151A5E9B6bB6ca692b766648a": "0x8a92b6e8db14842aaf6a3c4de54627887798189a306243f6cb1387724fde96f7"
"0x373b347bc87998b151A5E9B6bB6ca692b766648a": "0x8a92b6e8db14842aaf6a3c4de54627887798189a306243f6cb1387724fde96f7",
"0xf23b4DB826DbA14c0e857029dfF076b1c0264843": "0x6381ca48c4967cca2373acbbd4f4e6c6f22d0f73d6fae93528ad14834d10c99a"
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions pkg/deployments/tasks/20221205-l2-gauge-checkpointer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Task from '../../src/task';
import { TaskRunOptions } from '../../src/types';
import { L2GaugeCheckpointerDeployment } from './input';

export default async (task: Task, { force, from }: TaskRunOptions = {}): Promise<void> => {
const input = task.input() as L2GaugeCheckpointerDeployment;

const args = [input.GaugeAdder];
await task.deployAndVerify('L2GaugeCheckpointer', args, from, force);
};
11 changes: 11 additions & 0 deletions pkg/deployments/tasks/20221205-l2-gauge-checkpointer/input.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Task, { TaskMode } from '../../src/task';

export type L2GaugeCheckpointerDeployment = {
GaugeAdder: string;
};

const GaugeAdder = new Task('20220628-gauge-adder-v2', TaskMode.READ_ONLY);

export default {
GaugeAdder,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"L2GaugeCheckpointer": "0xf23b4DB826DbA14c0e857029dfF076b1c0264843"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"L2GaugeCheckpointer": "0xf23b4DB826DbA14c0e857029dfF076b1c0264843"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 2022-12-05 - L2 Gauge Checkpointer

Deployment of the `L2GaugeCheckpointer` contract. It automates the process of performing checkpoints to stakeless root gauges.

## Useful Files

- [Ethereum mainnet addresses](./output/mainnet.json)
- [Goerli addresses](./output/goerli.json)
- [`L2GaugeCheckpointer` artifact](./artifact/L2GaugeCheckpointer.json)
Loading

0 comments on commit 07cf750

Please sign in to comment.