Skip to content

Commit

Permalink
make isCurie configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Thegaram committed Jul 10, 2024
1 parent 0d9b852 commit 0277a66
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/deterministic/DeployScroll.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ contract DeployScroll is DeterminsticDeployment {
}

function deployL1GasPriceOracle() private {
bytes memory args = abi.encode(DEPLOYER_ADDR);
bytes memory args = abi.encode(DEPLOYER_ADDR, true);
L1_GAS_PRICE_ORACLE_ADDR = deploy("L1_GAS_PRICE_ORACLE", type(L1GasPriceOracle).creationCode, args);
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/deterministic/GenerateGenesis.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ contract GenerateGenesis is DeployScroll {
}

// set code
L1GasPriceOracle _oracle = new L1GasPriceOracle(OWNER_ADDR);
L1GasPriceOracle _oracle = new L1GasPriceOracle(OWNER_ADDR, true);
vm.etch(predeployAddr, address(_oracle).code);

// set storage
Expand Down
2 changes: 1 addition & 1 deletion scripts/foundry/DeployL2BridgeContracts.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ contract DeployL2BridgeContracts is Script {
}

address owner = vm.addr(L2_DEPLOYER_PRIVATE_KEY);
oracle = new L1GasPriceOracle(owner);
oracle = new L1GasPriceOracle(owner, true);

logAddress("L1_GAS_PRICE_ORACLE_ADDR", address(oracle));
}
Expand Down
5 changes: 2 additions & 3 deletions src/L2/predeploys/L1GasPriceOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,10 @@ contract L1GasPriceOracle is OwnableBase, IL1GasPriceOracle {
* Constructor *
***************/

constructor(address _owner) {
constructor(address _owner, bool _isCurie) {
_transferOwnership(_owner);

// by default we enable Curie from genesis
isCurie = true;
isCurie = _isCurie;
}

/*************************
Expand Down
2 changes: 1 addition & 1 deletion src/test/L1GasPriceOracle.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract L1GasPriceOracleTest is DSTestPlus {

function setUp() public {
whitelist = new Whitelist(address(this));
oracle = new L1GasPriceOracle(address(this));
oracle = new L1GasPriceOracle(address(this), false);
oracle.updateWhitelist(address(whitelist));

address[] memory _accounts = new address[](1);
Expand Down
2 changes: 1 addition & 1 deletion src/test/L2GatewayTestBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ abstract contract L2GatewayTestBase is DSTestPlus {
whitelist = new Whitelist(address(this));
l1BlockContainer = new L1BlockContainer(address(this));
l2MessageQueue = new L2MessageQueue(address(this));
l1GasOracle = new L1GasPriceOracle(address(this));
l1GasOracle = new L1GasPriceOracle(address(this), false);
l2Messenger = L2ScrollMessenger(payable(_deployProxy(address(0))));

// Upgrade the L2ScrollMessenger implementation and initialize
Expand Down
2 changes: 1 addition & 1 deletion src/test/L2ScrollMessenger.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ contract L2ScrollMessengerTest is DSTestPlus {
whitelist = new Whitelist(address(this));
l1BlockContainer = new L1BlockContainer(address(this));
l2MessageQueue = new L2MessageQueue(address(this));
l1GasOracle = new L1GasPriceOracle(address(this));
l1GasOracle = new L1GasPriceOracle(address(this), false);
l2Messenger = L2ScrollMessenger(
payable(
new ERC1967Proxy(
Expand Down

0 comments on commit 0277a66

Please sign in to comment.