generated from AngleProtocol/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add all scripts from multisig to governance #18
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
7fbf8f8
feat: add all scripts from multisig to governance
0xtekgrinder ead5efb
feat: add a way to propose transactions and create them beforehand
0xtekgrinder 0d2f221
feat: serialize json array object
0xtekgrinder 32ca79a
feat: deserialize proposal to propose script
0xtekgrinder cbb168e
feat: createProposal script
0xtekgrinder 1f6c788
feat: update borrow scripts and savings rate to use governance
0xtekgrinder c495675
feat: make the existing scripts multichains
0xtekgrinder c559187
refactor: remove revokeMultiSig script
0xtekgrinder 766dd6b
feat: update the create proposal bash script
0xtekgrinder 2c2e70c
feat: setMinDelay timelock script
0xtekgrinder aedf783
fix: set angle governor address in utils
0xtekgrinder 87aa8d8
feat: update propose script to use mnemonic
0xtekgrinder cdc8dff
fix: empty setUp for propose script
0xtekgrinder 071a533
feat: remaining transmuter scripts
0xtekgrinder 56b112f
chore: add back etherscans to foundry.toml
0xtekgrinder d571439
refactor: seperate proposal wrapper contract
0xtekgrinder 32bc5b0
start testing
GuillaumeNervoXS a4632d0
remove 2 useless files
GuillaumeNervoXS dc812bb
fix remove imports
GuillaumeNervoXS c74ad19
fix: remove inheritance
GuillaumeNervoXS a98e630
prank to connect the chains
GuillaumeNervoXS 48679bd
first test wroking
GuillaumeNervoXS 56c548d
more complex tests working
GuillaumeNervoXS 59656d4
chore: clean repo
GuillaumeNervoXS 3af5b78
feat do a test for setting the rate on the savings contract
GuillaumeNervoXS 6b43772
chore: fixes after rebase
GuillaumeNervoXS fb92b6b
chore: fix rebase and clean
GuillaumeNervoXS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
#! /bin/bash | ||
|
||
function chain_to_uri { | ||
chain=$1 | ||
|
||
case $chain in | ||
"1") | ||
echo $ETH_NODE_URI_MAINNET | ||
;; | ||
"2") | ||
echo $ETH_NODE_URI_ARBITRUM | ||
;; | ||
"3") | ||
echo $ETH_NODE_URI_POLYGON | ||
;; | ||
"4") | ||
echo $ETH_NODE_URI_GNOSIS | ||
;; | ||
"5") | ||
echo $ETH_NODE_URI_AVALANCHE | ||
;; | ||
"6") | ||
echo $ETH_NODE_URI_BASE | ||
;; | ||
"7") | ||
echo $ETH_NODE_URI_BSC | ||
;; | ||
"8") | ||
echo $ETH_NODE_URI_CELO | ||
;; | ||
"9") | ||
echo $ETH_NODE_URI_POLYGON_ZKEVM | ||
;; | ||
"10") | ||
echo $ETH_NODE_URI_OPTIMISM | ||
;; | ||
"11") | ||
echo $ETH_NODE_URI_LINEA | ||
;; | ||
*) | ||
;; | ||
esac | ||
} | ||
|
||
function chain_to_chainId { | ||
chain=$1 | ||
|
||
case $chain in | ||
"1") | ||
echo "1" | ||
;; | ||
"2") | ||
echo "42161" | ||
;; | ||
"3") | ||
echo "137" | ||
;; | ||
"4") | ||
echo "100" | ||
;; | ||
"5") | ||
echo "43114" | ||
;; | ||
"6") | ||
echo "8453" | ||
;; | ||
"7") | ||
echo "56" | ||
;; | ||
"8") | ||
echo "42220" | ||
;; | ||
"9") | ||
echo "1101" | ||
;; | ||
"10") | ||
echo "10" | ||
;; | ||
"11") | ||
echo "59144" | ||
;; | ||
*) | ||
;; | ||
esac | ||
} | ||
|
||
function usage { | ||
echo "bash createProposal.sh <script> <chain>" | ||
echo "" | ||
echo -e "script: path to the script to run" | ||
echo -e "chain: chain(s) to run the script on (separate with commas)" | ||
echo -e "\t1: Ethereum Mainnet" | ||
echo -e "\t2: Arbitrum" | ||
echo -e "\t3: Polygon" | ||
echo -e "\t4: Gnosis" | ||
echo -e "\t5: Avalanche" | ||
echo -e "\t6: Base" | ||
echo -e "\t7: Binance Smart Chain" | ||
echo -e "\t8: Celo" | ||
echo -e "\t9: Polygon ZkEvm" | ||
echo -e "\t10: Optimism" | ||
echo -e "\t11: Linea" | ||
echo "" | ||
} | ||
|
||
function main { | ||
command=false | ||
if [[ $# -ne 2 && $# -ne 0 ]]; then | ||
usage | ||
exit 1 | ||
fi | ||
if [ $# -eq 2 ]; then | ||
script=$1 | ||
chains=$2 | ||
command=true | ||
fi | ||
|
||
if [ ! -f .env ]; then | ||
echo ".env not found!" | ||
exit 1 | ||
fi | ||
source .env | ||
|
||
if [ $command != true ]; then | ||
echo "" | ||
echo "What script would you like to run ?" | ||
|
||
read script | ||
|
||
if [ -z "$script" ]; then | ||
echo "No script provided" | ||
exit 1 | ||
fi | ||
|
||
echo "" | ||
|
||
echo "Which chain(s) would you like to run the script on ? (separate with commas)" | ||
echo "- 1: Ethereum Mainnet" | ||
echo "- 2: Arbitrum" | ||
echo "- 3: Polygon" | ||
echo "- 4: Gnosis" | ||
echo "- 5: Avalanche" | ||
echo "- 6: Base" | ||
echo "- 7: Binance Smart Chain" | ||
echo "- 8: Celo" | ||
echo "- 9: Polygon ZkEvm" | ||
echo "- 10: Optimism" | ||
echo "- 11: Linea" | ||
|
||
read chains | ||
|
||
if [ -z "$chains" ]; then | ||
echo "No chain provided" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
mainnet_uri=$(chain_to_uri 1) | ||
|
||
chainIds="" | ||
for chain in $(echo $chains | sed "s/,/ /g") | ||
do | ||
if [[ -z $chainIds ]]; then | ||
chainIds="$(chain_to_chainId $chain)" | ||
else | ||
chainIds="$chainIds,$(chain_to_chainId $chain)" | ||
fi | ||
done | ||
|
||
echo "" | ||
echo "Running on chains $chainIds" | ||
|
||
export CHAIN_IDS=$chainIds | ||
# TODO if the script fails we should abort | ||
FOUNDRY_PROFILE=dev forge script $script | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "" | ||
echo "Script failed" | ||
fi | ||
|
||
# TODO if the test fails we should abort | ||
testContract="${script}Test" | ||
echo "" | ||
echo "Running test" | ||
FOUNDRY_PROFILE=dev forge test --match-contract $testContract -vvv | ||
|
||
echo "" | ||
echo "Would you like to create the proposal ? (yes/no)" | ||
read execute | ||
|
||
# if [[ $execute == "yes" ]]; then | ||
# forge script scripts/interaction/Propose.s.sol:Propose --fork-url $mainnet_uri --broadcast | ||
# fi | ||
} | ||
|
||
main $@ |
Submodule angle-transmuter
added at
7fd03d
Submodule borrow-contracts
added at
407a0e
Submodule new-oz-upgradeable
added at
fbdb82
Submodule openzeppelin-contracts
updated
39 files
Submodule openzeppelin-contracts-upgradeable
updated
689 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
ds-test/=lib/forge-std/lib/ds-test/src/ | ||
forge-std/=lib/forge-std/src/ | ||
oz/=lib/openzeppelin-contracts/contracts/ | ||
oz-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/ | ||
oz/=lib/new-oz/contracts/ | ||
oz-upgradeable/=lib/new-oz-upgradeable/contracts/ | ||
lz/=lib/solidity-examples/contracts | ||
stringutils/=lib/solidity-stringutils | ||
stringutils/=lib/solidity-stringutils | ||
borrow/=lib/borrow-contracts/contracts | ||
transmuter/=lib/angle-transmuter/contracts | ||
contracts/=contracts | ||
test/=test | ||
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts | ||
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts | ||
@chainlink/=lib/chainlink |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget to uncomment this