-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from OlympusDAO/develop
Release: Berachain, YRF 1.2
- Loading branch information
Showing
50 changed files
with
2,593 additions
and
564 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CHAIN= | ||
RPC_URL= | ||
ETHERSCAN_KEY= | ||
VERIFIER_URL= |
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,3 @@ | ||
{ | ||
"YieldRepurchaseFacility": "0x271e35a8555a62F6bA76508E85dfD76D580B0692" | ||
} |
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,66 @@ | ||
#!/bin/bash | ||
|
||
# Deploys an L2 installation of the Olympus protocol. | ||
# | ||
# Usage: | ||
# ./deploy.sh --account <cast wallet> --broadcast <false> --verify <false> --resume <false> --env <env-file> | ||
# | ||
# Environment variables: | ||
# RPC_URL | ||
# CHAIN | ||
# ETHERSCAN_KEY (only needed if verify is true) | ||
# VERIFIER_URL (only needed for a custom verifier or on a fork) | ||
|
||
# Exit if any error occurs | ||
set -e | ||
|
||
# Load named arguments | ||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
source $SCRIPT_DIR/../lib/arguments.sh | ||
load_named_args "$@" | ||
|
||
# Load environment variables | ||
load_env | ||
|
||
# Set sane defaults | ||
BROADCAST=${broadcast:-false} | ||
VERIFY=${verify:-false} | ||
RESUME=${resume:-false} | ||
|
||
# Validate named arguments | ||
echo "" | ||
echo "Validating arguments" | ||
validate_text "$account" "No account specified. Provide the cast wallet after the --account flag." | ||
|
||
# Validate environment variables | ||
echo "" | ||
echo "Validating environment variables" | ||
validate_text "$CHAIN" "No chain specified. Specify the CHAIN in the $ENV_FILE file." | ||
validate_text "$RPC_URL" "No RPC URL specified. Specify the RPC_URL in the $ENV_FILE file." | ||
|
||
echo "" | ||
echo "Summary:" | ||
echo " Deploying from account: $account" | ||
echo " Chain: $CHAIN" | ||
echo " Using RPC at URL: $RPC_URL" | ||
|
||
# Validate and set forge script flags | ||
source $SCRIPT_DIR/../lib/forge.sh | ||
set_broadcast_flag $BROADCAST | ||
set_verify_flag $VERIFY $ETHERSCAN_KEY $VERIFIER_URL | ||
set_resume_flag $RESUME | ||
set_account_address $account | ||
|
||
# Deploy using script | ||
echo "" | ||
echo "Running forge script" | ||
forge script ./src/scripts/deploy/L2Deploy.s.sol:L2Deploy \ | ||
--sig "deploy(string)()" $CHAIN \ | ||
--rpc-url $RPC_URL --account $account --slow -vvv \ | ||
--sender $ACCOUNT_ADDRESS \ | ||
$BROADCAST_FLAG \ | ||
$VERIFY_FLAG \ | ||
$RESUME_FLAG | ||
|
||
echo "" | ||
echo "Deployment complete" |
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,58 @@ | ||
#!/bin/bash | ||
|
||
# Grants roles. | ||
# | ||
# Usage: | ||
# ./grantRoles.sh --account <cast wallet> --broadcast <false> --env <env-file> | ||
# | ||
# Environment variables: | ||
# RPC_URL | ||
# CHAIN | ||
|
||
# Exit if any error occurs | ||
set -e | ||
|
||
# Load named arguments | ||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
source $SCRIPT_DIR/../lib/arguments.sh | ||
load_named_args "$@" | ||
|
||
# Load environment variables | ||
load_env | ||
|
||
# Set sane defaults | ||
BROADCAST=${broadcast:-false} | ||
|
||
# Validate named arguments | ||
echo "" | ||
echo "Validating arguments" | ||
validate_text "$account" "No account specified. Provide the cast wallet after the --account flag." | ||
|
||
# Validate environment variables | ||
echo "" | ||
echo "Validating environment variables" | ||
validate_text "$CHAIN" "No chain specified. Specify the CHAIN in the $ENV_FILE file." | ||
validate_text "$RPC_URL" "No RPC URL specified. Specify the RPC_URL in the $ENV_FILE file." | ||
|
||
echo "" | ||
echo "Summary:" | ||
echo " Account: $account" | ||
echo " Chain: $CHAIN" | ||
echo " Using RPC at URL: $RPC_URL" | ||
|
||
# Validate and set forge script flags | ||
source $SCRIPT_DIR/../lib/forge.sh | ||
set_broadcast_flag $BROADCAST | ||
set_account_address $account | ||
|
||
# Deploy using script | ||
echo "" | ||
echo "Running forge script" | ||
forge script ./src/scripts/deploy/L2Deploy.s.sol:L2Deploy \ | ||
--sig "grantRoles(string)()" $CHAIN \ | ||
--rpc-url $RPC_URL --account $account --slow -vvv \ | ||
--sender $ACCOUNT_ADDRESS \ | ||
$BROADCAST_FLAG | ||
|
||
echo "" | ||
echo "Grant roles complete" |
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,61 @@ | ||
#!/bin/bash | ||
|
||
# Transfers the ownership of the Bophades installation to the DAO multisig. | ||
# | ||
# Usage: | ||
# ./handoff.sh --account <cast wallet> --broadcast <false> --resume <false> --env <env-file> | ||
# | ||
# Environment variables: | ||
# RPC_URL | ||
# CHAIN | ||
|
||
# Exit if any error occurs | ||
set -e | ||
|
||
# Load named arguments | ||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
source $SCRIPT_DIR/../lib/arguments.sh | ||
load_named_args "$@" | ||
|
||
# Load environment variables | ||
load_env | ||
|
||
# Set sane defaults | ||
BROADCAST=${broadcast:-false} | ||
RESUME=${resume:-false} | ||
|
||
# Validate named arguments | ||
echo "" | ||
echo "Validating arguments" | ||
validate_text "$account" "No account specified. Provide the cast wallet after the --account flag." | ||
|
||
# Validate environment variables | ||
echo "" | ||
echo "Validating environment variables" | ||
validate_text "$RPC_URL" "No RPC URL specified. Specify the RPC_URL in the $ENV_FILE file." | ||
validate_text "$CHAIN" "No chain specified. Specify the CHAIN in the $ENV_FILE file." | ||
|
||
echo "" | ||
echo "Summary:" | ||
echo " Deploying from account: $account" | ||
echo " Chain: $CHAIN" | ||
echo " Using RPC at URL: $RPC_URL" | ||
|
||
# Validate and set forge script flags | ||
source $SCRIPT_DIR/../lib/forge.sh | ||
set_broadcast_flag $BROADCAST | ||
set_resume_flag $RESUME | ||
set_account_address $account | ||
|
||
# Deploy using script | ||
echo "" | ||
echo "Running forge script" | ||
forge script ./src/scripts/deploy/L2Deploy.s.sol:L2Deploy \ | ||
--sig "handoffToMultisig(string)()" $CHAIN \ | ||
--rpc-url $RPC_URL --account $account --slow -vvv \ | ||
--sender $ACCOUNT_ADDRESS \ | ||
$BROADCAST_FLAG \ | ||
$RESUME_FLAG | ||
|
||
echo "" | ||
echo "Handoff complete" |
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,62 @@ | ||
#!/bin/bash | ||
|
||
# Sets up the bridge for a chain to trust messages from another chain. | ||
# | ||
# Usage: | ||
# ./setupBridge.sh --account <cast wallet> --localChain <chain> --remoteChain <chain> --broadcast <false> --resume <false> --env <env-file> | ||
# | ||
# Environment variables: | ||
# RPC_URL | ||
|
||
# Exit if any error occurs | ||
set -e | ||
|
||
# Load named arguments | ||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
source $SCRIPT_DIR/../lib/arguments.sh | ||
load_named_args "$@" | ||
|
||
# Load environment variables | ||
load_env | ||
|
||
# Set sane defaults | ||
BROADCAST=${broadcast:-false} | ||
RESUME=${resume:-false} | ||
|
||
# Validate named arguments | ||
echo "" | ||
echo "Validating arguments" | ||
validate_text "$account" "No account specified. Provide the cast wallet after the --account flag." | ||
validate_text "$localChain" "No local chain specified. Specify the localChain after the --localChain flag." | ||
validate_text "$remoteChain" "No remote chain specified. Specify the remoteChain after the --remoteChain flag." | ||
|
||
# Validate environment variables | ||
echo "" | ||
echo "Validating environment variables" | ||
validate_text "$RPC_URL" "No RPC URL specified. Specify the RPC_URL in the $ENV_FILE file." | ||
|
||
echo "" | ||
echo "Summary:" | ||
echo " Deploying from account: $account" | ||
echo " Local chain: $localChain" | ||
echo " Remote chain: $remoteChain" | ||
echo " Using RPC at URL: $RPC_URL" | ||
|
||
# Validate and set forge script flags | ||
source $SCRIPT_DIR/../lib/forge.sh | ||
set_broadcast_flag $BROADCAST | ||
set_resume_flag $RESUME | ||
set_account_address $account | ||
|
||
# Deploy using script | ||
echo "" | ||
echo "Running forge script" | ||
forge script ./src/scripts/deploy/L2Deploy.s.sol:L2Deploy \ | ||
--sig "setupBridge(string,string)()" $localChain $remoteChain \ | ||
--rpc-url $RPC_URL --account $account --slow -vvv \ | ||
--sender $ACCOUNT_ADDRESS \ | ||
$BROADCAST_FLAG \ | ||
$RESUME_FLAG | ||
|
||
echo "" | ||
echo "Setup complete" |
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,29 @@ | ||
#!/bin/bash | ||
|
||
# Verifies the deployment. | ||
# | ||
# Usage: | ||
# ./verify.sh --env <env-file> | ||
# | ||
# Environment variables: | ||
# RPC_URL | ||
# CHAIN | ||
|
||
# Exit if any error occurs | ||
set -e | ||
|
||
# Deploy using script | ||
echo "" | ||
echo "Checking Berachain" | ||
forge script ./src/scripts/deploy/L2Deploy.s.sol:L2Deploy \ | ||
--sig "verifyBerachain(string)()" "berachain" \ | ||
--rpc-url "https://rpc.berachain.com" --slow -vvv | ||
|
||
echo "" | ||
echo "Checking Mainnet" | ||
forge script ./src/scripts/deploy/L2Deploy.s.sol:L2Deploy \ | ||
--sig "verifyMainnet(string)()" "mainnet" \ | ||
--rpc-url "https://eth.llamarpc.com" --slow -vvv | ||
|
||
echo "" | ||
echo "Verification complete" |
Oops, something went wrong.