Skip to content

Commit

Permalink
ci: notebooks cleanup on commit
Browse files Browse the repository at this point in the history
  • Loading branch information
heswithme committed Oct 16, 2024
1 parent 2ddeecd commit 4e6872c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 37 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ repos:
- id: check-ast
- id: detect-private-key

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
Expand Down
63 changes: 26 additions & 37 deletions scripts/deploy_scrvusd.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "499a84358c328209",
"id": "0",
"metadata": {},
"source": [
"# s-crvUSD deployment\n",
Expand All @@ -11,16 +11,16 @@
},
{
"cell_type": "markdown",
"id": "4520c41b55d7683a",
"id": "1",
"metadata": {},
"source": [
"## Setup"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "initial_id",
"execution_count": null,
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -34,8 +34,8 @@
},
{
"cell_type": "code",
"execution_count": 2,
"id": "7b037ff92597753a",
"execution_count": null,
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -59,7 +59,7 @@
},
{
"cell_type": "markdown",
"id": "2120ddf1d7c2e37",
"id": "4",
"metadata": {},
"source": [
"## Select mode\n",
Expand All @@ -71,7 +71,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e985a34d313a817",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -86,8 +86,8 @@
},
{
"cell_type": "code",
"execution_count": 3,
"id": "c9356beb2f230641",
"execution_count": null,
"id": "6",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -104,15 +104,15 @@
},
{
"cell_type": "markdown",
"id": "203cca8118d9fd71",
"id": "7",
"metadata": {},
"source": [
"# I. Deployment"
]
},
{
"cell_type": "markdown",
"id": "795bc15c",
"id": "8",
"metadata": {},
"source": [
"### 1. Vault"
Expand All @@ -121,7 +121,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "890bc785bdd781f5",
"id": "9",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -144,7 +144,7 @@
},
{
"cell_type": "markdown",
"id": "156fcef9",
"id": "10",
"metadata": {},
"source": [
"### 2. DepositLimitModule"
Expand All @@ -153,7 +153,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4044fa3d",
"id": "11",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -171,7 +171,7 @@
},
{
"cell_type": "markdown",
"id": "d12e24c7",
"id": "12",
"metadata": {},
"source": [
"### 3. RewardsHandler"
Expand All @@ -180,7 +180,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "0c2d2d77",
"id": "13",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -201,7 +201,7 @@
},
{
"cell_type": "markdown",
"id": "4e52fe72",
"id": "14",
"metadata": {},
"source": [
"# II. Post-deployment setup"
Expand All @@ -210,7 +210,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3c024876",
"id": "15",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -224,24 +224,13 @@
"vault.set_role(ab.dev_multisig, int(\"11111111111111\", 2)) # set dev_multisig megarole\n",
"vault.transfer_role_manager(ab.dao_agent)\n",
"\n",
"\n",
"# with boa.env.prank(ab.dev_multisig): ### TODO call from multisig\n",
"# with boa.env.prank(ab.dev_multisig): ### TODO call from dev_multisig\n",
"# vault.set_deposit_limit_module(deposit_limit.address, True)\n",
"# c. relinquish the role manager role to DAO\n",
"# c. relinquish the role manager role to DAO ### TODO propose acceptance of role by dao\n",
"\n",
"# II. Set the deposit limit module\n",
"# ok actually below is a massive waste of gas\n",
"# let's just appoint multisig and manually set the security agent to fuzzland (that's -4 txn)\n",
"\n",
"# deposit_limit_contract = boa.load_partial(\"../contracts/DepositLimitModule.vy\").at(deposit_limit_address)\n",
"# # a. set fuzzland as security agent\n",
"# deposit_limit_contract.set_security_agent(ab.fuzzland_address, True)\n",
"# # set dev_multisig as admin and security agent\n",
"# deposit_limit_address.set_admin(ab.dev_multisig, True)\n",
"# deposit_limit_address.set_security_agent(ab.dev_multisig, True)\n",
"# # relinquish the admin role\n",
"# deposit_limit_address.set_security_agent(deployer_address, False)\n",
"# deposit_limit_address.set_admin(deployer_address, False)\n",
"# use dev_multisig as admin at deploy time, then manually set the security agent to fuzzland (to avoid extra txns from deployer)\n",
"# deposit_limit_address.set_security_agent(ab.fuzzland_address, True) # TODO dev_multisig txn\n",
"\n",
"# III. Finally set the rewards handler parameters\n",
"# rewards_handler_contract = boa.load_partial(\"../contracts/RewardsHandler.vy\").at(rewards_handler_address)\n",
Expand All @@ -250,7 +239,7 @@
},
{
"cell_type": "markdown",
"id": "d7ea437ad6fb9508",
"id": "16",
"metadata": {},
"source": [
"## 3. Vote in the DAO"
Expand All @@ -259,7 +248,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "90e438d8960ee33b",
"id": "17",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -271,7 +260,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e6eb28b57fbfcd29",
"id": "18",
"metadata": {},
"outputs": [],
"source": []
Expand Down

0 comments on commit 4e6872c

Please sign in to comment.