diff --git a/contracts/PreConfirmations.sol b/contracts/PreConfirmations.sol index 460289f..97d9967 100644 --- a/contracts/PreConfirmations.sol +++ b/contracts/PreConfirmations.sol @@ -9,8 +9,6 @@ import {IBidderRegistry} from "./interfaces/IBidderRegistry.sol"; import {IBlockTracker} from "./interfaces/IBlockTracker.sol"; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; -import "forge-std/console.sol"; - /** * @title PreConfCommitmentStore - A contract for managing preconfirmation commitments and bids. * @notice This contract allows bidders to make precommitments and bids and provides a mechanism for the oracle to verify and process them. diff --git a/scripts/DeployScripts.s.sol b/scripts/DeployScripts.s.sol index 5a0e08c..e431b80 100644 --- a/scripts/DeployScripts.s.sol +++ b/scripts/DeployScripts.s.sol @@ -48,13 +48,16 @@ contract DeployScript is Script, Create2Deployer { // Forge deploy with salt uses create2 proxy from https://github.com/primevprotocol/deterministic-deployment-proxy bytes32 salt = 0x8989000000000000000000000000000000000000000000000000000000000000; - BidderRegistry bidderRegistry = new BidderRegistry{salt: salt}(minStake, feeRecipient, feePercent, msg.sender); + BlockTracker blockTracker = new BlockTracker{salt: salt}(msg.sender); + console.log("BlockTracker deployed to:", address(blockTracker)); + + BidderRegistry bidderRegistry = new BidderRegistry{salt: salt}(minStake, feeRecipient, feePercent, msg.sender, address(blockTracker)); console.log("BidderRegistry deployed to:", address(bidderRegistry)); ProviderRegistry providerRegistry = new ProviderRegistry{salt: salt}(minStake, feeRecipient, feePercent, msg.sender); console.log("ProviderRegistry deployed to:", address(providerRegistry)); - PreConfCommitmentStore preConfCommitmentStore = new PreConfCommitmentStore{salt: salt}(address(providerRegistry), address(bidderRegistry), feeRecipient, msg.sender); + PreConfCommitmentStore preConfCommitmentStore = new PreConfCommitmentStore{salt: salt}(address(providerRegistry), address(bidderRegistry), address(blockTracker), feeRecipient, msg.sender); console.log("PreConfCommitmentStore deployed to:", address(preConfCommitmentStore)); providerRegistry.setPreconfirmationsContract(address(preConfCommitmentStore)); @@ -63,7 +66,7 @@ contract DeployScript is Script, Create2Deployer { bidderRegistry.setPreconfirmationsContract(address(preConfCommitmentStore)); console.log("BidderRegistry updated with PreConfCommitmentStore address:", address(preConfCommitmentStore)); - Oracle oracle = new Oracle{salt: salt}(address(preConfCommitmentStore), nextRequestedBlockNumber, msg.sender); + Oracle oracle = new Oracle{salt: salt}(address(preConfCommitmentStore), address(blockTracker), msg.sender); console.log("Oracle deployed to:", address(oracle)); preConfCommitmentStore.updateOracle(address(oracle));