Skip to content

Commit

Permalink
fixed deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed Apr 5, 2024
1 parent 9222cae commit 1b68a9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions contracts/PreConfirmations.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 6 additions & 3 deletions scripts/DeployScripts.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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));
Expand Down

0 comments on commit 1b68a9c

Please sign in to comment.