Commit 6b4e1019 authored by Andreas Bigger's avatar Andreas Bigger

Deploy cannon's preimage oracle in the deploy script

parent 3e60c7e1
...@@ -24,6 +24,7 @@ import { ResourceMetering } from "../src/L1/ResourceMetering.sol"; ...@@ -24,6 +24,7 @@ import { ResourceMetering } from "../src/L1/ResourceMetering.sol";
import { Constants } from "../src/libraries/Constants.sol"; import { Constants } from "../src/libraries/Constants.sol";
import { DisputeGameFactory } from "../src/dispute/DisputeGameFactory.sol"; import { DisputeGameFactory } from "../src/dispute/DisputeGameFactory.sol";
import { FaultDisputeGame } from "../src/dispute/FaultDisputeGame.sol"; import { FaultDisputeGame } from "../src/dispute/FaultDisputeGame.sol";
import { PreimageOracle } from "../src/cannon/PreimageOracle.sol";
import { L1ERC721Bridge } from "../src/L1/L1ERC721Bridge.sol"; import { L1ERC721Bridge } from "../src/L1/L1ERC721Bridge.sol";
import { Predeploys } from "../src/libraries/Predeploys.sol"; import { Predeploys } from "../src/libraries/Predeploys.sol";
...@@ -79,6 +80,7 @@ contract Deploy is Deployer { ...@@ -79,6 +80,7 @@ contract Deploy is Deployer {
deployL1StandardBridge(); deployL1StandardBridge();
deployL1ERC721Bridge(); deployL1ERC721Bridge();
deployDisputeGameFactory(); deployDisputeGameFactory();
deployPreimageOracle();
transferAddressManagerOwnership(); transferAddressManagerOwnership();
...@@ -357,6 +359,18 @@ contract Deploy is Deployer { ...@@ -357,6 +359,18 @@ contract Deploy is Deployer {
return address(0); return address(0);
} }
/// @notice Deploy the PreimageOracle
function deployPreimageOracle() broadcast() public returns (address) {
if (block.chainid == 900) {
PreimageOracle preimageOracle = new PreimageOracle();
save("PreimageOracle", address(preimageOracle));
console.log("PreimageOracle deployed at %s", address(preimageOracle));
return address(preimageOracle);
}
return address(0);
}
/// @notice Deploy the SystemConfig /// @notice Deploy the SystemConfig
function deploySystemConfig() broadcast() public returns (address) { function deploySystemConfig() broadcast() public returns (address) {
bytes32 batcherHash = bytes32(uint256(uint160(cfg.batchSenderAddress()))); bytes32 batcherHash = bytes32(uint256(uint160(cfg.batchSenderAddress())));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment