generated from AngleProtocol/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow retroactive campaign (#93)
* feat: allow retroactive campaign * add fork bash script * test retroactive campaigns * chore: remove redundant scripts * remove forge std * remove utils lib
- Loading branch information
1 parent
bbdc427
commit 9135657
Showing
6 changed files
with
117 additions
and
44 deletions.
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,46 @@ | ||
#! /bin/bash | ||
|
||
source lib/utils/helpers/common.sh | ||
|
||
function main { | ||
if [ ! -f .env ]; then | ||
echo ".env not found!" | ||
exit 1 | ||
fi | ||
source .env | ||
|
||
echo "Which chain would you like to fork ?" | ||
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 option | ||
|
||
uri=$(chain_to_uri $option) | ||
if [ -z "$uri" ]; then | ||
echo "Unknown network" | ||
exit 1 | ||
fi | ||
|
||
echo "What block do you want to fork ? (Can leave empty for instant)" | ||
|
||
read block | ||
|
||
if [ -z "$block" ]; then | ||
echo "Forking $uri" | ||
anvil --fork-url $uri | ||
else | ||
echo "Forking $uri at block $block" | ||
anvil --fork-url $uri --fork-block-number $block | ||
fi | ||
} | ||
|
||
main |
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,2 +1,4 @@ | ||
@openzeppelin/=node_modules/@openzeppelin/ | ||
forge-std/=node_modules/forge-std/src | ||
forge-std/=node_modules/forge-std/src | ||
oz/=node_modules/@openzeppelin/contracts/ | ||
utils/=lib/utils |
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