Skip to content

Commit

Permalink
feat: add v2 deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
marktoda committed Mar 19, 2024
1 parent abd7a0b commit 28fcfa5
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions script/DeployDutchV2.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.13;

import "forge-std/console2.sol";
import "forge-std/Script.sol";
import {IPermit2} from "permit2/src/interfaces/IPermit2.sol";
import {V2DutchOrderReactor} from "../src/reactors/V2DutchOrderReactor.sol";

struct V2DutchOrderDeployment {
IPermit2 permit2;
V2DutchOrderReactor reactor;
}

contract DeployDutchV2 is Script {
address constant PERMIT2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;

function setUp() public {}

function run() public returns (V2DutchOrderDeployment memory deployment) {
address owner = vm.envAddress("FOUNDRY_REACTOR_OWNER");
vm.startBroadcast();

V2DutchOrderReactor reactor = new V2DutchOrderReactor{salt: 0x00}(IPermit2(PERMIT2), owner);
console2.log("Reactor", address(reactor));

vm.stopBroadcast();

return V2DutchOrderDeployment(IPermit2(PERMIT2), reactor);
}
}

0 comments on commit 28fcfa5

Please sign in to comment.