Skip to content

Commit

Permalink
feat: update deploy script (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
xorsal authored Nov 20, 2024
1 parent e1cacd7 commit bec0aa3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ import {
IBondEscalationAccounting
} from '@defi-wonderland/prophet-modules/solidity/interfaces/extensions/IBondEscalationAccounting.sol';
import {IERC20} from '@openzeppelin/contracts/interfaces/IERC20.sol';
import {IEpochManager} from 'interfaces/external/IEpochManager.sol';
import {IHorizonStaking} from 'interfaces/external/IHorizonStaking.sol';

import {Arbitrable, IArbitrable} from 'contracts/Arbitrable.sol';
import {CouncilArbitrator, ICouncilArbitrator} from 'contracts/CouncilArbitrator.sol';
import {IEpochManager} from 'interfaces/external/IEpochManager.sol';
import {IHorizonStaking} from 'interfaces/external/IHorizonStaking.sol';

import {EBOAccessModule, IEBOAccessModule} from 'contracts/EBOAccessModule.sol';
import {EBOFinalityModule, IEBOFinalityModule} from 'contracts/EBOFinalityModule.sol';
import {EBORequestCreator, IEBORequestCreator} from 'contracts/EBORequestCreator.sol';
import {EBORequestModule, IEBORequestModule} from 'contracts/EBORequestModule.sol';
Expand All @@ -42,7 +44,7 @@ import {
import 'forge-std/Script.sol';

contract Deploy is Script {
uint256 public constant DEPLOYMENT_COUNT = 10;
uint256 public constant DEPLOYMENT_COUNT = 11;
uint256 public constant OFFSET_EBO_REQUEST_CREATOR = DEPLOYMENT_COUNT - 1;

// Oracle
Expand All @@ -54,6 +56,7 @@ contract Deploy is Script {
IBondEscalationModule public bondEscalationModule;
IArbitratorModule public arbitratorModule;
IEBOFinalityModule public eboFinalityModule;
IEBOAccessModule public eboAccessModule;

// Extensions
IHorizonAccountingExtension public horizonAccountingExtension;
Expand Down Expand Up @@ -155,6 +158,10 @@ contract Deploy is Script {
councilArbitrator = new CouncilArbitrator(arbitratorModule, arbitrable);
console.log('`CouncilArbitrator` deployed at:', address(councilArbitrator));

// Deploy `EBOAccessModule`
eboAccessModule = new EBOAccessModule(oracle, arbitrable, horizonAccountingExtension);
console.log('`EBOAccessModule` deployed at:', address(eboAccessModule));

// Deploy `EBORequestCreator`
IOracle.Request memory _requestData = _instantiateRequestData();
eboRequestCreator = new EBORequestCreator(oracle, epochManager, arbitrable, _requestData);
Expand All @@ -173,8 +180,7 @@ contract Deploy is Script {
// Set requester and modules

_requestData.requester = address(eboRequestCreator);
// todo : replace with HorizonOperatorAccessModule
_requestData.accessModule = address(0);
_requestData.accessModule = address(eboAccessModule);
_requestData.requestModule = address(eboRequestModule);
_requestData.responseModule = address(bondedResponseModule);
_requestData.disputeModule = address(bondEscalationModule);
Expand Down
1 change: 1 addition & 0 deletions test/unit/Deploy.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ contract UnitDeploy is Test {
_requestData.nonce = 0;

_requestData.requester = address(deploy.eboRequestCreator());
_requestData.accessModule = address(deploy.eboAccessModule());
_requestData.requestModule = address(deploy.eboRequestModule());
_requestData.responseModule = address(deploy.bondedResponseModule());
_requestData.disputeModule = address(deploy.bondEscalationModule());
Expand Down

0 comments on commit bec0aa3

Please sign in to comment.