Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begin adding tracking for "real world" state of permissions granted onchain #2027

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions pkg/permissions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog

## Unreleased
14 changes: 14 additions & 0 deletions pkg/permissions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# <img src="../../logo.svg" alt="Balancer" height="128px">

# Balancer V2 Permissions

[![NPM Package](https://img.shields.io/npm/v/@balancer-labs/v2-permissions.svg)](https://www.npmjs.org/package/@balancer-labs/v2-permissions)
[![GitHub Repository](https://img.shields.io/badge/github-deployments-lightgrey?logo=github)](https://github.com/balancer-labs/balancer-v2-monorepo/tree/master/pkg/permissions)

## Overview

### Installation

```console
$ npm install @balancer-labs/v2-permissions
```
13 changes: 13 additions & 0 deletions pkg/permissions/labelled-accounts/mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"0x10a19e7ee7d7f8a52822f6817de8ea18204f2e4f": "DAO_MULTISIG",
"0x166f54f44f271407f24aa1be415a730035637325": "BALLER_OPS_MULTISIG",
"0x75a52c0e32397a3fc0c052e2ceb3479802713cf4": "LINEAR_POOL_CONTROLLER_BALLER_MULTISIG",
"0xf4a80929163c5179ca042e1b292f5efbbe3d89e6": "SWAP_FEE_CONTROLLER_BALLER_MULTISIG",
"0xc38c5f97b34e175ffd35407fc91a937300e33860": "LM_MULTISIG",
"0x7c68c42de679ffb0f16216154c996c354cf1161b": "TREASURY_MULTISIG",
"0xa29f61256e948f3fb707b4b3b138c5ccb9ef9888": "EMERGENCY_SUBDAO_MULTISIG",
"0x02f35dA6A02017154367Bc4d47bb6c7D06C7533B": "BLABS_OPS_MULTISIG",
"0xd2eb7bd802a7ca68d9acd209bec4e664a9abdd7b": "BLABS_VEBAL_MULTISIG",
"0xe4a8ed6c1d8d048bd29a00946bfcf2db10e7923b": "GAUNTLET_FEE_SETTER",
"0xc92e8bdf79f0507f65a392b0ab4667716bfe0110": "GNOSIS_PROTOCOL_RELAYER"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be good if we could also have a short description of what these are, their scope, and potentially even link to gov discussion. We could add a metadata field, or make this a ts file and just write comments

}
5 changes: 5 additions & 0 deletions pkg/permissions/labelled-accounts/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Labelled Accounts

This directory contains accounts which hold permissions over areas of the the Balancer Protocol which aren't deployed as part of the Balancer Protocol itself (as these are tracked in the `@balancer-labs/v2-deployments` package). These are generally Safe multisigs or externally developed contracts.

Balancer DAO maintains documentation on the list of Safe multisigs it uses on [Notion](https://quark-ceres-740.notion.site/Multisig-List-Guidelines-402e18cff13e4f2fa571bc14ed007546)
41 changes: 41 additions & 0 deletions pkg/permissions/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "@balancer-labs/v2-permissions",
"version": "0.1.0",
"description": "Registry of permissions granted on Balancer's Authorizer contract",
"license": "GPL-3.0-only",
"homepage": "https://github.com/balancer-labs/balancer-v2-monorepo/tree/master/pkg/permissions#readme",
"repository": {
"type": "git",
"url": "https://github.com/balancer-labs/balancer-v2-monorepo.git",
"directory": "pkg/permissions"
},
"bugs": {
"url": "https://github.com/balancer-labs/balancer-v2-monorepo/issues"
},
"main": "dist/index.js",
"module": "dist/index.esm.js",
"browser": "dist/index.umd.js",
"typings": "dist/index.d.ts",
"files": [
"dist/"
],
"scripts": {
"permissions:update": "yarn ts-node scripts/getPermissionedAccounts.ts",
"permissions:map": "yarn ts-node scripts/getCallableFunctions.ts",
"permissions:unknown": "yarn ts-node scripts/getUnrecognisedActionIds.ts",
"lint": "eslint . --ext .ts --ignore-path ../../.eslintignore --max-warnings 0",
"test": "hardhat test ./**/test/*.ts"
},
"devDependencies": {
"@types/node": "^14.14.31",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.41.0",
"chalk": "^4.1.2",
"eslint": "^8.26.0",
"eslint-plugin-prettier": "^4.2.1",
"node-fetch": "^2.6.7",
"prettier": "^2.7.1",
"ts-node": "^10.9.1",
"typescript": "^4.0.2"
}
}
129 changes: 129 additions & 0 deletions pkg/permissions/permissions/actionIds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"0x02f35da6a02017154367bc4d47bb6c7d06c7533b": [
"0x5bcdcc8d471eea0c6345d3dd65ad4997a32054e1e0672b780a9b6c36df0166a3",
"0x8b2c6767a8c426408240798cd82acf7ba6091320da176d0b1ab39e99fd5c409d",
"0x3f63974a377ba4713661ede455bceda6686a0395f8b8ed8701ad1f13bb926c4d",
"0xc89b780137460c1010bc938658c3b615990dd348e27ff1d095be12e6fe617f64",
"0xbdac75576424959cffc7f91ec4674a05fd1c62bedcbcbce9dab046c58c881950"
],
"DAO_MULTISIG": [
"0xac0fcdc4520d7bde1c58bbefd7c8dd39aaf382a20c27991134c14fe63d2c96f3",
"0x43cd68bd7db0472f3fac100d3f402a603c8ab62e816feff20dbe3ec6c6e61b89",
"0xec1d467d9ab03a0079c22a89037209f5763aec973897ea763e2cf25d71a5f12e",
"0x4907aec017cb19a28528e722251b40fd7c5eadd4f4a0f0c6a9bca9888f8a0b7f",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x453b670b2708db1ba5df1da1d48add0564558624efac456e43e9c9fff99d51af",
"0xb28b769768735d011b267f781c3be90bce51d5059ba015bc7a28b3e882fb2083"
],
"0x170027069fd114bff2f57b0fc796df93290c02a6": [
"0x3c7de1d8a207c7901ec612f9f0f50957da016911a50d5c22bbe5c9f4f3392d95",
"0xb5593fe09464f360ecf835d5b9319ce69900ae1b29d13844b73c250b1f5f92fb"
],
"0x239e55f427d44c3cc793f49bfb507ebe76638a2b": [
"0xdddd30813da50fda5faba482fd2937d0c6165d2faf027d3dfbd1554f3d7d47ff"
],
"0x2536dfeecb7a0397cf98edada8486254533b1afa": [
"0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653",
"0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff",
"0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30",
"0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8",
"0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498",
"0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34"
],
"0x2ffb7b215ae7f088ec2530c7aa8e1b24e398f26a": [
"0xf49d7ffb5922642adc9f29cfb52b2214e81e0b0e54e9cd1e9f70439f0011f368"
],
"0x5ef4c5352882b10893b70dbcaa0c000965bd23c5": [
"0xb2b6e48fa160a7c887d9d7a68b6a9bb9d47d4953d33e07f3a39e175d75e97796"
],
"LINEAR_POOL_CONTROLLER_BALLER_MULTISIG": [
"0xe4814396e9db5314024c424f43d6a129829efad6c545df373b226431cbcadbd3",
"0x2256d78edacd087428321791a930d4f9fd7acf56e8862187466f1caf179c1a08",
"0x1e3ce02b9d143fb44dc00c908d6b454553cf1c8c48e54090fa1f5fdd18a8e6b9"
],
"TREASURY_MULTISIG": [
"0x826ac7ce861f2a54e071e6c724653757fdd1259804eb1ca7f040aa1cd09923fe"
],
"0x886a3ec7bcc508b8795990b60fa21f85f9db7948": [
"0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff",
"0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653",
"0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30",
"0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498",
"0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8",
"0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34"
],
"0x97207b095e4d5c9a6e4cfbfcd2c3358e03b90c4a": [
"0xb28b769768735d011b267f781c3be90bce51d5059ba015bc7a28b3e882fb2083",
"0xbe2a180d5cc5d803a8eec4cea569989fc1c593d7eeadd1f262f360a68b0e842e"
],
"EMERGENCY_SUBDAO_MULTISIG": [
"0x8d329099a8220fbd27ff3cf304a4cb1dae32335654ec5115c3a643ac0e623418",
"0xc0d91e75884e4ce70f827133990e1c6ee501b41ad3096d25bce3c04d2976c3e7",
"0xa738fa584fff6afe4e319db36f7f5270924047e5e2c04a1712cbfc082e3fd078",
"0x367e95c6cc9f3041f3c6ee21b06ef8992a82318a6b2adbbfb6af3ee601769a30",
"0x8186826062c35b40965262f49014e5ca45b7064fba48b12107613bce22571a99",
"0xfef90c64be79cb170a20e526196e7c8f2f37f441ae85c945c18a91a64777d309",
"0x84163b5cca492497c5fa264018819677910a8022689972cc54566d8667dbce68",
"0xa5a62b55fdf9496f8e1b3feba479423a4349b385bd444f893b3cd4cf9387ce3f",
"0x0d9dbee65c669ef9d726a603957e4a610b40b2662eba759efbedfe87216ec751"
],
"0xac9f49ef3ab0bbc929f7b1bb0a17e1fca5786251": [
"0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498",
"0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff",
"0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30",
"0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653",
"0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34",
"0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8"
],
"LM_MULTISIG": [
"0x5c62111a5fb2cd09521d2805fb5080f8db7f341691a1e38c34a5ededb8f8bfd3",
"0x590e300e371ba81baff1c912e578fdecbfa490f39994607a18ee692ab942f846",
"0x77238124388523487417c8ad8cec25726833e50ca5cab74a4924470fee49ae5d",
"0x72c4c054ad03b4f5f0ba716c30d74c6f27fafb105c850cb59e2b6fec32a42f2f",
"0x5dce9596402d216d8b1fa2b9f8e18b0dc1b5c81f96e0827c6cc83eba6e2205d4",
"0xc63b7b73283233470a85ad7ec28f772b7571c0f6ba90d506999809c2e25a7da6",
"0x82c7bc265be8c8190319e29a314f8c32e62b98bbc9c39defff06a42b34557191",
"0xeb223764963bceacbb06d72a3697801c2460ddf95b2ec410d2641d69249d466f"
],
"GNOSIS_PROTOCOL_RELAYER": [
"0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498",
"0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30"
],
"BLABS_VEBAL_MULTISIG": [
"0x802db13f34b039826402f87748c166a94c8130bf894f8af7e1144c874b36b76e",
"0xbfa133e7b0ebe7bf8b3f11a17a38c0f4492b428e4fb7fc8b509da63189247b06",
"0x79922681fd17c90b4f3409d605f5b059ffcbcef7b5440321ae93b87f3b5c1c78"
],
"0xdcdbf71a870cc60c6f9b621e28a7d3ffd6dd4965": [
"0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30",
"0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34",
"0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff",
"0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653",
"0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498"
],
"GAUNTLET_FEE_SETTER": [
"0x36e042f590f2c5d0d8959cc373c8b1681f70f84e9656be8dd0eae652e01de4eb",
"0x78e9adfe5f05d7114a59d0870d78971192f871f57bb36e2aff2edbe75d425844",
"0xc065d550fa98abc242b6baf98e7b2063590675f1ddd81bdb9ea8d8f5c5d52f98",
"0x6c3a14f10cbcc5a3f4d0e4e8ad279e7a842735ab188e2b13fb84c6542cc3320c",
"0xcf5e03a737e4f5ba6d13e23f893a1e0255b362d8ce22e9568e1565fcf92789c7",
"0x7b09f4b61ccfe85436161b0223489b187d9f9158c542b5e6105df147afc78aca",
"0x15d3918ca8f9895d8906a780f5f402d32707bada7b1b5e7b21b7351257103a35",
"0x3697d13ee45583cf9c2c64a978ab5886bcd07ec2b851efbea2fced982b8f9596"
],
"0xeb151668006cd04dadd098afd0a82e78f77076c3": [
"0x96932b9555c49f1a3a7fb90d4b1ea803f16e02e14a6b942202a84e5f6b65d5c4"
],
"SWAP_FEE_CONTROLLER_BALLER_MULTISIG": [
"0x11562115fbcf4955e097732f59969867f1cb458a8cbd648231b0ffae14c800de",
"0xcad4ec1d64970817394bee6f75af4645fb72ba5b88902c4c155ce82aab0a3a5a",
"0xf8ab8bdb4497d157053d2f796e50c33e6fff3d586b6db6880ab12eff1d907b2b",
"0xf27148d3f1da6319bd754a52acd00b2fc3fa6474241d2398c6d58e8ac0cd9539",
"0xef008574ca41f2b6033a54a73ad6adc382165acd85b6f76f8456d9946b299a16",
"0x94611f33019f04ed070e076bbacb9ff5c5fe03d7184bef4026e1ee669d3b623e",
"0x7fad14fae895c80a37148957909942740cfbc0ddc5676b975d9893577ba7cd17",
"0xc30e3272c4933a085c95b84fca44f1a9b3d43e3e560b7b1fac0a6b2c9bbda16f",
"0xd4f0c40da2129d4b1aba541e693e03b92a323a66f649257a258fe6e4ea331b52",
"0xe5a9dede86018292d3cd547db825db489579eedbf2eebd3694ab93e912c1fae5"
]
}
Loading