-
Notifications
You must be signed in to change notification settings - Fork 28
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
Deploy: blast SynapseRouter
with verification
#319
Merged
ChiTimesChi
merged 6 commits into
master
from
deploy/blast-synapse-router-with-verification
Mar 29, 2024
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6b954f1
Expose callback for deploying solc-generated bytecode
ChiTimesChi 48d8815
Fix the RouterV1 script to use the solc-generated bytecode
ChiTimesChi ac6684b
Prep for redeployment
ChiTimesChi c45bdf2
SynapseRouter create2 script for Blast
ChiTimesChi 3c7706d
Deploy and verify on Blast
ChiTimesChi 35dc24f
Upd Router config
ChiTimesChi 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 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
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 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.17; | ||
|
||
import {BasicSynapseScript, console2} from "../templates/BasicSynapse.s.sol"; | ||
|
||
contract DeployRouterV1CREATE2 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: "SynapseRouter", | ||
constructorArgs: getConstructorArgs(), | ||
deployCode: deploySolcGeneratedCreate2 | ||
}); | ||
vm.stopBroadcast(); | ||
} | ||
|
||
function getConstructorArgs() internal returns (bytes memory constructorArgs) { | ||
address bridge = getDeploymentAddress("SynapseBridge"); | ||
address owner = vm.envAddress("OWNER_ADDR"); | ||
constructorArgs = abi.encode(bridge, owner); | ||
} | ||
} |
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,11 @@ | ||
#!/usr/bin/env bash | ||
# This script will deploy SynapseRouter and its auxilary contracts on the given chain. | ||
# Deployment address on every chain will depend on the deployer address initial nonce. | ||
# Existing deployments will be reused rather than overwritten. | ||
|
||
# Usage: ./script/router/deploy-router.sh <chainName> <walletName> [<options...>] | ||
|
||
# Temp fix until Foundry bytecode matches solc bytecode EXACTLY | ||
./script/sh/solc.sh SynapseRouter | ||
# Pass the full list of arguments to the run script | ||
./script/run.sh ./script/router/DeployRouterV1.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
2 changes: 1 addition & 1 deletion
2
script/bytecode/SynapseRouter.json → script/solc/SynapseRouter.json
Large diffs are not rendered by default.
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
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.
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.
The script's purpose is clearly stated, and the usage message is helpful. However, ensure that the directory
./script/solc/
is created before attempting to save bytecode files to it, as the script does not currently check for or create the directory if it does not exist.