Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
prateek105 committed Aug 13, 2024
1 parent 513c9b0 commit 3e2868c
Show file tree
Hide file tree
Showing 34 changed files with 338 additions and 903 deletions.
19 changes: 4 additions & 15 deletions script/DeployGovernorBravo.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ contract DeployGovernorBravo is MultisigProposal {
Timelock timelock = new Timelock(deployer, 1);

// Add PROTOCOL_TIMELOCK_BRAVO address
addresses.addAddress(
"PROTOCOL_TIMELOCK_BRAVO",
address(timelock),
true
);
addresses.addAddress("PROTOCOL_TIMELOCK_BRAVO", address(timelock), true);
}

if (!addresses.isAddressSet("PROTOCOL_GOVERNANCE_TOKEN")) {
Expand All @@ -41,11 +37,7 @@ contract DeployGovernorBravo is MultisigProposal {
govToken.mint(deployer, 1e21);

// Add PROTOCOL_GOVERNANCE_TOKEN address
addresses.addAddress(
"PROTOCOL_GOVERNANCE_TOKEN",
address(govToken),
true
);
addresses.addAddress("PROTOCOL_GOVERNANCE_TOKEN", address(govToken), true);
}

if (!addresses.isAddressSet("PROTOCOL_GOVERNOR")) {
Expand All @@ -71,10 +63,7 @@ contract DeployGovernorBravo is MultisigProposal {
addresses.getAddress("PROTOCOL_TIMELOCK_BRAVO"),
0,
"",
abi.encodeWithSignature(
"setPendingAdmin(address)",
addresses.getAddress("PROTOCOL_GOVERNOR")
),
abi.encodeWithSignature("setPendingAdmin(address)", addresses.getAddress("PROTOCOL_GOVERNOR")),
block.timestamp + 180
);

Expand All @@ -93,4 +82,4 @@ contract DeployGovernorBravo is MultisigProposal {
// ensure governance token is minted to deployer address
assertEq(govToken.balanceOf(addresses.getAddress("DEPLOYER_EOA")), 1e21);
}
}
}
4 changes: 3 additions & 1 deletion script/DeployOZGovernor.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ contract DeployOZGovernor is MultisigProposal {
}

// add propose and execute role for governor
TimelockController(payable(addresses.getAddress("OZ_GOVERNOR_TIMELOCK"))).grantRole(keccak256("PROPOSER_ROLE"), addresses.getAddress("OZ_GOVERNOR"));
TimelockController(payable(addresses.getAddress("OZ_GOVERNOR_TIMELOCK"))).grantRole(
keccak256("PROPOSER_ROLE"), addresses.getAddress("OZ_GOVERNOR")
);

addresses.printJSONChanges();
}
Expand Down
17 changes: 4 additions & 13 deletions script/DeployTimelock.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,12 @@ contract DeployTimelock is MultisigProposal {
executors[0] = dev;

// Deploy a new TimelockController
TimelockController timelockController = new TimelockController(
60,
proposers,
executors,
address(0)
);
TimelockController timelockController = new TimelockController(60, proposers, executors, address(0));

// Add PROTOCOL_TIMELOCK address
addresses.addAddress(
"PROTOCOL_TIMELOCK",
address(timelockController),
true
);
addresses.addAddress("PROTOCOL_TIMELOCK", address(timelockController), true);
}

addresses.printJSONChanges();
}

Expand All @@ -62,4 +53,4 @@ contract DeployTimelock is MultisigProposal {
// ensure deployer has executor role
assertTrue(timelockController.hasRole(timelockController.EXECUTOR_ROLE(), dev));
}
}
}
13 changes: 2 additions & 11 deletions script/InitializeBravo.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ contract InitializeBravo is MultisigProposal {
function deploy() public override {
address governor = addresses.getAddress("PROTOCOL_GOVERNOR");

address payable timelock = payable(
addresses.getAddress("PROTOCOL_TIMELOCK_BRAVO")
);
address payable timelock = payable(addresses.getAddress("PROTOCOL_TIMELOCK_BRAVO"));

if (!addresses.isAddressSet("PROTOCOL_GOVERNOR_ALPHA")) {
// Deploy mock GovernorAlpha
Expand All @@ -33,14 +31,7 @@ contract InitializeBravo is MultisigProposal {
}

Timelock(timelock).executeTransaction(
timelock,
0,
"",
abi.encodeWithSignature(
"setPendingAdmin(address)",
address(governor)
),
vm.envUint("ETA")
timelock, 0, "", abi.encodeWithSignature("setPendingAdmin(address)", address(governor)), vm.envUint("ETA")
);

// Initialize GovernorBravo
Expand Down
7 changes: 2 additions & 5 deletions src/mocks/arbitrum/MockArbSys.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ pragma solidity ^0.8.0;
contract MockArbSys {
uint256 public ticketId;

function sendTxToL1(
address _l1Target,
bytes memory _data
) external payable returns (uint256) {
(bool success, ) = _l1Target.call(_data);
function sendTxToL1(address _l1Target, bytes memory _data) external payable returns (uint256) {
(bool success,) = _l1Target.call(_data);
require(success, "Arbsys: sendTxToL1 failed");
return ++ticketId;
}
Expand Down
6 changes: 1 addition & 5 deletions src/mocks/arbitrum/MockProxyUpgradeAction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ import {IProxyAdmin} from "@forge-proposal-simulator/src/interface/IProxyAdmin.s
/// @title ProxyUpgradeAction
/// @dev Arbitrum upgrades must be done through a delegate call to a GAC deployed contract
contract MockProxyUpgradeAction {
function perform(
address admin,
address payable target,
address newLogic
) public payable {
function perform(address admin, address payable target, address newLogic) public payable {
IProxyAdmin(admin).upgrade(target, newLogic);
}
}
Loading

0 comments on commit 3e2868c

Please sign in to comment.