├── .gitattributes ├── .gitignore ├── DssExecLib.address ├── scripts ├── estimate-deploy-gas.sh ├── cast-on-tenderly │ ├── .gitignore │ └── package.json ├── archive-dssspell.sh ├── diff-archive-dssspell.sh ├── get-deploy-info.sh ├── rates.sh ├── time.py ├── test-dssspell-forge.sh ├── get-opt-relay-cost.sh ├── hash-exec-copy.sh ├── diff-deployed-dssspell.sh ├── compare-bytecode.sh ├── wards.sh ├── get-arb-relay-cost.sh ├── deploy.sh └── cast-dssspell.sh ├── .gitmodules ├── archive ├── 2022-12-07-DssSpell │ ├── scripts │ │ ├── estimate-deploy-gas.sh │ │ ├── archive-dssspell.sh │ │ ├── diff-archive-dssspell.sh │ │ ├── deploy.sh │ │ ├── hash-exec-copy.sh │ │ ├── get-created-timestamp.sh │ │ ├── time.sh │ │ ├── test-dssspell-forge.sh │ │ ├── test-dssspell.sh │ │ ├── compare-bytecode.sh │ │ ├── wards.sh │ │ └── cast-dssspell.sh │ ├── Makefile │ └── test │ │ └── addresses_deployers.sol ├── 2023-02-02-DssSpell │ ├── scripts │ │ └── fund-pause-proxy.sh │ ├── util │ │ └── Bombshell.sol │ ├── Makefile │ └── test │ │ └── addresses_deployers.sol ├── 2023-04-28-DssSpell │ └── dependencies │ │ └── dss-direct-deposit │ │ ├── D3MCoreInstance.sol │ │ └── D3MInstance.sol ├── 2023-07-12-DssSpell │ └── dependencies │ │ └── dss-flappers │ │ └── FlapperInstance.sol ├── 2023-02-07-DssSpell │ ├── util │ │ └── Bombshell.sol │ ├── DssSpell.sol │ └── test │ │ └── addresses_deployers.sol ├── 2023-02-20-DssSpell │ ├── util │ │ └── Bombshell.sol │ └── test │ │ └── addresses_deployers.sol ├── 2023-03-03-DssSpell │ ├── util │ │ └── Bombshell.sol │ └── test │ │ └── addresses_deployers.sol ├── 2022-01-20-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-01-27-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-02-02-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-02-17-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2022-03-03-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2022-03-09-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2022-03-11-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2022-04-01-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2022-04-07-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-04-14-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-04-28-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-05-08-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2022-05-16-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpellCollateralOnboarding.sol ├── 2022-05-20-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ ├── Goerli-DssSpell.sol │ └── Goerli-DssSpellCollateralOnboarding.sol ├── 2022-03-04-Charter-Sneak │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2022-01-14-catch-up-december-update-jan-dusts │ └── test │ │ └── addresses_deployers.sol ├── 2022-06-06-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-06-27-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2022-07-11-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-07-25-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2022-08-01-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-08-05-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2021-10-28-Add-Fabs-to-Changelog │ └── Goerli-DssSpell.sol ├── 2023-04-07-DssSpell │ └── DssSpell.sol ├── 2022-11-12-DssSpell │ ├── Goerli-DssSpell.sol │ └── test │ │ └── addresses_deployers.sol ├── 2022-08-30-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-09-05-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-09-12-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-09-26-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2021-10-01-Offboard-USDT │ └── Goerli-DssSpell.sol ├── 2022-10-19-DssSpell │ ├── Goerli-DssSpellCollateral.sol │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2022-10-04-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2022-10-12-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-10-26-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-11-07-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-11-14-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-11-28-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2022-11-29-DssSpell │ ├── test │ │ └── addresses_deployers.sol │ └── Goerli-DssSpell.sol ├── 2023-01-24-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2023-03-16-DssSpell │ └── test │ │ └── addresses_deployers.sol ├── 2023-03-17-DssSpell │ └── test │ │ └── addresses_deployers.sol └── 2021-08-12-PIP_WBTC_RENBTC_CLIP_stables_DSR │ └── Goerli-DssSpell.sol ├── remappings.txt ├── foundry.toml ├── .editorconfig ├── .github ├── workflows │ └── tests.yaml └── PULL_REQUEST_TEMPLATE.md ├── Makefile └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /out 2 | /cache 3 | *.log 4 | .DS_Store 5 | .env* 6 | -------------------------------------------------------------------------------- /DssExecLib.address: -------------------------------------------------------------------------------- 1 | 0x122F6c0Dcd898b4a07310E92c3eAE5D7Ce0c8bb6 2 | -------------------------------------------------------------------------------- /scripts/estimate-deploy-gas.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | BIN=$(jq -r '.contracts|.["src/DssSpell.sol"]|.DssSpell|.evm|.bytecode|.object' ./out/dapp.sol.json) 4 | seth estimate --create "${BIN}" "DssSpell()" 5 | -------------------------------------------------------------------------------- /scripts/cast-on-tenderly/.gitignore: -------------------------------------------------------------------------------- 1 | # project 2 | .env* 3 | 4 | # node 5 | node_modules/ 6 | logs 7 | *.log 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | lerna-debug.log* 12 | .pnpm-debug.log* 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/dss-exec-lib"] 2 | path = lib/dss-exec-lib 3 | url = https://github.com/makerdao/dss-exec-lib 4 | [submodule "lib/dss-test"] 5 | path = lib/dss-test 6 | url = https://github.com/makerdao/dss-test 7 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/estimate-deploy-gas.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | BIN=$(jq -r '.contracts|.["src/Goerli-DssSpell.sol"]|.DssSpell|.evm|.bytecode|.object' ./out/dapp.sol.json) 4 | seth estimate --create "${BIN}" "DssSpell()" 5 | -------------------------------------------------------------------------------- /remappings.txt: -------------------------------------------------------------------------------- 1 | ds-test/=lib/dss-test/lib/forge-std/lib/ds-test/src/ 2 | dss-exec-lib/=lib/dss-exec-lib/src/ 3 | dss-interfaces/=lib/dss-test/lib/dss-interfaces/src/ 4 | dss-test/=lib/dss-test/src/ 5 | forge-std/=lib/dss-test/lib/forge-std/src/ 6 | -------------------------------------------------------------------------------- /scripts/archive-dssspell.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [[ -z "$1" ]]; then 5 | echo "You must provide a date (YYYY-MM-DD) option to name the directory" 6 | else 7 | cp -r "./src" "./archive/$1-DssSpell" 8 | echo "Spell, tests and base copied to archive directory $1-DssSpell" 9 | fi 10 | -------------------------------------------------------------------------------- /scripts/diff-archive-dssspell.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [[ -z "$1" ]]; then 5 | echo "You must provide a date (YYYY-MM-DD) option to diff the directory" 6 | else 7 | diff -r "./src" "./archive/$1-DssSpell" 8 | echo "Spell, tests and base match the archive directory $1-DssSpell" 9 | fi 10 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/archive-dssspell.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [[ -z "$1" ]]; then 5 | echo "You must provide a date (YYYY-MM-DD) option to name the directory" 6 | else 7 | cp -r "./src" "./archive/$1-DssSpell" 8 | echo "Spell, tests and base copied to archive directory $1-DssSpell" 9 | fi 10 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/diff-archive-dssspell.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [[ -z "$1" ]]; then 5 | echo "You must provide a date (YYYY-MM-DD) option to diff the directory" 6 | else 7 | diff -r "./src" "./archive/$1-DssSpell" 8 | echo "Spell, tests and base match the archive directory $1-DssSpell" 9 | fi 10 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$(cast chain --rpc-url="$ETH_RPC_URL")" == "goerli" ]] || { echo "Please set a Goerli ETH_RPC_URL"; exit 1; } 5 | [[ "$ETHERSCAN_API_KEY" ]] || { echo "Please set ETHERSCAN_API_KEY"; exit 1; } 6 | 7 | make && \ 8 | dapp create DssSpell | \ 9 | xargs ./scripts/verify.py DssSpell 10 | -------------------------------------------------------------------------------- /scripts/cast-on-tenderly/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "deploy-to-tenderly", 3 | "type": "module", 4 | "version": "1.0.0", 5 | "description": "A script to execute spell on a fork", 6 | "main": "index.js", 7 | "scripts": { 8 | "start": "node ." 9 | }, 10 | "dependencies": { 11 | "axios": "^1.4.0", 12 | "dotenv": "^16.1.4", 13 | "ethers": "^5.7.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = 'src' 3 | out = 'out' 4 | libs = ['lib'] 5 | fs_permissions = [ 6 | { access = "read", path = "./lib/dss-test/script/input/"}, 7 | { access = "read", path = "./out/ArbitrumDomain.sol/ArbSysOverride.json"} 8 | ] 9 | 10 | [rpc_endpoints] 11 | goerli = "${ETH_RPC_URL}" 12 | 13 | # See more config options https://github.com/gakonst/foundry/tree/master/config 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig for MakerDAO Projects 2 | 3 | # EditorConfig is awesome: https://EditorConfig.org 4 | 5 | # top-most EditorConfig file 6 | root = true 7 | 8 | [*] 9 | charset = utf-8 10 | end_of_line = lf 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | 14 | [*.{sol,sh,js,py}] 15 | indent_style = space 16 | indent_size = 4 17 | 18 | [*.{diff,md}] 19 | trim_trailing_whitespace = false 20 | 21 | [{package.json,.travis.yml}] 22 | indent_style = space 23 | indent_size = 2 24 | 25 | [foundry.toml] 26 | indent_style = space 27 | indent_size = 4 28 | -------------------------------------------------------------------------------- /.github/workflows/tests.yaml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | tests: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Checkout repository and submodules 10 | uses: actions/checkout@v3 11 | 12 | - name: Install Foundry 13 | uses: foundry-rs/foundry-toolchain@v1 14 | with: 15 | version: nightly 16 | 17 | - name: Install Dependencies 18 | run: git submodule update --init --recursive 19 | 20 | - name: Run tests 21 | run: make test 22 | env: 23 | ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }} 24 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/hash-exec-copy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$1" == https://raw.githubusercontent.com/makerdao/community/*/governance/votes/*.md ]] || { echo "Please provide the correct exec copy link to hash (e.g. url=https://raw.githubusercontent.com/makerdao/community//governance/votes/.md)"; exit 1; } 5 | 6 | if [[ -x "$(command -v wget)" ]]; then 7 | cast keccak -- "$(wget "$1" -q -O - 2>/dev/null)" 8 | elif [[ -x "$(command -v curl)" ]]; then 9 | cast keccak -- "$(curl "$1" -o - 2>/dev/null)" 10 | else 11 | echo "Please install either wget or curl"; 12 | exit 1; 13 | fi 14 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/get-created-timestamp.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$ETH_RPC_URL" ]] || { echo "Please set a ETH_RPC_URL"; exit 1; } 5 | 6 | [[ "$1" =~ 0x* ]] || { echo "Please specify the transaction to inspect (e.g. tx=0x)"; exit 1; } 7 | 8 | for ARGUMENT in "$@" 9 | do 10 | KEY=$(echo "$ARGUMENT" | cut -f1 -d=) 11 | VALUE=$(echo "$ARGUMENT" | cut -f2 -d=) 12 | 13 | case "$KEY" in 14 | tx) TXHASH="$VALUE" ;; 15 | *) TXHASH="$KEY" 16 | esac 17 | done 18 | 19 | seth block "$(seth tx "${TXHASH}"|grep blockNumber|awk '{print $2}')"|grep timestamp|awk '{print $2}' 20 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/time.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | for ARGUMENT in "$@" 5 | do 6 | KEY=$(echo "$ARGUMENT" | cut -f1 -d=) 7 | VALUE=$(echo "$ARGUMENT" | cut -f2 -d=) 8 | 9 | case "$KEY" in 10 | date) DATE="$VALUE" ;; 11 | stamp) STAMP="$VALUE" ;; 12 | *) 13 | esac 14 | done 15 | 16 | if [[ -z "$STAMP" && -z "$DATE" ]]; then 17 | cat <&2 <<. 18 | Please use the date or stamp flag, ex: 19 | ${0##*/} date="1 May 2022" 20 | or 21 | ${0##*/} stamp="1651363200" 22 | . 23 | exit 1 24 | elif [[ -z "$DATE" ]]; then 25 | date -u -d @"$STAMP" 26 | date -u -d @"$STAMP" +%s 27 | else 28 | date --utc --date="$DATE" 29 | date --utc --date="$DATE" +%s 30 | fi 31 | -------------------------------------------------------------------------------- /scripts/get-deploy-info.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$ETH_RPC_URL" ]] || { echo "Please set a ETH_RPC_URL"; exit 1; } 5 | 6 | [[ "$1" =~ ^tx=0x[0-9a-fA-F]{64}$ ]] || { echo "Please specify the transaction to inspect (e.g. tx=0x)"; exit 1; } 7 | 8 | for ARGUMENT in "$@" 9 | do 10 | KEY=$(echo "$ARGUMENT" | cut -f1 -d=) 11 | VALUE=$(echo "$ARGUMENT" | cut -f2 -d=) 12 | 13 | case "$KEY" in 14 | tx) TXHASH="$VALUE" ;; 15 | *) TXHASH="$KEY" 16 | esac 17 | done 18 | 19 | echo -e "Network: $(cast chain)" 20 | echo "timestamp: $(cast block "$(cast tx "${TXHASH}"|grep blockNumber|awk '{print $2}')"|grep timestamp|awk '{print $2}')" 21 | echo "block: $(cast tx "${TXHASH}"|grep blockNumber|awk '{print $2}')" 22 | -------------------------------------------------------------------------------- /scripts/rates.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ### rates -- list all rates or compute specific ones 4 | ### Usage: 5 | ### ./rates.sh list all rates from 0 to 100% with granularity of 0.01% 6 | ### ./rates.sh return the computed rate 7 | 8 | set -e 9 | 10 | rate() { 11 | basispoints=$(printf "%.0f" "$(echo "scale=0; $1*100" | bc)") 12 | normalizedamount="$(echo "scale=4; $basispoints/10000 + 1" | bc)" 13 | rayte=$(bc -l <<< "scale=27; e( l($normalizedamount)/(60 * 60 * 24 * 365) ) * 10^27") 14 | echo "$1%: ${rayte%.*}" 15 | } 16 | 17 | if [[ -z $1 ]]; then 18 | for n in $(seq 0 0.01 100); 19 | do 20 | rate "$n" 21 | done 22 | elif [[ $1 =~ ^(0|[1-9][0-9]?|100)(\.[0-9]{1,2})?$ ]]; then 23 | rate "$1" 24 | else 25 | echo "Please specify a percentage parameter (e.g. for 4.25% use $0 4.25 or make rates pct=4.25)" 26 | exit 1 27 | fi 28 | -------------------------------------------------------------------------------- /scripts/time.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | 3 | import argparse 4 | from datetime import datetime, timezone 5 | 6 | DATE_FORMAT="%Y-%m-%d %H:%M:%S"; 7 | 8 | # Parse positional arguments 9 | parser=argparse.ArgumentParser() 10 | parser.add_argument("date", help="Converts date to UTC timestamp") 11 | parser.add_argument("stamp", help="Converts timestamp to UTC date") 12 | parsed=parser.parse_args() 13 | 14 | # Cleanup positional arguments 15 | date = parsed.date.replace("date=", "").upper().replace(" UTC", "") 16 | stamp = parsed.stamp.replace("stamp=", "") 17 | 18 | # Convert provided input in UTC format into desired output in UTC as well 19 | if date: 20 | utc_date = datetime.fromisoformat(date).replace(tzinfo=timezone.utc) 21 | print(utc_date) 22 | print(int(utc_date.timestamp())) 23 | if stamp: 24 | utc_date = datetime.fromtimestamp(int(stamp), timezone.utc) 25 | print(utc_date) 26 | print(utc_date.strftime(DATE_FORMAT)) 27 | -------------------------------------------------------------------------------- /archive/2023-02-02-DssSpell/scripts/fund-pause-proxy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | CHANGELOG="0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F" 5 | NETWORK="goerli" 6 | VALUE="1ether" 7 | 8 | [[ "$(cast chain --rpc-url="$ETH_RPC_URL")" == "${NETWORK}" ]] || \ 9 | { echo "Please set a Goerli ETH_RPC_URL"; exit 1; } 10 | 11 | MCD_PAUSE_PROXY=$(cast call "${CHANGELOG}" \ 12 | 'getAddress(bytes32)(address)' \ 13 | "$(cast --format-bytes32-string "MCD_PAUSE_PROXY")") 14 | 15 | echo "Pause Proxy ETH balance (wei) before Bombshell: $(cast balance "${MCD_PAUSE_PROXY}")" 16 | 17 | echo "Deploying Bombshell with ${VALUE}..." 18 | BOMBSHELL=$(forge create \ 19 | --json \ 20 | --value ${VALUE} \ 21 | ./src/util/Bombshell.sol:Bombshell \ 22 | --constructor-args "${MCD_PAUSE_PROXY}" | \ 23 | jq -r '.deployedTo') 24 | 25 | echo "Bombshell located at: ${BOMBSHELL}" 26 | echo " https://goerli.etherscan.io/address/${BOMBSHELL}" 27 | echo "Pause Proxy ETH balance (wei) after Bombshell: $(cast balance "${MCD_PAUSE_PROXY}")" 28 | -------------------------------------------------------------------------------- /archive/2023-04-28-DssSpell/dependencies/dss-direct-deposit/D3MCoreInstance.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2022 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity >=0.8.0; 18 | 19 | struct D3MCoreInstance { 20 | address hub; 21 | address mom; 22 | } 23 | -------------------------------------------------------------------------------- /archive/2023-07-12-DssSpell/dependencies/dss-flappers/FlapperInstance.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2023 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity >=0.8.0; 18 | 19 | struct FlapperInstance { 20 | address flapper; 21 | address mom; 22 | } 23 | -------------------------------------------------------------------------------- /archive/2023-04-28-DssSpell/dependencies/dss-direct-deposit/D3MInstance.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2022 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity >=0.8.0; 18 | 19 | struct D3MInstance { 20 | address plan; 21 | address pool; 22 | address oracle; 23 | } 24 | -------------------------------------------------------------------------------- /scripts/test-dssspell-forge.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$(cast chain --rpc-url="$ETH_RPC_URL")" == "goerli" ]] || { echo "Please set a Goerli ETH_RPC_URL"; exit 1; } 5 | 6 | for ARGUMENT in "$@" 7 | do 8 | KEY=$(echo "$ARGUMENT" | cut -f1 -d=) 9 | VALUE=$(echo "$ARGUMENT" | cut -f2 -d=) 10 | 11 | case "$KEY" in 12 | match) MATCH="$VALUE" ;; 13 | no-match) NO_MATCH="$VALUE" ;; 14 | block) BLOCK="$VALUE" ;; 15 | *) 16 | esac 17 | done 18 | 19 | DSS_EXEC_LIB=$(< DssExecLib.address) 20 | echo "Using DssExecLib at: $DSS_EXEC_LIB" 21 | export FOUNDRY_LIBRARIES="lib/dss-exec-lib/src/DssExecLib.sol:DssExecLib:$DSS_EXEC_LIB" 22 | export FOUNDRY_OPTIMIZER=false 23 | export FOUNDRY_OPTIMIZER_RUNS=200 24 | export FOUNDRY_ROOT_CHAINID=5 25 | 26 | TEST_ARGS='' 27 | 28 | if [[ -n "$MATCH" ]]; then 29 | TEST_ARGS="${TEST_ARGS} -vvv --match-test ${MATCH}" 30 | elif [[ -n "$NO_MATCH" ]]; then 31 | TEST_ARGS="${TEST_ARGS} -vvv --no-match-test ${NO_MATCH}" 32 | fi 33 | 34 | if [[ -n "$BLOCK" ]]; then 35 | TEST_ARGS="${TEST_ARGS} --fork-block-number ${BLOCK}" 36 | fi 37 | 38 | forge test --fork-url "$ETH_RPC_URL" $TEST_ARGS 39 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/test-dssspell-forge.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$(cast chain --rpc-url="$ETH_RPC_URL")" == "goerli" ]] || { echo "Please set a Goerli ETH_RPC_URL"; exit 1; } 5 | 6 | for ARGUMENT in "$@" 7 | do 8 | KEY=$(echo "$ARGUMENT" | cut -f1 -d=) 9 | VALUE=$(echo "$ARGUMENT" | cut -f2 -d=) 10 | 11 | case "$KEY" in 12 | match) MATCH="$VALUE" ;; 13 | block) BLOCK="$VALUE" ;; 14 | *) 15 | esac 16 | done 17 | 18 | DSS_EXEC_LIB=$(< DssExecLib.address) 19 | echo "Using DssExecLib at: $DSS_EXEC_LIB" 20 | export DAPP_LIBRARIES="src/DssSpell.sol:DssExecLib:$DSS_EXEC_LIB" 21 | export DAPP_BUILD_OPTIMIZE=1 # forge turns on optimizer by default 22 | export DAPP_BUILD_OPTIMIZE_RUNS=200 23 | 24 | if [[ -z "$MATCH" && -z "$BLOCK" ]]; then 25 | forge test --fork-url "$ETH_RPC_URL" --force 26 | elif [[ -z "$BLOCK" ]]; then 27 | forge test --fork-url "$ETH_RPC_URL" --match "$MATCH" -vvv --force 28 | elif [[ -z "$MATCH" ]]; then 29 | forge test --fork-url "$ETH_RPC_URL" --fork-block-number "$BLOCK" --force 30 | else 31 | forge test --fork-url "$ETH_RPC_URL" --match "$MATCH" --fork-block-number "$BLOCK" -vvv --force 32 | fi 33 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | # Contribution Checklist 4 | 5 | - [ ] PR title starts with `(PE-)` 6 | - [ ] Code approved 7 | - [ ] Tests approved 8 | - [ ] CI Tests pass 9 | 10 | # Checklist 11 | 12 | - [ ] Every contract variable/method declared as public/external private/internal 13 | - [ ] Consider if this PR needs the `officeHours` modifier override 14 | - [ ] Verify expiration (`30 days` unless otherwise specified) 15 | - [ ] Verify hash in the description matches [here](https://emn178.github.io/online-tools/keccak_256.html) 16 | - [ ] Validate all addresses used are in Goerli changelog or known 17 | - [ ] Notify any external teams affected by the spell so they have the opportunity to review 18 | - [ ] Deploy spell to Goerli `ETH_GAS_LIMIT="XXX" ETH_GAS_PRICE="YYY" make deploy` 19 | - [ ] Ensure contract is verified on `Goerli` etherscan 20 | - [ ] Change test to use Goerli spell address and deploy timestamp 21 | - [ ] Cast spell on Goerli `make spell="0x-deployed-spell-address" cast-spell` 22 | - [ ] Run `make archive-spell` or `make date="YYYY-MM-DD" archive-spell` to make an archive directory and copy `DssSpell.sol`, `DssSpell.t.sol` and `DssSpell.t.base.sol` 23 | - [ ] `squash and merge` this PR 24 | -------------------------------------------------------------------------------- /archive/2023-02-02-DssSpell/util/Bombshell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2023 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | // This contract takes an address in the constructor and will automatically self-destruct, 20 | // sending any ETH balance sent during construction to that address. 21 | // 22 | // https://www.youtube.com/watch?v=llbW8VogyVE 23 | contract Bombshell { 24 | constructor(address _to) payable { 25 | selfdestruct(payable(_to)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /archive/2023-02-07-DssSpell/util/Bombshell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2023 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | // This contract takes an address in the constructor and will automatically self-destruct, 20 | // sending any ETH balance sent during construction to that address. 21 | // 22 | // https://www.youtube.com/watch?v=llbW8VogyVE 23 | contract Bombshell { 24 | constructor(address _to) payable { 25 | selfdestruct(payable(_to)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /archive/2023-02-20-DssSpell/util/Bombshell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2023 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | // This contract takes an address in the constructor and will automatically self-destruct, 20 | // sending any ETH balance sent during construction to that address. 21 | // 22 | // https://www.youtube.com/watch?v=llbW8VogyVE 23 | contract Bombshell { 24 | constructor(address _to) payable { 25 | selfdestruct(payable(_to)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /archive/2023-03-03-DssSpell/util/Bombshell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2023 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | // This contract takes an address in the constructor and will automatically self-destruct, 20 | // sending any ETH balance sent during construction to that address. 21 | // 22 | // https://www.youtube.com/watch?v=llbW8VogyVE 23 | contract Bombshell { 24 | constructor(address _to) payable { 25 | selfdestruct(payable(_to)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /scripts/get-opt-relay-cost.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | trap 'kill $(jobs -p) 2>/dev/null' EXIT 4 | 5 | [[ "$(cast chain --rpc-url="$ETH_RPC_URL")" == "goerli" ]] || { echo "Please set a Goerli ETH_RPC_URL"; exit 1; } 6 | 7 | OPTIMISM_GOERLI_RPC_URL='https://goerli.optimism.io' 8 | 9 | L2_SPELL='0xC077Eb64285b40C86B40769e99Eb1E61d682a6B4' 10 | CHANGELOG='0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F' 11 | X_DOMAIN_MSG_SENDER_SLOT=204 12 | 13 | L1_GOV_RELAY=$( 14 | cast call "$CHANGELOG" "getAddress(bytes32)(address)" \ 15 | "$(cast --format-bytes32-string "OPTIMISM_GOV_RELAY")" 16 | ) 17 | L2_GOV_RELAY=$(cast call "$L1_GOV_RELAY" "l2GovernanceRelay()(address)") 18 | L2_MESSENGER=$(cast call --rpc-url="$OPTIMISM_GOERLI_RPC_URL" "$L2_GOV_RELAY" "messenger()(address)") 19 | 20 | PORT=8555 21 | LOCALHOST="http://127.0.0.1:$PORT" 22 | 23 | anvil -f "$OPTIMISM_GOERLI_RPC_URL" -p "$PORT" > /dev/null 2>&1 & 24 | sleep 10 25 | 26 | cast rpc --rpc-url="$LOCALHOST" anvil_setStorageAt "$L2_MESSENGER" \ 27 | "$(printf 0x"%064X\n" "$X_DOMAIN_MSG_SENDER_SLOT")" \ 28 | "$(printf 0x"%064s\n" "${L1_GOV_RELAY:2}" | tr ' ' 0)" > /dev/null 29 | OPT_GAS=$( 30 | cast estimate --rpc-url="$LOCALHOST" --from "$L2_MESSENGER" \ 31 | "$L2_GOV_RELAY" \ 32 | "relay(address,bytes)" \ 33 | "$L2_SPELL" \ 34 | "$(cast calldata 'execute()')" 35 | ) 36 | 37 | echo "OPT_GAS = $OPT_GAS" 38 | -------------------------------------------------------------------------------- /archive/2023-02-02-DssSpell/Makefile: -------------------------------------------------------------------------------- 1 | all :; DAPP_LIBRARIES=' lib/dss-exec-lib/src/DssExecLib.sol:DssExecLib:$(shell cat DssExecLib.address)' \ 2 | DAPP_BUILD_OPTIMIZE=0 DAPP_BUILD_OPTIMIZE_RUNS=200 \ 3 | dapp --use solc:0.8.16 build 4 | clean :; forge clean 5 | # Usage example: make test match=SpellIsCast 6 | test :; ./scripts/test-dssspell-forge.sh match="$(match)" block="$(block)" 7 | test-forge :; ./scripts/test-dssspell-forge.sh match="$(match)" block="$(block)" 8 | estimate :; ./scripts/estimate-deploy-gas.sh 9 | deploy :; ./scripts/deploy.sh 10 | deploy-info :; ./scripts/get-deploy-info.sh tx=$(tx) 11 | verify :; ./scripts/verify.py DssSpell $(addr) 12 | flatten :; hevm flatten --source-file "src/DssSpell.sol" > out/flat.sol 13 | cast-spell :; ./scripts/cast-dssspell.sh $(spell) 14 | archive-spell :; ./scripts/archive-dssspell.sh "$(if $(date),$(date),$(shell date +'%Y-%m-%d'))" 15 | diff-archive-spell :; ./scripts/diff-archive-dssspell.sh "$(if $(date),$(date),$(shell date +'%Y-%m-%d'))" 16 | wards :; ./scripts/wards.sh $(target) 17 | time :; ./scripts/time.sh date="$(date)" stamp="$(stamp)" 18 | exec-hash :; ./scripts/hash-exec-copy.sh $(url) 19 | fund-pause-proxy :; ./scripts/fund-pause-proxy.sh 20 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/Makefile: -------------------------------------------------------------------------------- 1 | all :; DAPP_LIBRARIES=' lib/dss-exec-lib/src/DssExecLib.sol:DssExecLib:$(shell cat DssExecLib.address)' \ 2 | DAPP_BUILD_OPTIMIZE=1 DAPP_BUILD_OPTIMIZE_RUNS=200 \ 3 | dapp --use solc:0.6.12 build 4 | clean :; dapp clean 5 | # Usage example: make test match=SpellIsCast 6 | test :; ./scripts/test-dssspell-forge.sh match="$(match)" block="$(block)" 7 | test-forge :; ./scripts/test-dssspell-forge.sh match="$(match)" block="$(block)" 8 | test-dapp :; ./scripts/test-dssspell.sh match="$(match)" optimizer="$(optimizer)" optimizer-runs="$(optimizer-runs)" block="$(block)" 9 | estimate :; ./scripts/estimate-deploy-gas.sh 10 | deploy :; ./scripts/deploy.sh 11 | deploy-stamp :; ./scripts/get-created-timestamp.sh tx=$(tx) 12 | flatten :; hevm flatten --source-file "src/Goerli-DssSpell.sol" > out/flat.sol 13 | cast-spell :; ./scripts/cast-dssspell.sh $(spell) 14 | archive-spell :; ./scripts/archive-dssspell.sh "$(if $(date),$(date),$(shell date +'%Y-%m-%d'))" 15 | diff-archive-spell :; ./scripts/diff-archive-dssspell.sh "$(if $(date),$(date),$(shell date +'%Y-%m-%d'))" 16 | wards :; ./scripts/wards.sh $(target) 17 | time :; ./scripts/time.sh date="$(date)" stamp="$(stamp)" 18 | exec-hash :; ./scripts/hash-exec-copy.sh $(url) 19 | -------------------------------------------------------------------------------- /archive/2022-01-20-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint) { 36 | addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-01-27-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint) { 36 | addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-02-02-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint) { 36 | addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-02-17-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint) { 36 | addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-03-03-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint) { 36 | addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-03-09-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint256) { 36 | return addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-03-11-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint256) { 36 | return addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-04-01-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint256) { 36 | return addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-04-07-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint256) { 36 | return addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-04-14-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint256) { 36 | return addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-04-28-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint256) { 36 | return addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-05-08-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint256) { 36 | return addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-05-16-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint256) { 36 | return addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-05-20-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint256) { 36 | return addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-03-04-Charter-Sneak/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint256) { 36 | return addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /archive/2022-01-14-catch-up-december-update-jan-dusts/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity ^0.6.12; 19 | 20 | contract Deployers { 21 | 22 | address[] public addr; 23 | 24 | constructor() public { 25 | addr = [ 26 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 27 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 28 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13 32 | ]; 33 | } 34 | 35 | function count() external view returns (uint) { 36 | addr.length; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /scripts/hash-exec-copy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | if [[ -z "$1" ]]; then 6 | echo "Error: Please provide a date in YYYY-MM-DD format as an argument." 7 | exit 1 8 | fi 9 | 10 | # Check input date for correct format 11 | if ! [[ $1 =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] ; then 12 | echo 'Invalid date format. Please use YYYY-MM-DD' 13 | exit 1 14 | fi 15 | 16 | # Format input date into GitHub date URL format 17 | # %-d displays the day of the month without a leading zero 18 | # sed replace spaces with %20 and commas with %2C 19 | DATE=$(LC_ALL=en_US.utf8 date -d "$1" +"%B %-d, %Y" | sed 's/ /%20/g; s/,/%2C/g') 20 | 21 | if [[ -x "$(command -v curl)" ]]; then 22 | # Get latest change git commit hash for target exec copy 23 | commit_hash=$(curl -s "https://api.github.com/repos/makerdao/community/commits?path=governance/votes/Executive%20vote%20-%20$DATE.md&per_page=1" | grep -o -E '"sha": "[^"]+"' | head -n 1 | awk '{print $2}' | sed 's/"//g') 24 | [[ -z "$commit_hash" ]] && { echo "Error: Executive vote not found"; exit 1; } 25 | # Hash target exec copy 26 | exec_hash=$(cast keccak -- "$(curl -s https://raw.githubusercontent.com/makerdao/community/"$commit_hash"/governance/votes/Executive%20vote%20-%20"$DATE".md)") 27 | else 28 | echo "Please ensure you have curl installed"; 29 | exit 1; 30 | fi 31 | 32 | # Output target exec copy hash 33 | echo "Executive vote - $(date -d "$1" +"%B %d, %Y") 34 | Community repo commit: $commit_hash 35 | Raw GitHub URL: https://raw.githubusercontent.com/makerdao/community/$commit_hash/governance/votes/Executive%20vote%20-%20$DATE.md 36 | Exec copy hash: $exec_hash" 37 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/test-dssspell.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$(seth chain --rpc-url="$ETH_RPC_URL")" == "goerli" ]] || { echo "Please set a Goerli ETH_RPC_URL"; exit 1; } 5 | 6 | for ARGUMENT in "$@" 7 | do 8 | KEY=$(echo "$ARGUMENT" | cut -f1 -d=) 9 | VALUE=$(echo "$ARGUMENT" | cut -f2 -d=) 10 | 11 | case "$KEY" in 12 | match) MATCH="$VALUE" ;; 13 | block) BLOCK="$VALUE" ;; 14 | optimizer) OPTIMIZER="$VALUE" ;; 15 | optimizer-runs) OPTIMIZER_RUNS="$VALUE" ;; 16 | *) 17 | esac 18 | done 19 | 20 | # 2022-01-28 Disabled optimizer on due to engineering costs 21 | [[ -z "$OPTIMIZER" ]] && OPTIMIZER=0 # Default to running with optimize=0 22 | [[ -z "$OPTIMIZER_RUNS" ]] && OPTIMIZER_RUNS=200 # Default to running with optimizer-runs=200 23 | 24 | export DAPP_BUILD_OPTIMIZE="$OPTIMIZER" 25 | export DAPP_BUILD_OPTIMIZE_RUNS="$OPTIMIZER_RUNS" 26 | 27 | DSS_EXEC_LIB=$(< DssExecLib.address) 28 | echo "Using DssExecLib at: $DSS_EXEC_LIB" 29 | export DAPP_LIBRARIES=" lib/dss-exec-lib/src/DssExecLib.sol:DssExecLib:$DSS_EXEC_LIB" 30 | export DAPP_LINK_TEST_LIBRARIES=0 31 | 32 | if [[ -z "$MATCH" && -z "$BLOCK" ]]; then 33 | dapp --use solc:0.6.12 test --rpc-url="$ETH_RPC_URL" -v 34 | elif [[ -z "$BLOCK" ]]; then 35 | dapp --use solc:0.6.12 test --rpc-url="$ETH_RPC_URL" --match "$MATCH" -vv 36 | elif [[ -z "$MATCH" ]]; then 37 | dapp --use solc:0.6.12 test --rpc-url="$ETH_RPC_URL" --rpc-block "$BLOCK" -vv 38 | else 39 | dapp --use solc:0.6.12 test --rpc-url="$ETH_RPC_URL" --match "$MATCH" --rpc-block "$BLOCK" -vv 40 | fi 41 | -------------------------------------------------------------------------------- /scripts/diff-deployed-dssspell.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | command -v jq &> /dev/null || { echo '`jq` command could not be found. Please install it: https://github.com/stedolan/jq'; exit 1; } 6 | [[ "$ETHERSCAN_API_KEY" ]] || { echo -e "Please set ETHERSCAN_API_KEY"; exit 1; } 7 | 8 | if [[ "$1" =~ ^0x[0-9a-fA-F]{40}$ ]]; then 9 | deployed_spell_address=$1 10 | else 11 | # Read contract address from config.sol 12 | deployed_spell_address=$(grep -oE 'deployed_spell:\s*(address\((0x[a-fA-F0-9]{40})\)|(0x[a-fA-F0-9]{40}))' "src/test/config.sol" | sed -E 's/.*(0x[a-fA-F0-9]{40}).*/\1/') 13 | # Check if contract address, block number, and timestamp are zero 14 | [[ "$deployed_spell_address" =~ ^(address\(0\)|0|0x0{40})$ ]] && { echo "DssSpell address is not set in config file."; exit 1; } 15 | fi 16 | 17 | make all && make flatten 18 | 19 | spell_source="out/flat.sol" 20 | etherscan_source="out/etherscan.sol" 21 | 22 | # Download the deployed spell source code from Etherscan API 23 | curl -s "https://api-goerli.etherscan.io/api?module=contract&action=getsourcecode&address=${deployed_spell_address}&apikey=${ETHERSCAN_API_KEY}" \ 24 | | jq -r '.result[0].SourceCode' > $etherscan_source 25 | 26 | # Compare the downloaded source code with the local spell 27 | # Notice: Etherscan apparently returns the source code with Windows-style ('\n\r') line breaks sometimes. 28 | # We use `--string-trailing-cr` to ignore any `\r` characters. 29 | # Notice: With `printf` below we ignore any trailing empty lines. 30 | diff --strip-trailing-cr --color -u <(printf "%s" "$(< $etherscan_source)") <(printf "%s" "$(< $spell_source)") 31 | 32 | make clean 33 | -------------------------------------------------------------------------------- /scripts/compare-bytecode.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Purpose: 3 | # To compare the runtime bytecode of the current spell (src/DssSpell.sol) as 4 | # output by the compiler against the onchain bytecode of a provided contract 5 | # address. Can be used to verify that the deployed bytecode is correct even 6 | # if Etherscan is down. 7 | # 8 | # Prerequisites: 9 | # Your ETH_RPC_URL environment variable must be set to an Ethereum node 10 | # endpoint exposing the getCode API. 11 | # 12 | # Arguments: 13 | # $1 : address of on-chain spell 14 | # 15 | # Example usage: 16 | # ./compare-bytecode.sh 0xb04A29de213411DDb7196eD1327b3B6144893E59 17 | # 18 | # Output: 19 | # A message stating whether the locally compiled spell matches the specified 20 | # contract, or possibly some sort of weird error. 21 | 22 | make all &> /dev/null 23 | COMPILED_BYTECODE=0x$(jq '.contracts|.["src/DssSpell.sol:DssSpell"]|.["bin-runtime"]' ./out/dapp.sol.json | sed 's/"//g') 24 | CB=${COMPILED_BYTECODE::${#COMPILED_BYTECODE}-104} # Trim swarm hash 25 | DEPLOYED_ADDRESS=$(< src/DssSpell.t.sol grep "address constant MAINNET_SPELL" | sed -e 's#.*address(\(\)#\1#' | sed 's/);.*//') 26 | ONCHAIN_BYTECODE=$(curl -s --data '{"method": "eth_getCode", "params":["'"${1-$DEPLOYED_ADDRESS}"'", "latest"], "id":1, "jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST "${ETH_RPC_URL}" | jq '.result' | sed 's/"//g') 27 | OB=${ONCHAIN_BYTECODE::${#ONCHAIN_BYTECODE}-104} # Trim swarm hash 28 | echo "Compiled Bytecode: ${CB:0:40}..." 29 | echo "On-Chain Bytecode: ${OB:0:40}..." 30 | if [ "$CB" = "$OB" ] ; then 31 | echo -e "\e[32mSUCCESS! \e[39mBytecodes match." 32 | else 33 | echo -e "\e[31mFAILURE. \e[39mBytecodes do NOT match." 34 | fi 35 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/compare-bytecode.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Purpose: 3 | # To compare the runtime bytecode of the current spell (src/DssSpell.sol) as 4 | # output by the compiler against the onchain bytecode of a provided contract 5 | # address. Can be used to verify that the deployed bytecode is correct even 6 | # if Etherscan is down. 7 | # 8 | # Prerequisites: 9 | # Your ETH_RPC_URL environment variable must be set to an Ethereum node 10 | # endpoint exposing the getCode API. 11 | # 12 | # Arguments: 13 | # $1 : address of on-chain spell 14 | # 15 | # Example usage: 16 | # ./compare-bytecode.sh 0xb04A29de213411DDb7196eD1327b3B6144893E59 17 | # 18 | # Output: 19 | # A message stating whether the locally compiled spell matches the specified 20 | # contract, or possibly some sort of weird error. 21 | 22 | make all &> /dev/null 23 | COMPILED_BYTECODE=0x$(jq '.contracts|.["src/DssSpell.sol:DssSpell"]|.["bin-runtime"]' ./out/dapp.sol.json | sed 's/"//g') 24 | CB=${COMPILED_BYTECODE::${#COMPILED_BYTECODE}-104} # Trim swarm hash 25 | DEPLOYED_ADDRESS=$(< src/DssSpell.t.sol grep "address constant MAINNET_SPELL" | sed -e 's#.*address(\(\)#\1#' | sed 's/);.*//') 26 | ONCHAIN_BYTECODE=$(curl -s --data '{"method": "eth_getCode", "params":["'"${1-$DEPLOYED_ADDRESS}"'", "latest"], "id":1, "jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST "${ETH_RPC_URL}" | jq '.result' | sed 's/"//g') 27 | OB=${ONCHAIN_BYTECODE::${#ONCHAIN_BYTECODE}-104} # Trim swarm hash 28 | echo "Compiled Bytecode: ${CB:0:40}..." 29 | echo "On-Chain Bytecode: ${OB:0:40}..." 30 | if [ "$CB" = "$OB" ] ; then 31 | echo -e "\e[32mSUCCESS! \e[39mBytecodes match." 32 | else 33 | echo -e "\e[31mFAILURE. \e[39mBytecodes do NOT match." 34 | fi 35 | -------------------------------------------------------------------------------- /archive/2022-06-06-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021-2022 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // Copyright (C) 2021-2022 Dai Foundation 5 | // 6 | // This program is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU Affero General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU Affero General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Affero General Public License 17 | // along with this program. If not, see . 18 | 19 | pragma solidity ^0.6.12; 20 | 21 | contract Deployers { 22 | 23 | address[] public addr; 24 | 25 | constructor() public { 26 | addr = [ 27 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 28 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 29 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 30 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 31 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 32 | 0xDA0111100cb6080b43926253AB88bE719C60Be13, 33 | 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec, // Starknet 34 | 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B // Starknet 35 | ]; 36 | } 37 | 38 | function count() external view returns (uint256) { 39 | return addr.length; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /archive/2022-06-27-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021-2022 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // Copyright (C) 2021-2022 Dai Foundation 5 | // 6 | // This program is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU Affero General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU Affero General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Affero General Public License 17 | // along with this program. If not, see . 18 | 19 | pragma solidity ^0.6.12; 20 | 21 | contract Deployers { 22 | 23 | address[] public addr; 24 | 25 | constructor() public { 26 | addr = [ 27 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 28 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 29 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 30 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 31 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 32 | 0xDA0111100cb6080b43926253AB88bE719C60Be13, 33 | 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec, // Starknet 34 | 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B // Starknet 35 | ]; 36 | } 37 | 38 | function count() external view returns (uint256) { 39 | return addr.length; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all :; DAPP_LIBRARIES=' lib/dss-exec-lib/src/DssExecLib.sol:DssExecLib:$(shell cat DssExecLib.address)' \ 2 | DAPP_BUILD_OPTIMIZE=0 DAPP_BUILD_OPTIMIZE_RUNS=200 \ 3 | DAPP_REMAPPINGS=$$(cat remappings.txt) \ 4 | dapp --use solc:0.8.16 build 5 | clean :; forge clean 6 | # Usage example: make test match=SpellIsCast 7 | test :; ./scripts/test-dssspell-forge.sh no-match="$(no-match)" match="$(match)" block="$(block)" 8 | test-forge :; ./scripts/test-dssspell-forge.sh no-match="$(no-match)" match="$(match)" block="$(block)" 9 | estimate :; ./scripts/estimate-deploy-gas.sh 10 | deploy :; ./scripts/deploy.sh 11 | deploy-info :; ./scripts/get-deploy-info.sh tx=$(tx) 12 | verify :; ./scripts/verify.py DssSpell $(addr) 13 | flatten :; hevm flatten --source-file "src/DssSpell.sol" > out/flat.sol 14 | diff-deployed-spell :; ./scripts/diff-deployed-dssspell.sh $(spell) 15 | check-deployed-spell :; ./scripts/check-deployed-dssspell.sh 16 | cast-spell :; ./scripts/cast-dssspell.sh $(spell) 17 | cast-on-tenderly :; cd ./scripts/cast-on-tenderly/ && npm i && npm start -- $(spell); cd - 18 | archive-spell :; ./scripts/archive-dssspell.sh "$(if $(date),$(date),$(shell date +'%Y-%m-%d'))" 19 | diff-archive-spell :; ./scripts/diff-archive-dssspell.sh "$(if $(date),$(date),$(shell date +'%Y-%m-%d'))" 20 | wards :; ./scripts/wards.sh $(target) 21 | time :; ./scripts/time.py date="$(date)" stamp="$(stamp)" 22 | exec-hash :; ./scripts/hash-exec-copy.sh "$(if $(date),$(date),$(shell date +'%Y-%m-%d'))" 23 | rates :; ./scripts/rates.sh $(pct) 24 | -------------------------------------------------------------------------------- /archive/2022-07-11-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021-2022 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // Copyright (C) 2021-2022 Dai Foundation 5 | // 6 | // This program is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU Affero General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU Affero General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Affero General Public License 17 | // along with this program. If not, see . 18 | 19 | pragma solidity ^0.6.12; 20 | 21 | contract Deployers { 22 | 23 | address[] public addr; 24 | 25 | constructor() public { 26 | addr = [ 27 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 28 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 29 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 30 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 31 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 32 | 0xDA0111100cb6080b43926253AB88bE719C60Be13, 33 | 0x1f42e41A34B71606FcC60b4e624243b365D99745, // Oracles 34 | 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec, // Starknet 35 | 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B // Starknet 36 | ]; 37 | } 38 | 39 | function count() external view returns (uint256) { 40 | return addr.length; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /archive/2022-07-25-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | constructor() public { 24 | addr = [ 25 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 26 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 27 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 28 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 29 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 30 | 0xDA0111100cb6080b43926253AB88bE719C60Be13, 31 | 0x1f42e41A34B71606FcC60b4e624243b365D99745, // Oracles 32 | 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec, // Starknet 33 | 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B, // Starknet 34 | 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e 35 | ]; 36 | } 37 | 38 | function count() external view returns (uint256) { 39 | return addr.length; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /archive/2022-08-01-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | constructor() public { 24 | addr = [ 25 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 26 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 27 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, 28 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 29 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 30 | 0xDA0111100cb6080b43926253AB88bE719C60Be13, 31 | 0x1f42e41A34B71606FcC60b4e624243b365D99745, // Oracles 32 | 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec, // Starknet 33 | 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B, // Starknet 34 | 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010 // CES 35 | ]; 36 | } 37 | 38 | function count() external view returns (uint256) { 39 | return addr.length; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /archive/2022-08-05-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | constructor() public { 24 | addr = [ 25 | 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711, 26 | 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf, 27 | 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445, // Old PE 28 | 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1, 29 | 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674, 30 | 0xDA01018eA05D98aBb66cb21a85d6019a311570eE, 31 | 0xDA0111100cb6080b43926253AB88bE719C60Be13, 32 | 0x1f42e41A34B71606FcC60b4e624243b365D99745, // Oracles 33 | 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec, // Starknet 34 | 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B, // Starknet 35 | 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010 // CES 36 | ]; 37 | } 38 | 39 | function count() external view returns (uint256) { 40 | return addr.length; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/wards.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$ETH_RPC_URL" ]] || { echo "Please set a ETH_RPC_URL"; exit 1; } 5 | 6 | [[ "$1" ]] || { echo "Please specify the Target Address (e.g. target=0xB966002DDAa2Baf48369f5015329750019736031) or ChainLog Key (e.g. target=MCD_VAT) to inspect"; exit 1; } 7 | 8 | for ARGUMENT in "$@" 9 | do 10 | KEY=$(echo "$ARGUMENT" | cut -f1 -d=) 11 | VALUE=$(echo "$ARGUMENT" | cut -f2 -d=) 12 | 13 | case "$KEY" in 14 | target) TARGET="$VALUE" ;; 15 | *) TARGET="$KEY" ;; 16 | esac 17 | done 18 | 19 | ### Override maxFeePerGas to avoid spikes 20 | baseFee=$(seth basefee) 21 | [[ -n "$ETH_GAS_PRICE" ]] && ethGasPriceLtBaseFee=$(echo "$ETH_GAS_PRICE < $baseFee" | bc) 22 | [[ "$ethGasPriceLtBaseFee" == 1 ]] && export "ETH_GAS_PRICE=$(echo "$baseFee * 3" | bc)" 23 | 24 | CHANGELOG=0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F 25 | 26 | if [[ "$TARGET" =~ 0x* ]]; then 27 | target=$TARGET 28 | else 29 | key=$(seth --to-bytes32 "$(seth --from-ascii "$TARGET")") 30 | target=$(seth call "$CHANGELOG" 'getAddress(bytes32)(address)' "$key") 31 | fi 32 | 33 | echo -e "Network: $(seth chain)" 34 | list=$(seth call "$CHANGELOG" 'list()(bytes32[])') 35 | IFS="," 36 | for key in $list 37 | do 38 | contractName=$(seth --to-ascii "$key" | tr -d '\0') 39 | contract=$(seth call "$CHANGELOG" 'getAddress(bytes32)(address)' "$key") 40 | [[ $(seth call "$target" 'wards(address)(uint256)' "$contract" 2>/dev/null) == "1" ]] && echo "$1 -> $contractName" 41 | [[ $(seth call "$contract" 'wards(address)(uint256)' "$target" 2>/dev/null) == "1" ]] && echo "$contractName -> $1" 42 | src=$(seth call "$contract" 'src()(address)' 2>/dev/null) || continue 43 | [[ $(seth call "$src" 'wards(address)(uint256)' "$target" 2>/dev/null) == "1" ]] && echo "$src (source of $contractName) -> $1" 44 | done 45 | -------------------------------------------------------------------------------- /scripts/wards.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$ETH_RPC_URL" ]] || { echo "Please set a ETH_RPC_URL"; exit 1; } 5 | 6 | [[ "$1" ]] || { echo "Please specify the Target Address (e.g. target=0xB966002DDAa2Baf48369f5015329750019736031) or ChainLog Key (e.g. target=MCD_VAT) to inspect"; exit 1; } 7 | 8 | for ARGUMENT in "$@" 9 | do 10 | KEY=$(echo "$ARGUMENT" | cut -f1 -d=) 11 | VALUE=$(echo "$ARGUMENT" | cut -f2 -d=) 12 | 13 | case "$KEY" in 14 | target) TARGET="$VALUE" ;; 15 | *) TARGET="$KEY" ;; 16 | esac 17 | done 18 | 19 | ### Override maxFeePerGas to avoid spikes 20 | baseFee=$(cast basefee) 21 | [[ -n "$ETH_GAS_PRICE" ]] && ethGasPriceLtBaseFee=$(echo "$ETH_GAS_PRICE < $baseFee" | bc) 22 | [[ "$ethGasPriceLtBaseFee" == 1 ]] && export "ETH_GAS_PRICE=$(echo "$baseFee * 3" | bc)" 23 | 24 | CHANGELOG=0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F 25 | 26 | if [[ "$TARGET" =~ 0x* ]]; then 27 | target=$TARGET 28 | else 29 | key=$(cast --to-bytes32 "$(cast --from-ascii "$TARGET")") 30 | target=$(cast call "$CHANGELOG" 'getAddress(bytes32)(address)' "$key") 31 | fi 32 | 33 | echo -e "Network: $(cast chain)" 34 | list=$(cast call "$CHANGELOG" 'list()(bytes32[])') # Get the list from the chainlog 35 | list=$(echo "$list" | sed 's/[][]//g') # Strip array brackets 36 | IFS="," 37 | for key in $list 38 | do 39 | contractName=$(cast --to-ascii "$key" | tr -d '\0') 40 | contract=$(cast call "$CHANGELOG" 'getAddress(bytes32)(address)' "$key") 41 | [[ $(cast call "$target" 'wards(address)(uint256)' "$contract" 2>/dev/null) == "1" ]] && echo "$1 -> $contractName" 42 | [[ $(cast call "$contract" 'wards(address)(uint256)' "$target" 2>/dev/null) == "1" ]] && echo "$contractName -> $1" 43 | src=$(cast call "$contract" 'src()(address)' 2>/dev/null) || continue 44 | [[ $(cast call "$src" 'wards(address)(uint256)' "$target" 2>/dev/null) == "1" ]] && echo "$src (source of $contractName) -> $1" 45 | done 46 | -------------------------------------------------------------------------------- /archive/2021-10-28-Add-Fabs-to-Changelog/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // Copyright (C) 2021 Dai Foundation 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.6.12; 18 | 19 | import "dss-exec-lib/DssExec.sol"; 20 | import "dss-exec-lib/DssAction.sol"; 21 | 22 | contract DssSpellAction is DssAction { 23 | 24 | // Provides a descriptive tag for bot consumption 25 | // This should be modified weekly to provide a summary of the actions 26 | // Hash: seth keccak -- "$(wget https://raw.githubusercontent.com/makerdao/community/TODO -q -O - 2>/dev/null)" 27 | string public constant override description = "Goerli Spell"; 28 | 29 | address constant JOIN_FAB = 0x0aaA1E0f026c194E0F951a7763F9edc796c6eDeE; 30 | address constant LERP_FAB = 0xE7988B75a19D8690272D65882Ab0D07D492f7002; 31 | 32 | function actions() public override { 33 | 34 | // Add Join factory to ChainLog 35 | DssExecLib.setChangelogAddress("JOIN_FAB", JOIN_FAB); 36 | 37 | // Update Lerp factory in ChainLog 38 | DssExecLib.setChangelogAddress("LERP_FAB", LERP_FAB); 39 | 40 | DssExecLib.setChangelogVersion("1.9.9"); 41 | } 42 | } 43 | 44 | contract DssSpell is DssExec { 45 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 46 | } 47 | -------------------------------------------------------------------------------- /scripts/get-arb-relay-cost.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$(cast chain --rpc-url="$ETH_RPC_URL")" == "goerli" ]] || { echo "Please set a Goerli ETH_RPC_URL"; exit 1; } 5 | 6 | ARBITRUM_GOERLI_RPC_URL='https://goerli-rollup.arbitrum.io/rpc' 7 | 8 | L2_SPELL='0x11dc6ed4c08da38b36709a6c8dbaac0eaedd48ca' 9 | CHANGELOG='0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F' 10 | NODE_INTERFACE='0x00000000000000000000000000000000000000C8' 11 | 12 | L1_GOV_RELAY=$( 13 | cast call "$CHANGELOG" "getAddress(bytes32)(address)" \ 14 | "$(cast --format-bytes32-string "ARBITRUM_GOV_RELAY")" 15 | ) 16 | L2_GOV_RELAY=$(cast call "$L1_GOV_RELAY" "l2GovernanceRelay()(address)") 17 | INBOX=$(cast call "$L1_GOV_RELAY" "inbox()(address)") 18 | BASE_FEE_SAFETY_FACTOR=20 # Factor by which L1 block.basefee could grow between now and the spell cast time 19 | 20 | ARB_GAS_PRICE_BID=$(cast gas-price --rpc-url "$ARBITRUM_GOERLI_RPC_URL") 21 | RELAY_CALLDATA=$( 22 | cast calldata "relay(address,bytes)" "$L2_SPELL" "$(cast calldata "execute()")" 23 | ) 24 | ARB_MAX_GAS=$( 25 | cast estimate --rpc-url "$ARBITRUM_GOERLI_RPC_URL" \ 26 | "$NODE_INTERFACE" \ 27 | "estimateRetryableTicket(address,uint256,address,uint256,address,address,bytes)" \ 28 | "$L1_GOV_RELAY" \ 29 | 1000000000000000000 \ 30 | "$L2_GOV_RELAY" \ 31 | 0 \ 32 | "$L2_GOV_RELAY" \ 33 | "$L2_GOV_RELAY" \ 34 | "$RELAY_CALLDATA" 35 | ) 36 | RELAY_CALLDATA_LEN=$(( $(echo -n "$RELAY_CALLDATA" | wc -c) / 2 - 1 )) 37 | SUBMISSION_FEE=$( 38 | cast call "$INBOX" \ 39 | "calculateRetryableSubmissionFee(uint256,uint256)(uint256)" \ 40 | "$RELAY_CALLDATA_LEN" \ 41 | 0 42 | ) 43 | ARB_MAX_SUBMISSION_COST=$((SUBMISSION_FEE * BASE_FEE_SAFETY_FACTOR)) 44 | ARB_L1_CALL_VALUE=$((ARB_MAX_GAS * ARB_GAS_PRICE_BID + ARB_MAX_SUBMISSION_COST)) 45 | 46 | echo "ARB_MAX_GAS = $ARB_MAX_GAS" 47 | echo "ARB_GAS_PRICE_BID = $ARB_GAS_PRICE_BID" 48 | echo "ARB_MAX_SUBMISSION_COST = $ARB_MAX_SUBMISSION_COST" 49 | echo "ARB_L1_CALL_VALUE = $ARB_L1_CALL_VALUE" 50 | -------------------------------------------------------------------------------- /archive/2022-02-17-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity 0.6.12; 19 | // Enable ABIEncoderV2 when onboarding collateral 20 | //pragma experimental ABIEncoderV2; 21 | 22 | import "dss-exec-lib/DssExec.sol"; 23 | import "dss-exec-lib/DssAction.sol"; 24 | 25 | import { DssSpellCollateralOnboardingAction } from "./Goerli-DssSpellCollateralOnboarding.sol"; 26 | 27 | contract DssSpellAction is DssAction, DssSpellCollateralOnboardingAction { 28 | // Provides a descriptive tag for bot consumption 29 | string public constant override description = "Goerli Spell"; 30 | 31 | // Turn office hours off 32 | function officeHours() public override returns (bool) { 33 | return false; 34 | } 35 | 36 | address constant public OAZO_ADDR = 0x0F1AE882272032D494926D5D983E4FBE253CB544; 37 | 38 | function actions() public override { 39 | DssExecLib.addReaderToWhitelist(DssExecLib.getChangelogAddress("PIP_ETH"), OAZO_ADDR); 40 | DssExecLib.addReaderToWhitelist(DssExecLib.getChangelogAddress("PIP_WBTC"), OAZO_ADDR); 41 | DssExecLib.addReaderToWhitelist(DssExecLib.getChangelogAddress("PIP_WSTETH"), OAZO_ADDR); 42 | } 43 | } 44 | 45 | contract DssSpell is DssExec { 46 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 47 | } 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **:warning: THIS REPO IS NOW CONSIDERED DEPRECATED! :warning:** 2 | 3 | Read more about it in this [post](https://forum.makerdao.com/t/public-announcement-goerli-testnet-deprecation-and-upcoming-changes/23962). 4 | 5 | # spells-goerli 6 | 7 | ![Build Status](https://github.com/makerdao/spells-goerli/actions/workflows/.github/workflows/tests.yaml/badge.svg?branch=master) 8 | 9 | Staging repo for MakerDAO's Goerli executive spells. 10 | 11 | ## Instructions 12 | 13 | ### Getting Started 14 | 15 | ```bash 16 | $ git clone git@github.com:makerdao/spells-goerli.git 17 | $ dapp update 18 | ``` 19 | 20 | ### Build 21 | 22 | ```bash 23 | $ make 24 | ``` 25 | 26 | ### Test (DappTools without Optimizations) 27 | 28 | Set `ETH_RPC_URL` to a Goerli node. 29 | 30 | ```bash 31 | $ export ETH_RPC_URL= 32 | $ make test 33 | ``` 34 | 35 | ### Test (Forge without Optimizations) 36 | 37 | #### Prerequisites 38 | 1. [Install](https://www.rust-lang.org/tools/install) Rust. 39 | 2. [Install](https://github.com/gakonst/foundry#forge) Forge. 40 | 41 | #### Operation 42 | Set `ETH_RPC_URL` to a Goerli node. 43 | 44 | ```bash 45 | $ export ETH_RPC_URL= 46 | $ make test-forge 47 | ``` 48 | 49 | ### Deploy 50 | 51 | Set `ETH_RPC_URL` to a Goerli node and ensure `ETH_GAS_LIMIT` is set to a high enough number to deploy the contract. 52 | 53 | ```bash 54 | $ export ETH_RPC_URL= 55 | $ export ETH_GAS_LIMIT=8000000 56 | $ export ETH_GAS_PRICE=$(seth --to-wei 3 "gwei") 57 | $ make deploy 58 | ``` 59 | 60 | ### Cast to tenderly 61 | 62 | 1. Create Tenderly account (no trial period needed atm) https://dashboard.tenderly.co/register 63 | - Note down `TENDERLY_USER` and `TENDERLY_PROJECT` values 64 | 2. Create Tenderly access token https://dashboard.tenderly.co/account/authorization 65 | - Note down `TENDERLY_ACCESS_KEY` values 66 | 3. Export env vars specified above or create `scripts/cast-on-tenderly/.env` file with them 67 | 4. Execute `make cast-on-tenderly spell=0x...`, with the address of the spell that hasn't been casted yet 68 | - The execution should finish with `successfully casted` 69 | 5. Open the `publicly sharable transaction url` printed into the console (it should require no credentials) 70 | -------------------------------------------------------------------------------- /archive/2023-04-07-DssSpell/DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2020 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | import "dss-exec-lib/DssExec.sol"; 20 | import "dss-exec-lib/DssAction.sol"; 21 | 22 | contract DssSpellAction is DssAction { 23 | // Provides a descriptive tag for bot consumption 24 | string public constant override description = "Goerli Spell"; 25 | 26 | // Turn office hours off 27 | function officeHours() public pure override returns (bool) { 28 | return false; 29 | } 30 | 31 | // Many of the settings that change weekly rely on the rate accumulator 32 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 33 | // To check this yourself, use the following rate calculation (example 8%): 34 | // 35 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 36 | // 37 | // A table of rates can be found at 38 | // https://ipfs.io/ipfs/QmVp4mhhbwWGTfbh2BzwQB9eiBrQBKiqcPRZCaAxNUaar6 39 | // 40 | // uint256 internal constant X_PCT_RATE = ; 41 | 42 | address immutable internal ESM = DssExecLib.getChangelogAddress("MCD_ESM"); 43 | address immutable internal RWA_LIQ_ORACLE = DssExecLib.getChangelogAddress("MIP21_LIQUIDATION_ORACLE"); 44 | 45 | function actions() public override { 46 | 47 | // ----- Additional ESM authorization fix ----- 48 | DssExecLib.authorize(RWA_LIQ_ORACLE, ESM); 49 | } 50 | } 51 | 52 | contract DssSpell is DssExec { 53 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) {} 54 | } 55 | -------------------------------------------------------------------------------- /archive/2022-11-12-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2020 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.6.12; 18 | // Enable ABIEncoderV2 when onboarding collateral through `DssExecLib.addNewCollateral()` 19 | // pragma experimental ABIEncoderV2; 20 | 21 | import "dss-exec-lib/DssExec.sol"; 22 | import "dss-exec-lib/DssAction.sol"; 23 | 24 | import { DssSpellCollateralAction } from "./Goerli-DssSpellCollateral.sol"; 25 | 26 | contract DssSpellAction is DssAction, DssSpellCollateralAction { 27 | // Provides a descriptive tag for bot consumption 28 | string public constant override description = "Goerli Spell"; 29 | 30 | // Turn office hours off 31 | function officeHours() public override returns (bool) { 32 | return false; 33 | } 34 | 35 | // Many of the settings that change weekly rely on the rate accumulator 36 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 37 | // To check this yourself, use the following rate calculation (example 8%): 38 | // 39 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 40 | // 41 | // A table of rates can be found at 42 | // https://ipfs.io/ipfs/QmVp4mhhbwWGTfbh2BzwQB9eiBrQBKiqcPRZCaAxNUaar6 43 | // 44 | 45 | // --- Rates --- 46 | 47 | // --- Math --- 48 | 49 | function actions() public override { 50 | // Includes changes from the DssSpellCollateralAction 51 | collateralAction(); 52 | } 53 | } 54 | 55 | contract DssSpell is DssExec { 56 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 57 | } 58 | -------------------------------------------------------------------------------- /scripts/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | trap 'git stash pop' EXIT 4 | 5 | # Colors 6 | YELLOW="\033[0;33m" 7 | PURPLE="\033[0;35m" 8 | NC="\033[0m" 9 | 10 | # stash any changes in the staging area 11 | echo -e "${YELLOW}Stashing any changes to${NC} ${PURPLE}src/test/config.sol${NC}" 12 | (set -x; git stash push src/test/config.sol) 13 | 14 | [[ "$(cast chain --rpc-url="$ETH_RPC_URL")" == "goerli" ]] || { echo -e "${YELLOW}Please set a ${NC}${PURPLE}Goerli ETH_RPC_URL${NC}"; exit 1; } 15 | [[ "$ETHERSCAN_API_KEY" ]] || { echo -e "${YELLOW}Please set ${NC}${PURPLE}ETHERSCAN_API_KEY${NC}"; exit 1; } 16 | 17 | SOURCE="src/test/config.sol" 18 | KEY_SPELL="deployed_spell" 19 | KEY_TIMESTAMP="deployed_spell_created" 20 | KEY_BLOCK="deployed_spell_block" 21 | 22 | make && spell_address=$(dapp create DssSpell) 23 | 24 | ./scripts/verify.py DssSpell "$spell_address" 25 | 26 | # edit config.sol to add the deployed spell address 27 | sed -Ei "s/($KEY_SPELL: *address\()(0x[[:xdigit:]]{40}|0x0|0)\)/\1$spell_address)/" "$SOURCE" 28 | 29 | # get tx hash from contract address, created using an internal transaction 30 | TXHASH=$(curl "https://api-goerli.etherscan.io/api?module=account&action=txlistinternal&address=$spell_address&startblock=0&endblock=99999999&sort=asc&apikey=$ETHERSCAN_API_KEY" | jq -r ".result[0].hash") 31 | 32 | # get deployed contract timestamp and block number info 33 | timestamp=$(cast block "$(cast tx "${TXHASH}"|grep blockNumber|awk '{print $2}')"|grep timestamp|awk '{print $2}') 34 | block=$(cast tx "${TXHASH}"|grep blockNumber|awk '{print $2}') 35 | 36 | # edit config.sol to add the deployed spell timestamp and block number 37 | sed -i "s/\($KEY_TIMESTAMP *: *\)[0-9]\+/\1$timestamp/" "$SOURCE" 38 | sed -i "s/\($KEY_BLOCK *: *\)[0-9]\+/\1$block/" "$SOURCE" 39 | 40 | echo -e "${YELLOW}Network: $(cast chain)${NC}" 41 | echo -e "${YELLOW}config.sol updated with ${PURPLE}deployed spell:${NC} $spell_address, ${PURPLE}timestamp:${NC} $timestamp and ${PURPLE}block:${NC} $block ${NC}" 42 | 43 | make test block="$block" || { echo -e "${PURPLE}Ensure Tests PASS before commiting the config.sol changes${NC}"; exit 1; } 44 | 45 | # commit edit change to config.sol 46 | if [[ $(git status --porcelain src/test/config.sol) ]]; then 47 | (set -x; git commit -m "add deployed spell info" -- src/test/config.sol) 48 | else 49 | echo -e "${PURPLE}Ensure config.sol was edited correctly${NC}" 50 | exit 1 51 | fi 52 | -------------------------------------------------------------------------------- /archive/2022-04-01-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity 0.6.12; 19 | // Enable ABIEncoderV2 when onboarding collateral 20 | //pragma experimental ABIEncoderV2; 21 | import "dss-exec-lib/DssExec.sol"; 22 | import "dss-exec-lib/DssAction.sol"; 23 | 24 | import { DssSpellCollateralOnboardingAction } from "./Goerli-DssSpellCollateralOnboarding.sol"; 25 | 26 | 27 | contract DssSpellAction is DssAction, DssSpellCollateralOnboardingAction { 28 | // Provides a descriptive tag for bot consumption 29 | string public constant override description = "Goerli Spell"; 30 | 31 | // Turn office hours off 32 | function officeHours() public override returns (bool) { 33 | return false; 34 | } 35 | 36 | address constant public OAZO_ADDR = 0xb0724B07883DF9e9276a77CD73acd00FE5F86F55; 37 | address constant public OAZO_OLD_ADDR = 0x0F1AE882272032D494926D5D983E4FBE253CB544; 38 | 39 | function actions() public override { 40 | DssExecLib.removeReaderFromWhitelist(DssExecLib.getChangelogAddress("PIP_ETH"), OAZO_OLD_ADDR); 41 | DssExecLib.removeReaderFromWhitelist(DssExecLib.getChangelogAddress("PIP_WBTC"), OAZO_OLD_ADDR); 42 | DssExecLib.removeReaderFromWhitelist(DssExecLib.getChangelogAddress("PIP_WSTETH"), OAZO_OLD_ADDR); 43 | 44 | DssExecLib.addReaderToWhitelist(DssExecLib.getChangelogAddress("PIP_ETH"), OAZO_ADDR); 45 | DssExecLib.addReaderToWhitelist(DssExecLib.getChangelogAddress("PIP_WBTC"), OAZO_ADDR); 46 | DssExecLib.addReaderToWhitelist(DssExecLib.getChangelogAddress("PIP_WSTETH"), OAZO_ADDR); 47 | } 48 | } 49 | 50 | contract DssSpell is DssExec { 51 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 52 | } 53 | -------------------------------------------------------------------------------- /archive/2022-08-30-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 25 | address public constant ORACLES = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | 27 | // Known Team Deployers 28 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 29 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 30 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 31 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 32 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 33 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 34 | address public constant CES = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 35 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 36 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 37 | 38 | constructor() public { 39 | addr = [ 40 | PE_01, 41 | PE_02, 42 | PE_03, 43 | PE_04, 44 | PE_05, 45 | PE_06, 46 | PE_CURRENT, 47 | ORACLES, 48 | STARKNET_01, 49 | STARKNET_02, 50 | CES 51 | ]; 52 | } 53 | 54 | function count() external view returns (uint256) { 55 | return addr.length; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /archive/2022-09-05-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 25 | address public constant ORACLES = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | 27 | // Known Team Deployers 28 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 29 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 30 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 31 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 32 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 33 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 34 | address public constant CES = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 35 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 36 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 37 | 38 | constructor() public { 39 | addr = [ 40 | PE_01, 41 | PE_02, 42 | PE_03, 43 | PE_04, 44 | PE_05, 45 | PE_06, 46 | PE_CURRENT, 47 | ORACLES, 48 | STARKNET_01, 49 | STARKNET_02, 50 | CES 51 | ]; 52 | } 53 | 54 | function count() external view returns (uint256) { 55 | return addr.length; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /archive/2022-09-12-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 25 | address public constant ORACLES = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | 27 | // Known Team Deployers 28 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 29 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 30 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 31 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 32 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 33 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 34 | address public constant CES = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 35 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 36 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 37 | 38 | constructor() public { 39 | addr = [ 40 | PE_01, 41 | PE_02, 42 | PE_03, 43 | PE_04, 44 | PE_05, 45 | PE_06, 46 | PE_CURRENT, 47 | ORACLES, 48 | STARKNET_01, 49 | STARKNET_02, 50 | CES 51 | ]; 52 | } 53 | 54 | function count() external view returns (uint256) { 55 | return addr.length; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /archive/2022-09-26-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 25 | address public constant ORACLES = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | 27 | // Known Team Deployers 28 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 29 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 30 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 31 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 32 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 33 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 34 | address public constant CES = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 35 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 36 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 37 | 38 | constructor() public { 39 | addr = [ 40 | PE_01, 41 | PE_02, 42 | PE_03, 43 | PE_04, 44 | PE_05, 45 | PE_06, 46 | PE_CURRENT, 47 | ORACLES, 48 | STARKNET_01, 49 | STARKNET_02, 50 | CES 51 | ]; 52 | } 53 | 54 | function count() external view returns (uint256) { 55 | return addr.length; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /archive/2022-06-27-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021-2022 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // Copyright (C) 2021-2022 Dai Foundation 5 | // 6 | // This program is free software: you can redistribute it and/or modify 7 | // it under the terms of the GNU Affero General Public License as published by 8 | // the Free Software Foundation, either version 3 of the License, or 9 | // (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU Affero General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Affero General Public License 17 | // along with this program. If not, see . 18 | 19 | pragma solidity 0.6.12; 20 | 21 | // Enable ABIEncoderV2 when onboarding collateral 22 | // pragma experimental ABIEncoderV2; 23 | import "dss-exec-lib/DssExec.sol"; 24 | import "dss-exec-lib/DssAction.sol"; 25 | 26 | import { DssSpellCollateralAction } from "./Goerli-DssSpellCollateral.sol"; 27 | 28 | contract DssSpellAction is DssAction, DssSpellCollateralAction { 29 | 30 | // Provides a descriptive tag for bot consumption 31 | string public constant override description = "Goerli Spell"; 32 | 33 | // Many of the settings that change weekly rely on the rate accumulator 34 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 35 | // To check this yourself, use the following rate calculation (example 8%): 36 | // 37 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 38 | // 39 | // A table of rates can be found at 40 | // https://ipfs.io/ipfs/QmPgPVrVxDCGyNR5rGp9JC5AUxppLzUAqvncRJDcxQnX1u 41 | // 42 | 43 | function actions() public override { 44 | // --------------------------------------------------------------------- 45 | // Includes changes from the DssSpellCollateralOnboardingAction 46 | // onboardNewCollaterals(); 47 | offboardCollaterals(); 48 | 49 | // Housekeeping - add Starknet core contract to Chainlog 50 | DssExecLib.setChangelogAddress("STARKNET_CORE", 0xde29d060D45901Fb19ED6C6e959EB22d8626708e); 51 | DssExecLib.setChangelogVersion("1.13.2"); 52 | } 53 | } 54 | 55 | contract DssSpell is DssExec { 56 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 57 | } 58 | -------------------------------------------------------------------------------- /archive/2022-03-09-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity 0.6.12; 19 | // Enable ABIEncoderV2 when onboarding collateral 20 | //pragma experimental ABIEncoderV2; 21 | import "dss-exec-lib/DssExec.sol"; 22 | import "dss-exec-lib/DssAction.sol"; 23 | 24 | import { DssSpellCollateralOnboardingAction } from "./Goerli-DssSpellCollateralOnboarding.sol"; 25 | 26 | interface FlashKillerLike { 27 | function vat() external view returns (address); 28 | function flash() external view returns (address); 29 | } 30 | 31 | contract DssSpellAction is DssAction, DssSpellCollateralOnboardingAction { 32 | // Provides a descriptive tag for bot consumption 33 | string public constant override description = "Goerli Spell"; 34 | 35 | address constant FLASH_KILLER = 0xa95FaD7948079df3c579DDb0752E39dC29Eb1AFf; 36 | 37 | // Turn office hours off 38 | function officeHours() public override returns (bool) { 39 | return false; 40 | } 41 | 42 | function actions() public override { 43 | require(FlashKillerLike(FLASH_KILLER).vat() == DssExecLib.vat(), "DssSpell/non-matching-vat"); 44 | address flash = DssExecLib.getChangelogAddress("MCD_FLASH"); 45 | require(FlashKillerLike(FLASH_KILLER).flash() == flash, "DssSpell/non-matching-flash"); 46 | DssExecLib.authorize(flash, FLASH_KILLER); 47 | DssExecLib.setChangelogAddress("FLASH_KILLER", FLASH_KILLER); 48 | // This spell should actually be 1.10.1. However the prev spell bumped to that version (which should have been 1.11.0). 49 | // Then now we are going to bump to it (simulating order that is happenning on mainnet) 50 | DssExecLib.setChangelogVersion("1.11.0"); 51 | } 52 | } 53 | 54 | contract DssSpell is DssExec { 55 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 56 | } 57 | -------------------------------------------------------------------------------- /archive/2021-10-01-Offboard-USDT/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // Copyright (C) 2021 Dai Foundation 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.6.12; 18 | 19 | import "dss-exec-lib/DssExec.sol"; 20 | import "dss-exec-lib/DssAction.sol"; 21 | 22 | // interface DssVestLike { 23 | // function create(address, uint256, uint256, uint256, uint256, address) external returns (uint256); 24 | // function restrict(uint256) external; 25 | // } 26 | 27 | contract DssSpellAction is DssAction { 28 | 29 | // Provides a descriptive tag for bot consumption 30 | // This should be modified weekly to provide a summary of the actions 31 | // Hash: seth keccak -- "$(wget https://raw.githubusercontent.com/makerdao/community/TODO -q -O - 2>/dev/null)" 32 | string public constant override description = "Goerli Spell"; 33 | 34 | // Turn on office hours 35 | function officeHours() public override returns (bool) { 36 | return true; 37 | } 38 | 39 | function actions() public override { 40 | address MCD_CLIP_USDT_A = DssExecLib.getChangelogAddress("MCD_CLIP_USDT_A"); 41 | 42 | // Offboard USDT-A 43 | // https://vote.makerdao.com/polling/QmRNwrTy?network=mainnet#vote-breakdown 44 | 45 | // 15 thousand DAI maximum liquidation amount 46 | DssExecLib.setIlkMaxLiquidationAmount("USDT-A", 15_000); 47 | 48 | // flip breaker to enable liquidations 49 | DssExecLib.setValue(MCD_CLIP_USDT_A, "stopped", 0); 50 | 51 | // authorize breaker 52 | DssExecLib.authorize(MCD_CLIP_USDT_A, DssExecLib.clipperMom()); 53 | 54 | // set liquidation ratio to 300% 55 | DssExecLib.setIlkLiquidationRatio("USDT-A", 30000); 56 | 57 | // remove liquidation penalty 58 | DssExecLib.setIlkLiquidationPenalty("USDT-A", 0); 59 | } 60 | } 61 | 62 | contract DssSpell is DssExec { 63 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 64 | } 65 | -------------------------------------------------------------------------------- /archive/2022-10-19-DssSpell/Goerli-DssSpellCollateral.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2022 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.6.12; 18 | 19 | import "dss-exec-lib/DssExecLib.sol"; 20 | 21 | contract DssSpellCollateralAction { 22 | 23 | // --- Rates --- 24 | // Many of the settings that change weekly rely on the rate accumulator 25 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 26 | // To check this yourself, use the following rate calculation (example 8%): 27 | // 28 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 29 | // 30 | // A table of rates can be found at 31 | // https://ipfs.io/ipfs/QmVp4mhhbwWGTfbh2BzwQB9eiBrQBKiqcPRZCaAxNUaar6 32 | // 33 | 34 | // --- Math --- 35 | uint256 constant MILLION = 10 ** 6; 36 | 37 | bytes32 constant RWA007_A = "RWA007-A"; 38 | uint256 constant RWA007_A_AUTOLINE_AMOUNT = 250 * MILLION; 39 | uint256 constant RWA007_A_AUTOLINE_GAP = 50 * MILLION; 40 | uint256 constant RWA007_A_AUTOLINE_TTL = 1 weeks; 41 | 42 | 43 | function onboardCollaterals() internal { 44 | // ----------------------------- Collateral onboarding ----------------------------- 45 | } 46 | 47 | function offboardCollaterals() internal { 48 | // ----------------------------- Collateral offboarding ----------------------------- 49 | } 50 | 51 | function updateCollaterals() internal { 52 | // ------------------------------- Collateral updates ------------------------------- 53 | 54 | // Enable autoline for MIP65 55 | // https://forum.makerdao.com/t/rwa007-mip65-monetalis-clydesdale-ces-domain-team-assessment/17787 56 | DssExecLib.setIlkAutoLineParameters( 57 | RWA007_A, 58 | RWA007_A_AUTOLINE_AMOUNT, 59 | RWA007_A_AUTOLINE_GAP, 60 | RWA007_A_AUTOLINE_TTL 61 | ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /archive/2022-10-04-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 25 | address public constant ORACLES = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | 27 | // Known Team Deployers 28 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 29 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 30 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 31 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 32 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 33 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 34 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 35 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 36 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 37 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 38 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 39 | 40 | constructor() public { 41 | addr = [ 42 | PE_01, 43 | PE_02, 44 | PE_03, 45 | PE_04, 46 | PE_05, 47 | PE_06, 48 | PE_CURRENT, 49 | ORACLES, 50 | STARKNET_01, 51 | STARKNET_02, 52 | CES_01, 53 | CES_02, 54 | CES_03 55 | ]; 56 | } 57 | 58 | function count() external view returns (uint256) { 59 | return addr.length; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /archive/2022-10-04-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2020 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.6.12; 18 | // Enable ABIEncoderV2 when onboarding collateral through `DssExecLib.addNewCollateral()` 19 | // pragma experimental ABIEncoderV2; 20 | 21 | import "dss-exec-lib/DssExec.sol"; 22 | import "dss-exec-lib/DssAction.sol"; 23 | 24 | import { DssSpellCollateralAction } from "./Goerli-DssSpellCollateral.sol"; 25 | 26 | interface GemLike { 27 | function approve(address, uint256) external returns (bool); 28 | } 29 | 30 | interface RwaUrnLike { 31 | function lock(uint256) external; 32 | } 33 | 34 | contract DssSpellAction is DssAction, DssSpellCollateralAction { 35 | 36 | // Provides a descriptive tag for bot consumption 37 | string public constant override description = "Goerli Spell"; 38 | 39 | // Many of the settings that change weekly rely on the rate accumulator 40 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 41 | // To check this yourself, use the following rate calculation (example 8%): 42 | // 43 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 44 | // 45 | // A table of rates can be found at 46 | // https://ipfs.io/ipfs/QmVp4mhhbwWGTfbh2BzwQB9eiBrQBKiqcPRZCaAxNUaar6 47 | // 48 | 49 | function officeHours() public override returns (bool) { 50 | return false; 51 | } 52 | 53 | function actions() public override { 54 | // --------------------------------------------------------------------- 55 | // Includes changes from the DssSpellCollateralAction 56 | onboardNewCollaterals(); 57 | 58 | // lock RWA007 Token in the URN 59 | GemLike(RWA007).approve(RWA007_A_URN, 1 * WAD); 60 | RwaUrnLike(RWA007_A_URN).lock(1 * WAD); 61 | 62 | DssExecLib.setChangelogVersion("1.14.2"); 63 | } 64 | } 65 | 66 | contract DssSpell is DssExec { 67 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 68 | } 69 | -------------------------------------------------------------------------------- /archive/2022-03-11-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity 0.6.12; 19 | // Enable ABIEncoderV2 when onboarding collateral 20 | //pragma experimental ABIEncoderV2; 21 | 22 | import "dss-exec-lib/DssExec.sol"; 23 | import "dss-exec-lib/DssAction.sol"; 24 | import "dss-interfaces/dss/FlapAbstract.sol"; 25 | import "dss-interfaces/dss/ChainlogAbstract.sol"; 26 | 27 | import { DssSpellCollateralOnboardingAction } from "./Goerli-DssSpellCollateralOnboarding.sol"; 28 | 29 | contract DssSpellAction is DssAction, DssSpellCollateralOnboardingAction { 30 | // Provides a descriptive tag for bot consumption 31 | string public constant override description = "Goerli Spell"; 32 | 33 | uint256 constant RAD = 10**45; 34 | 35 | address constant MCD_FLAP = 0x015bEd3a7EBbB0Be03A35E0572E8a7B0BA2AA0fB; 36 | 37 | // Turn office hours off 38 | function officeHours() public override returns (bool) { 39 | return false; 40 | } 41 | 42 | function actions() public override { 43 | // Replace Flapper with rate limit one 44 | // https://vote.makerdao.com/polling/Qmdd4Pg7 45 | address MCD_VOW = DssExecLib.vow(); 46 | address MCD_FLAP_OLD = DssExecLib.flap(); 47 | DssExecLib.setValue(MCD_FLAP, "beg", FlapAbstract(MCD_FLAP_OLD).beg()); 48 | DssExecLib.setValue(MCD_FLAP, "ttl", FlapAbstract(MCD_FLAP_OLD).ttl()); 49 | DssExecLib.setValue(MCD_FLAP, "tau", FlapAbstract(MCD_FLAP_OLD).tau()); 50 | DssExecLib.setValue(MCD_FLAP, "lid", 150_000 * RAD); 51 | DssExecLib.deauthorize(MCD_FLAP_OLD, MCD_VOW); 52 | DssExecLib.authorize(MCD_FLAP, MCD_VOW); 53 | DssExecLib.setContract(MCD_VOW, "flapper", MCD_FLAP); 54 | 55 | // Changelog updates 56 | DssExecLib.setChangelogAddress("MCD_FLAP", MCD_FLAP); 57 | DssExecLib.setChangelogVersion("1.10.1"); 58 | } 59 | } 60 | 61 | contract DssSpell is DssExec { 62 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 63 | } 64 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/scripts/cast-dssspell.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$(seth chain --rpc-url="$ETH_RPC_URL")" == "goerli" ]] || { echo "Please set a Goerli ETH_RPC_URL"; exit 1; } 5 | 6 | ### ChainLog 7 | CHANGELOG=0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F 8 | MCD_ADM=$(seth call "$CHANGELOG" 'getAddress(bytes32)(address)' "$(seth --to-bytes32 "$(seth --from-ascii "MCD_ADM")")") 9 | MCD_GOV=$(seth call "$CHANGELOG" 'getAddress(bytes32)(address)' "$(seth --to-bytes32 "$(seth --from-ascii "MCD_GOV")")") 10 | MCD_IOU=$(seth call "$CHANGELOG" 'getAddress(bytes32)(address)' "$(seth --to-bytes32 "$(seth --from-ascii "MCD_IOU")")") 11 | 12 | ### Data 13 | DESIRED_HAT_APPROVALS=$(seth --to-wei 100000 ETH) 14 | hat=$(seth call "$MCD_ADM" 'hat()(address)') 15 | approvals=$(seth call "$MCD_ADM" 'approvals(address)(uint256)' "$hat") 16 | deposits=$(seth call "$MCD_ADM" 'deposits(address)(uint256)' "$ETH_FROM") 17 | 18 | ETH_NONCE=$(seth nonce "$ETH_FROM") 19 | 20 | sethSend() { 21 | set -e 22 | echo "seth send $*" 23 | ETH_GAS=$(seth estimate "$@") 24 | ETH_GAS=$((ETH_GAS * 2)) 25 | ETH_NONCE="$ETH_NONCE" ETH_GAS="$ETH_GAS" seth send "$@" 26 | ETH_NONCE=$((ETH_NONCE + 1)) 27 | echo "" 28 | } 29 | 30 | if [[ -z "$1" ]]; 31 | then 32 | echo "Please specify the Goerli Spell Address" 33 | else 34 | target=$DESIRED_HAT_APPROVALS 35 | if [[ "$(echo "$approvals + 1 >= $target" | bc)" == 1 ]]; then 36 | target=$(echo "$approvals + 1" | bc) 37 | fi 38 | 39 | if [[ "$(echo "$deposits < $target" | bc)" == 1 ]]; then 40 | lockAmt=$(echo "$target - $deposits" | bc) 41 | [[ "$(echo "$(seth call "$MCD_GOV" 'balanceOf(address)(uint256)' "$ETH_FROM") >= $lockAmt" | bc)" == 1 ]] || { echo "$ETH_FROM: Insufficient MKR Balance"; exit 1; } 42 | 43 | sethSend "$MCD_GOV" 'approve(address,uint256)' "$MCD_ADM" "$lockAmt" 44 | sethSend "$MCD_ADM" 'lock(uint256)' "$lockAmt" 45 | 46 | deposits=$(seth call "$MCD_ADM" 'deposits(address)(uint256)' "$ETH_FROM") 47 | fi 48 | 49 | sethSend "$MCD_ADM" 'vote(address[] memory)' ["$1"] 50 | sethSend "$MCD_ADM" 'lift(address)' "$1" 51 | 52 | sethSend "$1" 'schedule()' 53 | 54 | echo "waiting for two minutes before casting…" 55 | sleep 120 56 | 57 | sethSend "$1" 'cast()' 58 | 59 | if [[ "$(echo "$deposits > $DESIRED_HAT_APPROVALS" | bc)" == 1 ]]; then 60 | freeAmt=$(echo "$deposits - $DESIRED_HAT_APPROVALS" | bc) 61 | [[ "$(echo "$(seth call "$MCD_IOU" 'balanceOf(address)(uint256)' "$ETH_FROM") >= $freeAmt" | bc)" == 1 ]] || { echo "$ETH_FROM: Insufficient IOU Balance"; exit 1; } 62 | sethSend "$MCD_IOU" 'approve(address,uint256)' "$MCD_ADM" "$freeAmt" 63 | sethSend "$MCD_ADM" 'free(uint256)' "$freeAmt" 64 | fi 65 | 66 | echo "Goerli Spell Cast: https://goerli.etherscan.io/address/$1" 67 | fi 68 | -------------------------------------------------------------------------------- /archive/2022-10-12-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | 27 | // Known Team Deployers 28 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 29 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 30 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 31 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 32 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 33 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 34 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 35 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 36 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 37 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 38 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 39 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 40 | 41 | constructor() public { 42 | addr = [ 43 | PE_01, 44 | PE_02, 45 | PE_03, 46 | PE_04, 47 | PE_05, 48 | PE_06, 49 | PE_CURRENT, 50 | ORACLES, 51 | STARKNET_01, 52 | STARKNET_02, 53 | CES_01, 54 | CES_02, 55 | CES_03 56 | ]; 57 | } 58 | 59 | function count() external view returns (uint256) { 60 | return addr.length; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /archive/2022-10-19-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | 27 | // Known Team Deployers 28 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 29 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 30 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 31 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 32 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 33 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 34 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 35 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 36 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 37 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 38 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 39 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 40 | 41 | constructor() public { 42 | addr = [ 43 | PE_01, 44 | PE_02, 45 | PE_03, 46 | PE_04, 47 | PE_05, 48 | PE_06, 49 | PE_CURRENT, 50 | ORACLES, 51 | STARKNET_01, 52 | STARKNET_02, 53 | CES_01, 54 | CES_02, 55 | CES_03 56 | ]; 57 | } 58 | 59 | function count() external view returns (uint256) { 60 | return addr.length; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /scripts/cast-dssspell.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [[ "$(cast chain --rpc-url="$ETH_RPC_URL")" == "goerli" ]] || { echo "Please set a Goerli ETH_RPC_URL"; exit 1; } 5 | 6 | ### ChainLog 7 | CHANGELOG=0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F 8 | MCD_ADM=$(cast call "$CHANGELOG" 'getAddress(bytes32)(address)' "$(cast --to-bytes32 "$(cast --from-ascii "MCD_ADM")")") 9 | MCD_GOV=$(cast call "$CHANGELOG" 'getAddress(bytes32)(address)' "$(cast --to-bytes32 "$(cast --from-ascii "MCD_GOV")")") 10 | MCD_IOU=$(cast call "$CHANGELOG" 'getAddress(bytes32)(address)' "$(cast --to-bytes32 "$(cast --from-ascii "MCD_IOU")")") 11 | 12 | ### Data 13 | DESIRED_HAT_APPROVALS=$(cast --to-wei 100000 ETH) 14 | hat=$(cast call "$MCD_ADM" 'hat()(address)') 15 | approvals=$(cast call "$MCD_ADM" 'approvals(address)' "$hat" | cast --to-dec) 16 | deposits=$(cast call "$MCD_ADM" 'deposits(address)' "$ETH_FROM" | cast --to-dec) 17 | 18 | ETH_NONCE=$(cast nonce "$ETH_FROM") 19 | 20 | castSend() { 21 | set -e 22 | echo "cast send $*" 23 | ETH_GAS_LIMIT=$(cast estimate "$@") 24 | ETH_GAS_LIMIT=$((ETH_GAS_LIMIT * 2)) 25 | echo "Sending with $ETH_GAS_LIMIT gas." 26 | ETH_NONCE="$ETH_NONCE" ETH_GAS_LIMIT="$ETH_GAS_LIMIT" cast send "$@" 27 | ETH_NONCE=$((ETH_NONCE + 1)) 28 | echo "" 29 | } 30 | 31 | if [[ -z "$1" ]]; 32 | then 33 | echo "Please specify the Goerli Spell Address" 34 | else 35 | target=$DESIRED_HAT_APPROVALS 36 | if [[ "$(echo "$approvals + 1 >= $target" | bc)" == 1 ]]; then 37 | target=$(echo "$approvals + 1" | bc) 38 | fi 39 | 40 | if [[ "$(echo "$deposits < $target" | bc)" == 1 ]]; then 41 | lockAmt=$(echo "$target - $deposits" | bc) 42 | [[ "$(echo "$(cast call "$MCD_GOV" 'balanceOf(address)' "$ETH_FROM" | cast --to-dec) >= $lockAmt" | bc)" == 1 ]] || { echo "$ETH_FROM: Insufficient MKR Balance"; exit 1; } 43 | 44 | castSend "$MCD_GOV" 'approve(address,uint256)' "$MCD_ADM" "$lockAmt" 45 | castSend "$MCD_ADM" 'lock(uint256)' "$lockAmt" 46 | 47 | deposits=$(cast call "$MCD_ADM" 'deposits(address)' "$ETH_FROM" | cast --to-dec) 48 | fi 49 | 50 | castSend "$MCD_ADM" 'vote(address[] memory)' ["$1"] 51 | castSend "$MCD_ADM" 'lift(address)' "$1" 52 | 53 | castSend "$1" 'schedule()' 54 | 55 | echo "waiting for two minutes before casting…" 56 | sleep 120 57 | 58 | castSend "$1" 'cast()' 59 | 60 | if [[ "$(echo "$deposits > $DESIRED_HAT_APPROVALS" | bc)" == 1 ]]; then 61 | freeAmt=$(echo "$deposits - $DESIRED_HAT_APPROVALS" | bc) 62 | [[ "$(echo "$(cast call "$MCD_IOU" 'balanceOf(address)' "$ETH_FROM" | cast --to-dec) >= $freeAmt" | bc)" == 1 ]] || { echo "$ETH_FROM: Insufficient IOU Balance"; exit 1; } 63 | castSend "$MCD_IOU" 'approve(address,uint256)' "$MCD_ADM" "$freeAmt" 64 | castSend "$MCD_ADM" 'free(uint256)' "$freeAmt" 65 | fi 66 | 67 | echo "Goerli Spell Cast: https://goerli.etherscan.io/address/$1" 68 | fi 69 | -------------------------------------------------------------------------------- /archive/2022-05-08-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity 0.6.12; 19 | 20 | // Enable ABIEncoderV2 when onboarding collateral 21 | pragma experimental ABIEncoderV2; 22 | import "dss-exec-lib/DssExec.sol"; 23 | import "dss-exec-lib/DssAction.sol"; 24 | 25 | import { DssSpellCollateralOnboardingAction } from "./Goerli-DssSpellCollateralOnboarding.sol"; 26 | 27 | contract DssSpellAction is DssAction, DssSpellCollateralOnboardingAction { 28 | 29 | // Provides a descriptive tag for bot consumption 30 | string public constant override description = "Goerli Spell"; 31 | 32 | // Math 33 | 34 | // Many of the settings that change weekly rely on the rate accumulator 35 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 36 | // To check this yourself, use the following rate calculation (example 8%): 37 | // 38 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 39 | // 40 | // A table of rates can be found at 41 | // https://ipfs.io/ipfs/QmPgPVrVxDCGyNR5rGp9JC5AUxppLzUAqvncRJDcxQnX1u 42 | // 43 | 44 | uint256 constant TWO_TWO_FIVE_PCT_RATE = 1000000000705562181084137268; 45 | uint256 constant FOUR_PCT_RATE = 1000000001243680656318820312; 46 | 47 | // Turn office hours off 48 | function officeHours() public override returns (bool) { 49 | return false; 50 | } 51 | 52 | function actions() public override { 53 | // --------------------------------------------------------------------- 54 | // Includes changes from the DssSpellCollateralOnboardingAction 55 | onboardNewCollaterals(); 56 | 57 | // MOMC Proposal 58 | // https://vote.makerdao.com/polling/QmTmehbz#poll-detail 59 | 60 | //Lower the WBTC-A Stability Fee from 3.25% to 2.25%. 61 | DssExecLib.setIlkStabilityFee("WBTC-A", TWO_TWO_FIVE_PCT_RATE, true); 62 | 63 | //Lower the WBTC-B Stability Fee from 4.5% to 4.0%. 64 | DssExecLib.setIlkStabilityFee("WBTC-B", FOUR_PCT_RATE, true); 65 | 66 | DssExecLib.setChangelogVersion("1.12.1"); 67 | } 68 | } 69 | 70 | contract DssSpell is DssExec { 71 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 72 | } 73 | -------------------------------------------------------------------------------- /archive/2022-10-26-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 37 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 38 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 39 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 40 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 41 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 42 | 43 | constructor() public { 44 | addr = [ 45 | PE_CURRENT, 46 | ORACLES_1, 47 | ORACLES_2, 48 | PE_01, 49 | PE_02, 50 | PE_03, 51 | PE_04, 52 | PE_05, 53 | PE_06, 54 | PE_07, 55 | CES_01, 56 | CES_02, 57 | CES_03, 58 | CES_04, 59 | STARKNET_01, 60 | STARKNET_02 61 | ]; 62 | } 63 | 64 | function count() external view returns (uint256) { 65 | return addr.length; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /archive/2022-11-07-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 37 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 38 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 39 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 40 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 41 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 42 | 43 | constructor() public { 44 | addr = [ 45 | PE_CURRENT, 46 | ORACLES_1, 47 | ORACLES_2, 48 | PE_01, 49 | PE_02, 50 | PE_03, 51 | PE_04, 52 | PE_05, 53 | PE_06, 54 | PE_07, 55 | CES_01, 56 | CES_02, 57 | CES_03, 58 | CES_04, 59 | STARKNET_01, 60 | STARKNET_02 61 | ]; 62 | } 63 | 64 | function count() external view returns (uint256) { 65 | return addr.length; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /archive/2022-11-12-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 37 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 38 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 39 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 40 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 41 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 42 | 43 | constructor() public { 44 | addr = [ 45 | PE_CURRENT, 46 | ORACLES_1, 47 | ORACLES_2, 48 | PE_01, 49 | PE_02, 50 | PE_03, 51 | PE_04, 52 | PE_05, 53 | PE_06, 54 | PE_07, 55 | CES_01, 56 | CES_02, 57 | CES_03, 58 | CES_04, 59 | STARKNET_01, 60 | STARKNET_02 61 | ]; 62 | } 63 | 64 | function count() external view returns (uint256) { 65 | return addr.length; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /archive/2022-11-14-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 37 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 38 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 39 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 40 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 41 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 42 | 43 | constructor() public { 44 | addr = [ 45 | PE_CURRENT, 46 | ORACLES_1, 47 | ORACLES_2, 48 | PE_01, 49 | PE_02, 50 | PE_03, 51 | PE_04, 52 | PE_05, 53 | PE_06, 54 | PE_07, 55 | CES_01, 56 | CES_02, 57 | CES_03, 58 | CES_04, 59 | STARKNET_01, 60 | STARKNET_02 61 | ]; 62 | } 63 | 64 | function count() external view returns (uint256) { 65 | return addr.length; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /archive/2022-11-28-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 37 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 38 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 39 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 40 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 41 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 42 | 43 | constructor() public { 44 | addr = [ 45 | PE_CURRENT, 46 | ORACLES_1, 47 | ORACLES_2, 48 | PE_01, 49 | PE_02, 50 | PE_03, 51 | PE_04, 52 | PE_05, 53 | PE_06, 54 | PE_07, 55 | CES_01, 56 | CES_02, 57 | CES_03, 58 | CES_04, 59 | STARKNET_01, 60 | STARKNET_02 61 | ]; 62 | } 63 | 64 | function count() external view returns (uint256) { 65 | return addr.length; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /archive/2022-11-29-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 37 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 38 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 39 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 40 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 41 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 42 | 43 | constructor() public { 44 | addr = [ 45 | PE_CURRENT, 46 | ORACLES_1, 47 | ORACLES_2, 48 | PE_01, 49 | PE_02, 50 | PE_03, 51 | PE_04, 52 | PE_05, 53 | PE_06, 54 | PE_07, 55 | CES_01, 56 | CES_02, 57 | CES_03, 58 | CES_04, 59 | STARKNET_01, 60 | STARKNET_02 61 | ]; 62 | } 63 | 64 | function count() external view returns (uint256) { 65 | return addr.length; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /archive/2022-03-03-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity 0.6.12; 19 | // Enable ABIEncoderV2 when onboarding collateral 20 | //pragma experimental ABIEncoderV2; 21 | 22 | import "dss-exec-lib/DssExec.sol"; 23 | import "dss-exec-lib/DssAction.sol"; 24 | import "dss-interfaces/dss/ChainlogAbstract.sol"; 25 | 26 | import { DssSpellCollateralOnboardingAction } from "./Goerli-DssSpellCollateralOnboarding.sol"; 27 | 28 | contract DssSpellAction is DssAction, DssSpellCollateralOnboardingAction { 29 | // Provides a descriptive tag for bot consumption 30 | string public constant override description = "Goerli Spell"; 31 | 32 | uint256 constant MILLION = 10**6; 33 | 34 | // Turn office hours off 35 | function officeHours() public override returns (bool) { 36 | return false; 37 | } 38 | 39 | function actions() public override { 40 | // Housekeeping: PE-872 2022-02-25 Executive Spell 41 | // Increase PSM-GUSD-A max debt ceiling from 10M to 60M 42 | DssExecLib.setIlkAutoLineDebtCeiling("PSM-GUSD-A", 60 * MILLION); 43 | // Update Chainlog 44 | ChainlogAbstract(DssExecLib.LOG).removeAddress("MCD_FLIP_ETH_A"); 45 | ChainlogAbstract(DssExecLib.LOG).removeAddress("MCD_FLIP_BAT_A"); 46 | ChainlogAbstract(DssExecLib.LOG).removeAddress("MCD_FLIP_USDC_A"); 47 | 48 | // --- Open Market Committee Proposal --- 49 | // https://vote.makerdao.com/polling/QmPhbQ3B 50 | // 51 | // Increase WSTETH-A AutoLine (line) from 200 million DAI to 300 million DAI 52 | // Increase WSTETH-A Autoline (gap) from 20 million DAI to 30 million DAI. 53 | DssExecLib.setIlkAutoLineParameters("WSTETH-A", 300 * MILLION, 30 * MILLION, 6 hours); 54 | 55 | // Increase DIRECT-AAVEV2-DAI AutoLine (line) from 220 million DAI to 300 million DAI. 56 | // Increase DIRECT-AAVEV2-DAI AutoLine (gap) from 50 million DAI to 65 million DAI. 57 | // DssExecLib.setIlkAutoLineParameters("DIRECT-AAVEV2-DAI", 300 * MILLION, 65 * MILLION, 12 hours); 58 | 59 | // Decrease DIRECT-AAVEV2-DAI Target Borrow Rate (bar) from 3.5% to 2.85%. 60 | // DssExecLib.setD3MTargetInterestRate(DssExecLib.getChangelogAddress("MCD_JOIN_DIRECT_AAVEV2_DAI"), 285); // 2.85% 61 | } 62 | } 63 | 64 | contract DssSpell is DssExec { 65 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 66 | } 67 | -------------------------------------------------------------------------------- /archive/2022-05-20-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity 0.6.12; 19 | 20 | // Enable ABIEncoderV2 when onboarding collateral 21 | // pragma experimental ABIEncoderV2; 22 | import "dss-exec-lib/DssExec.sol"; 23 | import "dss-exec-lib/DssAction.sol"; 24 | 25 | import { DssSpellCollateralOnboardingAction } from "./Goerli-DssSpellCollateralOnboarding.sol"; 26 | 27 | contract DssSpellAction is DssAction, DssSpellCollateralOnboardingAction { 28 | 29 | // Provides a descriptive tag for bot consumption 30 | string public constant override description = "Goerli Spell"; 31 | 32 | // Math 33 | uint256 constant WAD = 10 ** 18; 34 | uint256 constant RAD = 10 ** 45; 35 | // Many of the settings that change weekly rely on the rate accumulator 36 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 37 | // To check this yourself, use the following rate calculation (example 8%): 38 | // 39 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 40 | // 41 | // A table of rates can be found at 42 | // https://ipfs.io/ipfs/QmPgPVrVxDCGyNR5rGp9JC5AUxppLzUAqvncRJDcxQnX1u 43 | // 44 | 45 | // Turn office hours off 46 | function officeHours() public override returns (bool) { 47 | return false; 48 | } 49 | 50 | address immutable MCD_FLAP = DssExecLib.flap(); 51 | address immutable MCD_ESM = DssExecLib.esm(); 52 | 53 | // No Transfer on Goerli 54 | // address immutable MCD_GOV = DssExecLib.mkr(); 55 | // address immutable DUX_WALLET = ; 56 | // address immutable SIDESTREAM_WALLET = ; 57 | 58 | function actions() public override { 59 | // --------------------------------------------------------------------- 60 | // Includes changes from the DssSpellCollateralOnboardingAction 61 | // onboardNewCollaterals(); 62 | 63 | // ---------------------------- Lid for Flap --------------------------- 64 | DssExecLib.setValue(MCD_FLAP, "lid", 30_000 * RAD); 65 | 66 | // ------------------------------ ESM Min ------------------------------ 67 | DssExecLib.setValue(MCD_ESM, "min", 150_000 * WAD); 68 | 69 | // ---------------------------- Transfer MKR --------------------------- 70 | // No Transfer on Goerli 71 | 72 | } 73 | } 74 | 75 | contract DssSpell is DssExec { 76 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 77 | } 78 | -------------------------------------------------------------------------------- /archive/2022-10-19-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2020 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.6.12; 18 | // Enable ABIEncoderV2 when onboarding collateral through `DssExecLib.addNewCollateral()` 19 | // pragma experimental ABIEncoderV2; 20 | 21 | import "dss-exec-lib/DssExec.sol"; 22 | import "dss-exec-lib/DssAction.sol"; 23 | 24 | import { DssSpellCollateralAction } from "./Goerli-DssSpellCollateral.sol"; 25 | 26 | contract DssSpellAction is DssAction, DssSpellCollateralAction { 27 | // Provides a descriptive tag for bot consumption 28 | string public constant override description = "Goerli Spell"; 29 | 30 | // Turn office hours off 31 | function officeHours() public override returns (bool) { 32 | return false; 33 | } 34 | 35 | // Many of the settings that change weekly rely on the rate accumulator 36 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 37 | // To check this yourself, use the following rate calculation (example 8%): 38 | // 39 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 40 | // 41 | // A table of rates can be found at 42 | // https://ipfs.io/ipfs/QmVp4mhhbwWGTfbh2BzwQB9eiBrQBKiqcPRZCaAxNUaar6 43 | // 44 | // --- Rates --- 45 | // uint256 constant THREE_PCT_RATE = 1000000000937303470807876289; 46 | 47 | // --- Math --- 48 | uint256 internal constant WAD = 10 ** 18; 49 | 50 | function actions() public override { 51 | // --------------------------------------------------------------------- 52 | // Includes changes from DssSpellCollateralAction 53 | // onboardCollaterals(); 54 | updateCollaterals(); 55 | // offboardCollaterals(); 56 | 57 | // --------------------------------------------------------------------- 58 | // Vote: https://vote.makerdao.com/polling/QmYffkvR#poll-detail 59 | // Forum: https://forum.makerdao.com/t/signal-request-change-psm-gusd-a-parameters/18142 60 | address MCD_PSM_GUSD_A = DssExecLib.getChangelogAddress("MCD_PSM_GUSD_A"); 61 | DssExecLib.setIlkAutoLineParameters({ 62 | _ilk: "PSM-GUSD-A", 63 | _amount: 500 * MILLION, 64 | _gap: 50 * MILLION, 65 | _ttl: 24 hours 66 | }); 67 | DssExecLib.setValue(MCD_PSM_GUSD_A, "tout", 20 * WAD / 100_00); 68 | } 69 | } 70 | 71 | contract DssSpell is DssExec { 72 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 73 | } 74 | -------------------------------------------------------------------------------- /archive/2022-11-29-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2020 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.6.12; 18 | // Enable ABIEncoderV2 when onboarding collateral through `DssExecLib.addNewCollateral()` 19 | // pragma experimental ABIEncoderV2; 20 | 21 | import "dss-exec-lib/DssExec.sol"; 22 | import "dss-exec-lib/DssAction.sol"; 23 | 24 | interface StarknetGovRelayLike { 25 | function relay(uint256 spell) external; 26 | } 27 | 28 | contract DssSpellAction is DssAction { 29 | // Provides a descriptive tag for bot consumption 30 | string public constant override description = "Goerli Spell"; 31 | 32 | // Turn office hours off 33 | function officeHours() public override returns (bool) { 34 | return false; 35 | } 36 | 37 | address immutable internal STARKNET_GOV_RELAY = DssExecLib.getChangelogAddress("STARKNET_GOV_RELAY_LEGACY"); 38 | uint256 constant internal L2_GOV_RELAY_SPELL = 0x05a958b692c498791a215f0624a105393f5b33cfdc3fb51bdf17e629b766119a; 39 | 40 | // Many of the settings that change weekly rely on the rate accumulator 41 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 42 | // To check this yourself, use the following rate calculation (example 8%): 43 | // 44 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 45 | // 46 | // A table of rates can be found at 47 | // https://ipfs.io/ipfs/QmVp4mhhbwWGTfbh2BzwQB9eiBrQBKiqcPRZCaAxNUaar6 48 | // 49 | 50 | function actions() public override { 51 | // ------------------ Setup new Starknet Governance Relay ----------------- 52 | // Forum: https://forum.makerdao.com/t/starknet-changes-for-executive-spell-on-the-week-of-2022-11-29/18818 53 | // Relay l2 part of the spell 54 | // L2 Spell: 55 | // https://goerli.voyager.online/contract/0x05a958b692c498791a215f0624a105393f5b33cfdc3fb51bdf17e629b766119a#code 56 | // it is a fix of 2022-11-28 l2 spell: 57 | // https://goerli.voyager.online/contract/0x04c93f9818a4f81f6f2c6f0f660cb4986b789b6b6fb1b274b879649deed74eb8#code 58 | // that did not executed correctly due to the incorrect bridge_legacy address: 59 | // https://goerli.voyager.online/tx/0x6057a9ac5d03e09da99c9f07f725af5170eec6d4364f3a7f8dbc03362706698 60 | 61 | StarknetGovRelayLike(STARKNET_GOV_RELAY).relay(L2_GOV_RELAY_SPELL); 62 | } 63 | } 64 | 65 | contract DssSpell is DssExec { 66 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 67 | } 68 | -------------------------------------------------------------------------------- /archive/2022-03-04-Charter-Sneak/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity 0.6.12; 19 | // Enable ABIEncoderV2 when onboarding collateral 20 | pragma experimental ABIEncoderV2; 21 | 22 | import "dss-exec-lib/DssExec.sol"; 23 | import "dss-exec-lib/DssAction.sol"; 24 | 25 | import { DssSpellCollateralOnboardingAction } from "./Goerli-DssSpellCollateralOnboarding.sol"; 26 | 27 | interface CharterLike { 28 | function setImplementation(address) external; 29 | function file(bytes32, bytes32, uint256) external; 30 | function file(bytes32, address, bytes32, uint256) external; 31 | } 32 | 33 | contract DssSpellAction is DssAction, DssSpellCollateralOnboardingAction { 34 | // Provides a descriptive tag for bot consumption 35 | string public constant override description = "Goerli Spell"; 36 | 37 | address constant MCD_CHARTER_IMP = 0xf6a9bD36553208ee02049Dc8A9c44919383C9a6b; 38 | 39 | // The below addresses are given for documentation purposes: 40 | address constant CDP_REGISTRY = 0x0636E6878703E30aB11Ba13A68C6124d9d252e6B; 41 | address constant PROXY_ACTIONS_CHARTER = 0xfFb896D7BEf704DF73abc9A2EBf295CE236c5919; 42 | address constant PROXY_ACTIONS_END_CHARTER = 0xDAdE5a1bAC92c539B886eeC82738Ff26b66Dc484; 43 | 44 | address constant OAZO_DS_PROXY = 0xDdA54E31B7586153D72A2AC1bAFaC5B9C21fc45C; 45 | 46 | // Turn office hours off 47 | function officeHours() public override returns (bool) { 48 | return false; 49 | } 50 | 51 | function actions() public override { 52 | 53 | // --------------------------------------------------------------------------------- 54 | onboardNewCollaterals(); 55 | 56 | CharterLike(MCD_CHARTER).setImplementation(MCD_CHARTER_IMP); 57 | 58 | CharterLike(MCD_CHARTER).file("INST-ETH-A", "gate", 1); 59 | CharterLike(MCD_CHARTER).file("INST-ETH-A", OAZO_DS_PROXY, "nib", 1 * WAD / 100); // 1% 60 | CharterLike(MCD_CHARTER).file("INST-ETH-A", OAZO_DS_PROXY, "peace", 150 * RAY / 100); // 150% 61 | CharterLike(MCD_CHARTER).file("INST-ETH-A", OAZO_DS_PROXY, "uline", 900 * MILLION * RAD); 62 | 63 | CharterLike(MCD_CHARTER).file("INST-WBTC-A", "gate", 1); 64 | CharterLike(MCD_CHARTER).file("INST-WBTC-A", OAZO_DS_PROXY, "nib", 1 * WAD / 100); // 1% 65 | CharterLike(MCD_CHARTER).file("INST-WBTC-A", OAZO_DS_PROXY, "peace", 150 * RAY / 100); // 150% 66 | CharterLike(MCD_CHARTER).file("INST-WBTC-A", OAZO_DS_PROXY, "uline", 600 * MILLION * RAD); 67 | } 68 | } 69 | 70 | contract DssSpell is DssExec { 71 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 72 | } 73 | -------------------------------------------------------------------------------- /archive/2023-02-07-DssSpell/DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2020 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | import "dss-exec-lib/DssExec.sol"; 20 | import "dss-exec-lib/DssAction.sol"; 21 | 22 | 23 | contract DssSpellAction is DssAction { 24 | // Provides a descriptive tag for bot consumption 25 | string public constant override description = "Goerli Spell"; 26 | 27 | // Turn office hours off 28 | function officeHours() public pure override returns (bool) { 29 | return false; 30 | } 31 | 32 | // Many of the settings that change weekly rely on the rate accumulator 33 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 34 | // To check this yourself, use the following rate calculation (example 8%): 35 | // 36 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 37 | // 38 | // A table of rates can be found at 39 | // https://ipfs.io/ipfs/QmVp4mhhbwWGTfbh2BzwQB9eiBrQBKiqcPRZCaAxNUaar6 40 | // 41 | // uint256 internal constant X_PCT_RATE = ; 42 | 43 | // uint256 internal constant MILLION = 10 ** 6; 44 | // uint256 internal constant RAY = 10 ** 27; 45 | // uint256 internal constant WAD = 10 ** 18; 46 | 47 | function actions() public override { 48 | 49 | // Dust Parameter Changes 50 | // https://vote.makerdao.com/polling/QmRfegL4#vote-breakdown 51 | 52 | // Reduce dust for ETH-A, WBTC-A, and WSTETH-A to 7,500 DAI. 53 | DssExecLib.setIlkMinVaultAmount("ETH-A", 7_500); 54 | DssExecLib.setIlkMinVaultAmount("WBTC-A", 7_500); 55 | DssExecLib.setIlkMinVaultAmount("WSTETH-A", 7_500); 56 | 57 | // Reduce dust for ETH-C, WBTC-C, and WSTETH-B to 3,500 DAI. 58 | DssExecLib.setIlkMinVaultAmount("ETH-C", 3_500); 59 | DssExecLib.setIlkMinVaultAmount("WBTC-C", 3_500); 60 | DssExecLib.setIlkMinVaultAmount("WSTETH-B", 3_500); 61 | 62 | // Reduce dust for ETH-B and WBTC-B to 25,000 DAI. 63 | DssExecLib.setIlkMinVaultAmount("ETH-B", 25_000); 64 | DssExecLib.setIlkMinVaultAmount("WBTC-B", 25_000); 65 | 66 | 67 | // Chainlink Automation Keeper Network Stream Setup 68 | // https://vote.makerdao.com/polling/QmXeWcrX 69 | // Not on Goerli 70 | 71 | // Recognized Delegate Compensation 72 | // https://mips.makerdao.com/mips/details/MIP61 73 | // Not on Goerli 74 | 75 | // Extra action to ensure prior call succeeds on Goerli cast 76 | DssExecLib.accumulateDSR(); 77 | } 78 | } 79 | 80 | contract DssSpell is DssExec { 81 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) {} 82 | } 83 | -------------------------------------------------------------------------------- /archive/2022-07-25-DssSpell/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2020 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.6.12; 18 | // Enable ABIEncoderV2 when onboarding collateral through `DssExecLib.addNewCollateral()` 19 | // pragma experimental ABIEncoderV2; 20 | 21 | import "dss-exec-lib/DssExec.sol"; 22 | import "dss-exec-lib/DssAction.sol"; 23 | import "dss-interfaces/dapp/DSTokenAbstract.sol"; 24 | 25 | import { DssSpellCollateralAction } from "./Goerli-DssSpellCollateral.sol"; 26 | 27 | interface StarknetLike { 28 | function setMaxDeposit(uint256) external; 29 | } 30 | 31 | interface RwaUrnLike { 32 | function hope(address) external; 33 | function lock(uint256) external; 34 | function draw(uint256) external; 35 | } 36 | 37 | contract DssSpellAction is DssAction, DssSpellCollateralAction { 38 | 39 | // Provides a descriptive tag for bot consumption 40 | string public constant override description = "Goerli Spell"; 41 | 42 | address constant RWA_TOKEN_FAB = 0xb7462C421D7EDF3455003F76125e812a66DdE187; 43 | 44 | uint256 constant RWA009_DRAW_AMOUNT = 25_000_000 * WAD; 45 | 46 | // Many of the settings that change weekly rely on the rate accumulator 47 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 48 | // To check this yourself, use the following rate calculation (example 8%): 49 | // 50 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 51 | // 52 | // A table of rates can be found at 53 | // https://ipfs.io/ipfs/QmX2QMoM1SZq2XMoTbMak8pZP86Y2icpgPAKDjQg4r4YHn 54 | // 55 | 56 | function officeHours() public override returns (bool) { 57 | return false; 58 | } 59 | 60 | function actions() public override { 61 | // Set Starknet bridge max deposit to get on sync with mainnet 62 | StarknetLike(DssExecLib.getChangelogAddress("STARKNET_DAI_BRIDGE")).setMaxDeposit(50 * WAD); 63 | 64 | // --------------------------------------------------------------------- 65 | // Includes changes from the DssSpellCollateralAction 66 | onboardNewCollaterals(); 67 | drawFromRWA009Urn(); 68 | 69 | // Add RWA_TOKEN_FAB to changelog 70 | DssExecLib.setChangelogAddress("RWA_TOKEN_FAB", RWA_TOKEN_FAB); 71 | 72 | DssExecLib.setChangelogVersion("1.13.3"); 73 | } 74 | 75 | function drawFromRWA009Urn() internal { 76 | // lock RWA009 Token in the URN 77 | DSTokenAbstract(RWA009).approve(RWA009_A_URN, 1 * WAD); 78 | RwaUrnLike(RWA009_A_URN).lock(1 * WAD); 79 | 80 | // draw DAI to genesis address 81 | RwaUrnLike(RWA009_A_URN).draw(RWA009_DRAW_AMOUNT); 82 | } 83 | } 84 | 85 | contract DssSpell is DssExec { 86 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 87 | } 88 | -------------------------------------------------------------------------------- /archive/2023-01-24-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant PE_08 = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 37 | address public constant PE_09 = 0xa22A61c233d7242728b4255420063c92fc1AEBb9; 38 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 39 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 40 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 41 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 42 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 43 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 44 | address public constant CENTRIFUGE_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 45 | address public constant CENTRIFUGE_02 = 0x0A735602a357802f553113F5831FE2fbf2F0E2e0; 46 | 47 | constructor() { 48 | addr = [ 49 | PE_CURRENT, 50 | ORACLES_1, 51 | ORACLES_2, 52 | PE_01, 53 | PE_02, 54 | PE_03, 55 | PE_04, 56 | PE_05, 57 | PE_06, 58 | PE_07, 59 | PE_08, 60 | PE_09, 61 | CES_01, 62 | CES_02, 63 | CES_03, 64 | CES_04, 65 | STARKNET_01, 66 | STARKNET_02, 67 | CENTRIFUGE_01, 68 | CENTRIFUGE_02 69 | ]; 70 | } 71 | 72 | function count() external view returns (uint256) { 73 | return addr.length; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /archive/2023-02-02-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant PE_08 = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 37 | address public constant PE_09 = 0xa22A61c233d7242728b4255420063c92fc1AEBb9; 38 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 39 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 40 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 41 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 42 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 43 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 44 | address public constant CENTRIFUGE_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 45 | address public constant CENTRIFUGE_02 = 0x0A735602a357802f553113F5831FE2fbf2F0E2e0; 46 | 47 | constructor() { 48 | addr = [ 49 | PE_CURRENT, 50 | ORACLES_1, 51 | ORACLES_2, 52 | PE_01, 53 | PE_02, 54 | PE_03, 55 | PE_04, 56 | PE_05, 57 | PE_06, 58 | PE_07, 59 | PE_08, 60 | PE_09, 61 | CES_01, 62 | CES_02, 63 | CES_03, 64 | CES_04, 65 | STARKNET_01, 66 | STARKNET_02, 67 | CENTRIFUGE_01, 68 | CENTRIFUGE_02 69 | ]; 70 | } 71 | 72 | function count() external view returns (uint256) { 73 | return addr.length; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /archive/2023-02-07-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant PE_08 = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 37 | address public constant PE_09 = 0xa22A61c233d7242728b4255420063c92fc1AEBb9; 38 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 39 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 40 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 41 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 42 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 43 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 44 | address public constant CENTRIFUGE_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 45 | address public constant CENTRIFUGE_02 = 0x0A735602a357802f553113F5831FE2fbf2F0E2e0; 46 | 47 | constructor() { 48 | addr = [ 49 | PE_CURRENT, 50 | ORACLES_1, 51 | ORACLES_2, 52 | PE_01, 53 | PE_02, 54 | PE_03, 55 | PE_04, 56 | PE_05, 57 | PE_06, 58 | PE_07, 59 | PE_08, 60 | PE_09, 61 | CES_01, 62 | CES_02, 63 | CES_03, 64 | CES_04, 65 | STARKNET_01, 66 | STARKNET_02, 67 | CENTRIFUGE_01, 68 | CENTRIFUGE_02 69 | ]; 70 | } 71 | 72 | function count() external view returns (uint256) { 73 | return addr.length; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /archive/2023-02-20-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant PE_08 = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 37 | address public constant PE_09 = 0xa22A61c233d7242728b4255420063c92fc1AEBb9; 38 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 39 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 40 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 41 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 42 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 43 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 44 | address public constant CENTRIFUGE_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 45 | address public constant CENTRIFUGE_02 = 0x0A735602a357802f553113F5831FE2fbf2F0E2e0; 46 | 47 | constructor() { 48 | addr = [ 49 | PE_CURRENT, 50 | ORACLES_1, 51 | ORACLES_2, 52 | PE_01, 53 | PE_02, 54 | PE_03, 55 | PE_04, 56 | PE_05, 57 | PE_06, 58 | PE_07, 59 | PE_08, 60 | PE_09, 61 | CES_01, 62 | CES_02, 63 | CES_03, 64 | CES_04, 65 | STARKNET_01, 66 | STARKNET_02, 67 | CENTRIFUGE_01, 68 | CENTRIFUGE_02 69 | ]; 70 | } 71 | 72 | function count() external view returns (uint256) { 73 | return addr.length; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /archive/2023-03-03-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant PE_08 = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 37 | address public constant PE_09 = 0xa22A61c233d7242728b4255420063c92fc1AEBb9; 38 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 39 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 40 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 41 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 42 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 43 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 44 | address public constant CENTRIFUGE_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 45 | address public constant CENTRIFUGE_02 = 0x0A735602a357802f553113F5831FE2fbf2F0E2e0; 46 | 47 | constructor() { 48 | addr = [ 49 | PE_CURRENT, 50 | ORACLES_1, 51 | ORACLES_2, 52 | PE_01, 53 | PE_02, 54 | PE_03, 55 | PE_04, 56 | PE_05, 57 | PE_06, 58 | PE_07, 59 | PE_08, 60 | PE_09, 61 | CES_01, 62 | CES_02, 63 | CES_03, 64 | CES_04, 65 | STARKNET_01, 66 | STARKNET_02, 67 | CENTRIFUGE_01, 68 | CENTRIFUGE_02 69 | ]; 70 | } 71 | 72 | function count() external view returns (uint256) { 73 | return addr.length; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /archive/2023-03-16-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant PE_08 = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 37 | address public constant PE_09 = 0xa22A61c233d7242728b4255420063c92fc1AEBb9; 38 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 39 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 40 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 41 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 42 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 43 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 44 | address public constant CENTRIFUGE_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 45 | address public constant CENTRIFUGE_02 = 0x0A735602a357802f553113F5831FE2fbf2F0E2e0; 46 | 47 | constructor() { 48 | addr = [ 49 | PE_CURRENT, 50 | ORACLES_1, 51 | ORACLES_2, 52 | PE_01, 53 | PE_02, 54 | PE_03, 55 | PE_04, 56 | PE_05, 57 | PE_06, 58 | PE_07, 59 | PE_08, 60 | PE_09, 61 | CES_01, 62 | CES_02, 63 | CES_03, 64 | CES_04, 65 | STARKNET_01, 66 | STARKNET_02, 67 | CENTRIFUGE_01, 68 | CENTRIFUGE_02 69 | ]; 70 | } 71 | 72 | function count() external view returns (uint256) { 73 | return addr.length; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /archive/2023-03-17-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.8.16; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant PE_08 = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 37 | address public constant PE_09 = 0xa22A61c233d7242728b4255420063c92fc1AEBb9; 38 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 39 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 40 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 41 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 42 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 43 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 44 | address public constant CENTRIFUGE_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 45 | address public constant CENTRIFUGE_02 = 0x0A735602a357802f553113F5831FE2fbf2F0E2e0; 46 | 47 | constructor() { 48 | addr = [ 49 | PE_CURRENT, 50 | ORACLES_1, 51 | ORACLES_2, 52 | PE_01, 53 | PE_02, 54 | PE_03, 55 | PE_04, 56 | PE_05, 57 | PE_06, 58 | PE_07, 59 | PE_08, 60 | PE_09, 61 | CES_01, 62 | CES_02, 63 | CES_03, 64 | CES_04, 65 | STARKNET_01, 66 | STARKNET_02, 67 | CENTRIFUGE_01, 68 | CENTRIFUGE_02 69 | ]; 70 | } 71 | 72 | function count() external view returns (uint256) { 73 | return addr.length; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /archive/2022-12-07-DssSpell/test/addresses_deployers.sol: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: © 2021 Dai Foundation 2 | // SPDX-License-Identifier: AGPL-3.0-or-later 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity ^0.6.12; 18 | 19 | contract Deployers { 20 | 21 | address[] public addr; 22 | 23 | // Skip Ward Deployers see Goerli-DssSpell.t.base.sol#skipWards(address,address) 24 | address public constant PE_CURRENT = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 25 | address public constant ORACLES_1 = 0x1f42e41A34B71606FcC60b4e624243b365D99745; 26 | address public constant ORACLES_2 = 0x39aBD7819E5632Fa06D2ECBba45Dca5c90687EE3; 27 | 28 | // Known Team Deployers 29 | address public constant PE_01 = 0xda0fab060e6cc7b1C0AA105d29Bd50D71f036711; 30 | address public constant PE_02 = 0xDA0FaB0700A4389F6E6679aBAb1692B4601ce9bf; 31 | address public constant PE_03 = 0xdA0C0de01d90A5933692Edf03c7cE946C7c50445; 32 | address public constant PE_04 = 0xdB33dFD3D61308C33C63209845DaD3e6bfb2c674; 33 | address public constant PE_05 = 0xDA01018eA05D98aBb66cb21a85d6019a311570eE; 34 | address public constant PE_06 = 0xDA0111100cb6080b43926253AB88bE719C60Be13; 35 | address public constant PE_07 = 0xDa0c0De020F80d43dde58c2653aa73d28Df1fBe1; 36 | address public constant PE_08 = 0xC1E6d8136441FC66612Df3584007f7CB68765e5D; 37 | address public constant PE_09 = 0xa22A61c233d7242728b4255420063c92fc1AEBb9; 38 | address public constant CES_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 39 | address public constant CES_02 = 0xc0b362cbb0117Ec6A4b589f744d4dECb2768A2eB; 40 | address public constant CES_03 = 0xb27B6fa77D7FBf3C1BD34B0f7DA59b39D3DB0f7e; 41 | address public constant CES_04 = 0x3ec4699bEc79F8FF862C220Ef0a718689A1d09f4; 42 | address public constant STARKNET_01 = 0x8aa7c51A6D380F4d9E273adD4298D913416031Ec; 43 | address public constant STARKNET_02 = 0x38F8e3b67FA8329FE4BaA1775e5480807f78887B; 44 | address public constant CENTRIFUGE_01 = 0x9956fca5a8994737f124c481cEDC6BB3dc5BF010; 45 | address public constant CENTRIFUGE_02 = 0x0A735602a357802f553113F5831FE2fbf2F0E2e0; 46 | 47 | constructor() public { 48 | addr = [ 49 | PE_CURRENT, 50 | ORACLES_1, 51 | ORACLES_2, 52 | PE_01, 53 | PE_02, 54 | PE_03, 55 | PE_04, 56 | PE_05, 57 | PE_06, 58 | PE_07, 59 | PE_08, 60 | PE_09, 61 | CES_01, 62 | CES_02, 63 | CES_03, 64 | CES_04, 65 | STARKNET_01, 66 | STARKNET_02, 67 | CENTRIFUGE_01, 68 | CENTRIFUGE_02 69 | ]; 70 | } 71 | 72 | function count() external view returns (uint256) { 73 | return addr.length; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /archive/2022-05-16-DssSpell/Goerli-DssSpellCollateralOnboarding.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity 0.6.12; 19 | 20 | import "dss-exec-lib/DssExecLib.sol"; 21 | 22 | contract DssSpellCollateralOnboardingAction { 23 | 24 | // --- Rates --- 25 | // Many of the settings that change weekly rely on the rate accumulator 26 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 27 | // To check this yourself, use the following rate calculation (example 8%): 28 | // 29 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 30 | // 31 | // A table of rates can be found at 32 | // https://ipfs.io/ipfs/QmTRiQ3GqjCiRhh1ojzKzgScmSsiwQPLyjhgYSxZASQekj 33 | // 34 | 35 | // --- Math --- 36 | 37 | function onboardNewCollaterals() internal { 38 | // ----------------------------- Collateral onboarding ----------------------------- 39 | // Add ______________ as a new Vault Type 40 | // Poll Link: 41 | 42 | // DssExecLib.addNewCollateral( 43 | // CollateralOpts({ 44 | // ilk: , 45 | // gem: , 46 | // join: , 47 | // clip: , 48 | // calc: , 49 | // pip: , 50 | // isLiquidatable: , 51 | // isOSM: , 52 | // whitelistOSM: , 53 | // ilkDebtCeiling: , 54 | // minVaultAmount: , 55 | // maxLiquidationAmount: , 56 | // liquidationPenalty: , 57 | // ilkStabilityFee: , 58 | // startingPriceFactor: , 59 | // breakerTolerance: , 60 | // auctionDuration: , 61 | // permittedDrop: , 62 | // liquidationRatio: , 63 | // kprFlatReward: , 64 | // kprPctReward: 65 | // }) 66 | // ); 67 | 68 | // DssExecLib.setStairstepExponentialDecrease( 69 | // CALC_ADDR, 70 | // DURATION, 71 | // PCT_BPS 72 | // ); 73 | 74 | // DssExecLib.setIlkAutoLineParameters( 75 | // ILK, 76 | // AMOUNT, 77 | // GAP, 78 | // TTL 79 | // ); 80 | 81 | // ChainLog Updates 82 | // Add the new flip and join to the Chainlog 83 | // address constant CHAINLOG = DssExecLib.LOG(); 84 | // ChainlogAbstract(CHAINLOG).setAddress("", ); 85 | // ChainlogAbstract(CHAINLOG).setAddress("", ); 86 | // ChainlogAbstract(CHAINLOG).setVersion(""); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /archive/2022-05-20-DssSpell/Goerli-DssSpellCollateralOnboarding.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // 3 | // Copyright (C) 2021-2022 Dai Foundation 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | 18 | pragma solidity 0.6.12; 19 | 20 | import "dss-exec-lib/DssExecLib.sol"; 21 | 22 | contract DssSpellCollateralOnboardingAction { 23 | 24 | // --- Rates --- 25 | // Many of the settings that change weekly rely on the rate accumulator 26 | // described at https://docs.makerdao.com/smart-contract-modules/rates-module 27 | // To check this yourself, use the following rate calculation (example 8%): 28 | // 29 | // $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )' 30 | // 31 | // A table of rates can be found at 32 | // https://ipfs.io/ipfs/QmTRiQ3GqjCiRhh1ojzKzgScmSsiwQPLyjhgYSxZASQekj 33 | // 34 | 35 | // --- Math --- 36 | 37 | function onboardNewCollaterals() internal { 38 | // ----------------------------- Collateral onboarding ----------------------------- 39 | // Add ______________ as a new Vault Type 40 | // Poll Link: 41 | 42 | // DssExecLib.addNewCollateral( 43 | // CollateralOpts({ 44 | // ilk: , 45 | // gem: , 46 | // join: , 47 | // clip: , 48 | // calc: , 49 | // pip: , 50 | // isLiquidatable: , 51 | // isOSM: , 52 | // whitelistOSM: , 53 | // ilkDebtCeiling: , 54 | // minVaultAmount: , 55 | // maxLiquidationAmount: , 56 | // liquidationPenalty: , 57 | // ilkStabilityFee: , 58 | // startingPriceFactor: , 59 | // breakerTolerance: , 60 | // auctionDuration: , 61 | // permittedDrop: , 62 | // liquidationRatio: , 63 | // kprFlatReward: , 64 | // kprPctReward: 65 | // }) 66 | // ); 67 | 68 | // DssExecLib.setStairstepExponentialDecrease( 69 | // CALC_ADDR, 70 | // DURATION, 71 | // PCT_BPS 72 | // ); 73 | 74 | // DssExecLib.setIlkAutoLineParameters( 75 | // ILK, 76 | // AMOUNT, 77 | // GAP, 78 | // TTL 79 | // ); 80 | 81 | // ChainLog Updates 82 | // Add the new flip and join to the Chainlog 83 | // address constant CHAINLOG = DssExecLib.LOG(); 84 | // ChainlogAbstract(CHAINLOG).setAddress("", ); 85 | // ChainlogAbstract(CHAINLOG).setAddress("", ); 86 | // ChainlogAbstract(CHAINLOG).setVersion(""); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /archive/2021-08-12-PIP_WBTC_RENBTC_CLIP_stables_DSR/Goerli-DssSpell.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // Copyright (C) 2021 Maker Ecosystem Growth Holdings, INC. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | pragma solidity 0.6.12; 18 | 19 | import "dss-exec-lib/DssExec.sol"; 20 | import "dss-exec-lib/DssAction.sol"; 21 | import "dss-interfaces/dss/ClipAbstract.sol"; 22 | import "dss-interfaces/dss/IlkRegistryAbstract.sol"; 23 | 24 | interface Fileable { 25 | function file(bytes32,bytes32,address) external; 26 | } 27 | 28 | contract DssSpellAction is DssAction { 29 | 30 | // Provides a descriptive tag for bot consumption 31 | // This should be modified weekly to provide a summary of the actions 32 | // Hash: seth keccak -- "$(wget https://raw.githubusercontent.com/makerdao/community/TODO -q -O - 2>/dev/null)" 33 | string public constant override description = "Goerli Spell"; 34 | 35 | // Turn off office hours 36 | function officeHours() public override returns (bool) { 37 | return false; 38 | } 39 | 40 | function actions() public override { 41 | // Use PIP_WBTC for PIP_RENBTC 42 | address PIP_RENBTC = DssExecLib.getChangelogAddress("PIP_WBTC"); 43 | Fileable(DssExecLib.getChangelogAddress("MCD_SPOT")).file("RENBTC-A", "pip", PIP_RENBTC); 44 | IlkRegistryAbstract(DssExecLib.reg()).update("RENBTC-A"); 45 | DssExecLib.setChangelogAddress("PIP_RENBTC", PIP_RENBTC); 46 | 47 | // Turn off liquidations of stables 48 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_USDC_A")).file("stopped", 3); 49 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_USDC_B")).file("stopped", 3); 50 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_TUSD_A")).file("stopped", 3); 51 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_USDT_A")).file("stopped", 3); 52 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_PAXUSD_A")).file("stopped", 3); 53 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_GUSD_A")).file("stopped", 3); 54 | 55 | address CLIPPER_MOM = DssExecLib.getChangelogAddress("CLIPPER_MOM"); 56 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_USDC_A")).deny(CLIPPER_MOM); 57 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_USDC_B")).deny(CLIPPER_MOM); 58 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_TUSD_A")).deny(CLIPPER_MOM); 59 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_USDT_A")).deny(CLIPPER_MOM); 60 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_PAXUSD_A")).deny(CLIPPER_MOM); 61 | ClipAbstract(DssExecLib.getChangelogAddress("MCD_CLIP_GUSD_A")).deny(CLIPPER_MOM); 62 | 63 | // Fix DSR value 64 | DssExecLib.setDSR(1000000000003170820659990704, true); 65 | } 66 | } 67 | 68 | contract DssSpell is DssExec { 69 | constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {} 70 | } 71 | --------------------------------------------------------------------------------