-
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.
- Loading branch information
1 parent
8324cb3
commit ff620c8
Showing
3 changed files
with
59 additions
and
7 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,33 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.17; | ||
|
||
import {FastBridgeRouter} from "../../contracts/rfq/FastBridgeRouter.sol"; | ||
|
||
import {BasicSynapseScript} from "../templates/BasicSynapse.s.sol"; | ||
|
||
contract BrickFastBridgeRouter is BasicSynapseScript { | ||
FastBridgeRouter public router; | ||
|
||
function setUp() internal override { | ||
super.setUp(); | ||
address payable routerDeployment = payable(getDeploymentAddress("FastBridgeRouter")); | ||
router = FastBridgeRouter(routerDeployment); | ||
} | ||
|
||
function run() external { | ||
// Setup the BasicSynapseScript | ||
setUp(); | ||
vm.startBroadcast(); | ||
brickFastBridgeRouter(); | ||
vm.stopBroadcast(); | ||
} | ||
|
||
function brickFastBridgeRouter() internal { | ||
if (router.fastBridge() != address(0)) { | ||
router.setFastBridge(address(0)); | ||
printLog(string.concat(unicode"✅ Fast bridge set to zero")); | ||
} else { | ||
printLog(string.concat(unicode"🟡 Skipping: Fast bridge is already set to zero")); | ||
} | ||
} | ||
} |
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,19 @@ | ||
#!/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 | ||
|
||
./script/rfq/rfq-cmd.sh "./script/run.sh $scriptFN" "$@" |