diff --git a/script/DeployAuctionFactory.sol b/script/DeployAuctionFactory.sol index fbd2ed0..599398f 100644 --- a/script/DeployAuctionFactory.sol +++ b/script/DeployAuctionFactory.sol @@ -18,7 +18,7 @@ contract DeployAuctionFactory is Script { // Pick an unique salt bytes32 salt = keccak256("Auction Factory"); - address contractAddress = deployer.deployCreate2(salt, bytecode); + address contractAddress = deployer.deployCreate3(salt, bytecode); console.log("Address is ", contractAddress); @@ -29,7 +29,7 @@ contract DeployAuctionFactory is Script { interface Deployer { event ContractCreation(address indexed newContract, bytes32 indexed salt); - function deployCreate2( + function deployCreate3( bytes32 salt, bytes memory initCode ) external payable returns (address newContract); diff --git a/src/Auctions/Auction.sol b/src/Auctions/Auction.sol index 0cf6815..572d746 100644 --- a/src/Auctions/Auction.sol +++ b/src/Auctions/Auction.sol @@ -198,7 +198,7 @@ contract Auction is Governance, ReentrancyGuard { virtual returns (bool, bool, bool, bool) { - Hook memory _hook; + Hook memory _hook = hook_; return (_hook.kickable, _hook.kick, _hook.preTake, _hook.postTake); } diff --git a/src/swappers/AuctionSwapper.sol b/src/swappers/AuctionSwapper.sol index 4040df6..682a740 100644 --- a/src/swappers/AuctionSwapper.sol +++ b/src/swappers/AuctionSwapper.sol @@ -43,7 +43,7 @@ contract AuctionSwapper { /// @notice The pre-deployed Auction factory for cloning. address public constant auctionFactory = - 0x4A14145C4977E18c719BB70E6FcBF8fBFF6F62d2; + 0xE6aB098E8582178A76DC80d55ca304d1Dec11AD8; /// @notice Address of the specific Auction this strategy uses. address public auction; diff --git a/src/test/AuctionSwapper.t.sol b/src/test/AuctionSwapper.t.sol index 9b6c057..8b40339 100644 --- a/src/test/AuctionSwapper.t.sol +++ b/src/test/AuctionSwapper.t.sol @@ -79,6 +79,13 @@ contract AuctionSwapperTest is Setup { assertEq(_to, address(asset)); assertEq(_kicked, 0); assertEq(_available, 0); + assertEq(auction.hook(), address(swapper)); + (bool hook1, bool hook2, bool hook3, bool hook4) = auction + .getHookFlags(); + assertTrue(hook1); + assertTrue(hook2); + assertTrue(hook3); + assertTrue(hook4); // Kicking it reverts vm.expectRevert("nothing to kick");