Commit c898ed14 authored by Maurelian's avatar Maurelian Committed by GitHub

feat: remove _allowUpgrade flag from game impl setters in deploy script (#13087)

parent b707cd8e
...@@ -456,9 +456,9 @@ contract Deploy is Deployer { ...@@ -456,9 +456,9 @@ contract Deploy is Deployer {
_data: abi.encodeCall(IDelayedWETH.initialize, (msg.sender, ISuperchainConfig(superchainConfigProxy))) _data: abi.encodeCall(IDelayedWETH.initialize, (msg.sender, ISuperchainConfig(superchainConfigProxy)))
}); });
setAlphabetFaultGameImplementation({ _allowUpgrade: false }); setAlphabetFaultGameImplementation();
setFastFaultGameImplementation({ _allowUpgrade: false }); setFastFaultGameImplementation();
setCannonFaultGameImplementation({ _allowUpgrade: false }); setCannonFaultGameImplementation();
transferDisputeGameFactoryOwnership(); transferDisputeGameFactoryOwnership();
transferDelayedWETHOwnership(); transferDelayedWETHOwnership();
...@@ -875,7 +875,7 @@ contract Deploy is Deployer { ...@@ -875,7 +875,7 @@ contract Deploy is Deployer {
} }
/// @notice Sets the implementation for the `CANNON` game type in the `DisputeGameFactory` /// @notice Sets the implementation for the `CANNON` game type in the `DisputeGameFactory`
function setCannonFaultGameImplementation(bool _allowUpgrade) public broadcast { function setCannonFaultGameImplementation() public broadcast {
console.log("Setting Cannon FaultDisputeGame implementation"); console.log("Setting Cannon FaultDisputeGame implementation");
IDisputeGameFactory factory = IDisputeGameFactory(mustGetAddress("DisputeGameFactoryProxy")); IDisputeGameFactory factory = IDisputeGameFactory(mustGetAddress("DisputeGameFactoryProxy"));
IDelayedWETH weth = IDelayedWETH(mustGetAddress("DelayedWETHProxy")); IDelayedWETH weth = IDelayedWETH(mustGetAddress("DelayedWETHProxy"));
...@@ -883,7 +883,6 @@ contract Deploy is Deployer { ...@@ -883,7 +883,6 @@ contract Deploy is Deployer {
// Set the Cannon FaultDisputeGame implementation in the factory. // Set the Cannon FaultDisputeGame implementation in the factory.
_setFaultGameImplementation({ _setFaultGameImplementation({
_factory: factory, _factory: factory,
_allowUpgrade: _allowUpgrade,
_params: FaultDisputeGameParams({ _params: FaultDisputeGameParams({
anchorStateRegistry: IAnchorStateRegistry(mustGetAddress("AnchorStateRegistryProxy")), anchorStateRegistry: IAnchorStateRegistry(mustGetAddress("AnchorStateRegistryProxy")),
weth: weth, weth: weth,
...@@ -897,7 +896,7 @@ contract Deploy is Deployer { ...@@ -897,7 +896,7 @@ contract Deploy is Deployer {
} }
/// @notice Sets the implementation for the `ALPHABET` game type in the `DisputeGameFactory` /// @notice Sets the implementation for the `ALPHABET` game type in the `DisputeGameFactory`
function setAlphabetFaultGameImplementation(bool _allowUpgrade) public onlyDevnet broadcast { function setAlphabetFaultGameImplementation() public onlyDevnet broadcast {
console.log("Setting Alphabet FaultDisputeGame implementation"); console.log("Setting Alphabet FaultDisputeGame implementation");
IDisputeGameFactory factory = IDisputeGameFactory(mustGetAddress("DisputeGameFactoryProxy")); IDisputeGameFactory factory = IDisputeGameFactory(mustGetAddress("DisputeGameFactoryProxy"));
IDelayedWETH weth = IDelayedWETH(mustGetAddress("DelayedWETHProxy")); IDelayedWETH weth = IDelayedWETH(mustGetAddress("DelayedWETHProxy"));
...@@ -905,7 +904,6 @@ contract Deploy is Deployer { ...@@ -905,7 +904,6 @@ contract Deploy is Deployer {
Claim outputAbsolutePrestate = Claim.wrap(bytes32(cfg.faultGameAbsolutePrestate())); Claim outputAbsolutePrestate = Claim.wrap(bytes32(cfg.faultGameAbsolutePrestate()));
_setFaultGameImplementation({ _setFaultGameImplementation({
_factory: factory, _factory: factory,
_allowUpgrade: _allowUpgrade,
_params: FaultDisputeGameParams({ _params: FaultDisputeGameParams({
anchorStateRegistry: IAnchorStateRegistry(mustGetAddress("AnchorStateRegistryProxy")), anchorStateRegistry: IAnchorStateRegistry(mustGetAddress("AnchorStateRegistryProxy")),
weth: weth, weth: weth,
...@@ -920,7 +918,7 @@ contract Deploy is Deployer { ...@@ -920,7 +918,7 @@ contract Deploy is Deployer {
} }
/// @notice Sets the implementation for the `ALPHABET` game type in the `DisputeGameFactory` /// @notice Sets the implementation for the `ALPHABET` game type in the `DisputeGameFactory`
function setFastFaultGameImplementation(bool _allowUpgrade) public onlyDevnet broadcast { function setFastFaultGameImplementation() public onlyDevnet broadcast {
console.log("Setting Fast FaultDisputeGame implementation"); console.log("Setting Fast FaultDisputeGame implementation");
IDisputeGameFactory factory = IDisputeGameFactory(mustGetAddress("DisputeGameFactoryProxy")); IDisputeGameFactory factory = IDisputeGameFactory(mustGetAddress("DisputeGameFactoryProxy"));
IDelayedWETH weth = IDelayedWETH(mustGetAddress("DelayedWETHProxy")); IDelayedWETH weth = IDelayedWETH(mustGetAddress("DelayedWETHProxy"));
...@@ -939,7 +937,6 @@ contract Deploy is Deployer { ...@@ -939,7 +937,6 @@ contract Deploy is Deployer {
); );
_setFaultGameImplementation({ _setFaultGameImplementation({
_factory: factory, _factory: factory,
_allowUpgrade: _allowUpgrade,
_params: FaultDisputeGameParams({ _params: FaultDisputeGameParams({
anchorStateRegistry: IAnchorStateRegistry(mustGetAddress("AnchorStateRegistryProxy")), anchorStateRegistry: IAnchorStateRegistry(mustGetAddress("AnchorStateRegistryProxy")),
weth: weth, weth: weth,
...@@ -956,12 +953,11 @@ contract Deploy is Deployer { ...@@ -956,12 +953,11 @@ contract Deploy is Deployer {
/// @notice Sets the implementation for the given fault game type in the `DisputeGameFactory`. /// @notice Sets the implementation for the given fault game type in the `DisputeGameFactory`.
function _setFaultGameImplementation( function _setFaultGameImplementation(
IDisputeGameFactory _factory, IDisputeGameFactory _factory,
bool _allowUpgrade,
FaultDisputeGameParams memory _params FaultDisputeGameParams memory _params
) )
internal internal
{ {
if (address(_factory.gameImpls(_params.gameType)) != address(0) && !_allowUpgrade) { if (address(_factory.gameImpls(_params.gameType)) != address(0)) {
console.log( console.log(
"[WARN] DisputeGameFactoryProxy: `FaultDisputeGame` implementation already set for game type: %s", "[WARN] DisputeGameFactoryProxy: `FaultDisputeGame` implementation already set for game type: %s",
vm.toString(GameType.unwrap(_params.gameType)) vm.toString(GameType.unwrap(_params.gameType))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment