-
Notifications
You must be signed in to change notification settings - Fork 36
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 #128 from worldcoin/dcbuild3r/add-devnet-deployment
add devnet deployment
- Loading branch information
Showing
6 changed files
with
188 additions
and
48 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
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
51 changes: 51 additions & 0 deletions
51
src/script/deploy/op-stack/optimism/DeployOptimismStateBridgeDevnet.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.15; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
import {OpStateBridge} from "src/OpStateBridge.sol"; | ||
|
||
/// @title Deploy State Bridge Optimism | ||
/// @notice forge script to deploy OpStateBridge.sol on Ethereum mainnet | ||
/// @author Worldcoin | ||
contract DeployOpStateBridgeDevnet is Script { | ||
OpStateBridge public bridge; | ||
|
||
address public opWorldIDAddress; | ||
address public worldIDIdentityManagerAddress; | ||
address public opCrossDomainMessengerAddress; | ||
|
||
/////////////////////////////////////////////////////////////////// | ||
/// CONFIG /// | ||
/////////////////////////////////////////////////////////////////// | ||
string public root = vm.projectRoot(); | ||
string public path = string.concat(root, "/src/script/.deploy-config.json"); | ||
string public json = vm.readFile(path); | ||
|
||
uint256 public privateKey = abi.decode(vm.parseJson(json, ".privateKey"), (uint256)); | ||
|
||
function setUp() public { | ||
/////////////////////////////////////////////////////////////////// | ||
/// OPTIMISM /// | ||
/////////////////////////////////////////////////////////////////// | ||
opCrossDomainMessengerAddress = address(0x7E75b00FfBF0a4295ab7112F04Fd8255334194BD); | ||
|
||
/////////////////////////////////////////////////////////////////// | ||
/// WORLD ID /// | ||
/////////////////////////////////////////////////////////////////// | ||
worldIDIdentityManagerAddress = | ||
abi.decode(vm.parseJson(json, ".worldIDIdentityManagerAddress"), (address)); | ||
opWorldIDAddress = abi.decode(vm.parseJson(json, ".optimismWorldIDAddress"), (address)); | ||
} | ||
|
||
function run() public { | ||
vm.startBroadcast(privateKey); | ||
|
||
bridge = new OpStateBridge ( | ||
worldIDIdentityManagerAddress, | ||
opWorldIDAddress, | ||
opCrossDomainMessengerAddress | ||
); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
Oops, something went wrong.