-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: FBRv2 deploy, configure scripts
- Loading branch information
1 parent
112873d
commit 9de0434
Showing
4 changed files
with
62 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
# This script runs an RFQ script for all chains with FastBridge deployment | ||
# Usage: ./script/rfq-run.sh pathToScript <args...> | ||
# - ./script/run.sh pathToScript chain <args...> will be run for all RFQ chains | ||
|
||
# Colors | ||
RED="\033[0;31m" | ||
NC="\033[0m" # No Color | ||
|
||
scriptFN=$1 | ||
# Get the rest of the args | ||
shift 1 | ||
# Check that all required args exist | ||
if [ -z "$scriptFN" ]; then | ||
echo -e "${RED}Usage: ./script/rfq-run.sh pathToScript <args...>${NC}" | ||
exit 1 | ||
fi | ||
|
||
# Find all FastBridge.json files in ./deployments | ||
fastBridgeDeployments=$(find ./deployments -name FastBridge.json) | ||
# Extract chain name from the list of filenames, sort alphabetically | ||
chainNames=$(echo "$fastBridgeDeployments" | sed 's/.*\/\(.*\)\/FastBridge.json/\1/' | sort) | ||
|
||
for chainName in $chainNames; do | ||
./script/run.sh "$scriptFN" "$chainName" "$@" | ||
done |
24 changes: 11 additions & 13 deletions
24
script/rfq/ConfigureFastBridgeRouter.t.sol → script/rfq/ConfigureFastBridgeRouterV2.s.sol
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,20 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.17; | ||
|
||
import {BasicSynapseScript} from "../templates/BasicSynapse.s.sol"; | ||
|
||
contract DeployFastBridgeRouter is BasicSynapseScript { | ||
function run() external { | ||
// Setup the BasicSynapseScript | ||
setUp(); | ||
vm.startBroadcast(); | ||
// Use `deployCreate2` as callback to deploy the contract with CREATE2 | ||
// This will load deployment salt from the pre-saved list, if there's an entry for the contract | ||
deployAndSave({ | ||
contractName: "FastBridgeRouterV2", | ||
constructorArgs: abi.encode(msg.sender), | ||
deployCode: deployCreate2 | ||
}); | ||
vm.stopBroadcast(); | ||
} | ||
} |