From 55fbe027da4dba5deb6a2d1aab343d0ca19a7b40 Mon Sep 17 00:00:00 2001 From: 0xOsiris Date: Wed, 20 Sep 2023 13:19:42 -0500 Subject: [PATCH] add base deployment script --- src/deploy/DeployBaseAggregator.s.sol | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/deploy/DeployBaseAggregator.s.sol diff --git a/src/deploy/DeployBaseAggregator.s.sol b/src/deploy/DeployBaseAggregator.s.sol new file mode 100644 index 0000000..59b6623 --- /dev/null +++ b/src/deploy/DeployBaseAggregator.s.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity =0.8.21; + +import {Script} from "../../lib/forge-std/src/Script.sol"; +import {ConveyorRouterV1} from "../ConveyorRouterV1.sol"; +import {ICREATE3Factory} from "../../lib/create3-factory/src/ICREATE3Factory.sol"; + +contract Deploy is Script { + ///@dev Base Constructor Constants + address constant WETH = 0x4200000000000000000000000000000000000006; + + function run() public returns (address conveyorRouterV1) { + bytes32 salt = bytes32("0x8fbb158"); + bytes memory creationCode = abi.encodePacked(type(ConveyorRouterV1).creationCode, abi.encode(WETH)); + + vm.startBroadcast(); + conveyorRouterV1 = ICREATE3Factory(0x93FEC2C00BfE902F733B57c5a6CeeD7CD1384AE1).deploy(salt, creationCode); + vm.stopBroadcast(); + } +}