diff --git a/.prettierrc b/.prettierrc index c3132b77..ff3b5a15 100644 --- a/.prettierrc +++ b/.prettierrc @@ -5,7 +5,7 @@ "files": "*.sol", "options": { "parser": "solidity-parse", - "printWidth": 140, + "printWidth": 120, "tabWidth": 4, "useTabs": false, "singleQuote": false, @@ -14,7 +14,7 @@ } ], "tabWidth": 4, - "printWidth": 140, + "printWidth": 120, "trailingComma": "all", "singleQuote": false, "semi": true diff --git a/addresses/Addresses.sol b/addresses/Addresses.sol index 7a6dc296..aeb8ea25 100644 --- a/addresses/Addresses.sol +++ b/addresses/Addresses.sol @@ -46,7 +46,10 @@ contract Addresses is IAddresses, Test { SavedAddresses[] memory savedAddresses = abi.decode(parsedJson, (SavedAddresses[])); for (uint256 i = 0; i < savedAddresses.length; i++) { - require(getAddress(savedAddresses[i].name, savedAddresses[i].chainId) == address(0), "Addresses: duplicate address in json"); + require( + getAddress(savedAddresses[i].name, savedAddresses[i].chainId) == address(0), + "Addresses: duplicate address in json" + ); _addAddress(savedAddresses[i].name, savedAddresses[i].chainId, savedAddresses[i].addr); } @@ -56,7 +59,10 @@ contract Addresses is IAddresses, Test { function _addAddress(string memory name, uint256 _chainId, address addr) private { address currentAddress = _addresses[name][_chainId]; - require(currentAddress == address(0), string(abi.encodePacked("Address:", name, "already set on chain:", _chainId.toString()))); + require( + currentAddress == address(0), + string(abi.encodePacked("Address:", name, "already set on chain:", _chainId.toString())) + ); _addresses[name][_chainId] = addr; vm.label(addr, name); @@ -69,7 +75,10 @@ contract Addresses is IAddresses, Test { addr = _addresses[name][_chainId]; - require(addr != address(0), string(abi.encodePacked("Address:", name, "not set on chain:", _chainId.toString()))); + require( + addr != address(0), + string(abi.encodePacked("Address:", name, "not set on chain:", _chainId.toString())) + ); } /// @notice get an address for the current chainId diff --git a/proposals/proposalTypes/ITimelockController.sol b/proposals/proposalTypes/ITimelockController.sol index 6e3001e3..400fdef6 100644 --- a/proposals/proposalTypes/ITimelockController.sol +++ b/proposals/proposalTypes/ITimelockController.sol @@ -135,7 +135,14 @@ interface ITimelockController { * * - the caller must have the 'proposer' role. */ - function schedule(address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt, uint256 delay) external; + function schedule( + address target, + uint256 value, + bytes calldata data, + bytes32 predecessor, + bytes32 salt, + uint256 delay + ) external; /** * @dev Schedule an operation containing a batch of transactions. @@ -176,7 +183,13 @@ interface ITimelockController { // This function can reenter, but it doesn't pose a risk because _afterCall checks that the proposal is pending, // thus any modifications to the operation during reentrancy should be caught. // slither-disable-next-line reentrancy-eth - function execute(address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt) external payable; + function execute( + address target, + uint256 value, + bytes calldata data, + bytes32 predecessor, + bytes32 salt + ) external payable; /** * @dev Execute an (ready) operation containing a batch of transactions. @@ -220,5 +233,11 @@ interface ITimelockController { /** * @dev See {IERC1155Receiver-onERC1155BatchReceived}. */ - function onERC1155BatchReceived(address, address, uint256[] memory, uint256[] memory, bytes memory) external returns (bytes4); + function onERC1155BatchReceived( + address, + address, + uint256[] memory, + uint256[] memory, + bytes memory + ) external returns (bytes4); } diff --git a/proposals/proposalTypes/TimelockProposal.sol b/proposals/proposalTypes/TimelockProposal.sol index c977a593..9f119ba2 100644 --- a/proposals/proposalTypes/TimelockProposal.sol +++ b/proposals/proposalTypes/TimelockProposal.sol @@ -10,7 +10,11 @@ abstract contract TimelockProposal is Proposal { /// @param timelockAddress to execute the proposal against /// @param proposerAddress account to propose the proposal to the timelock /// @param executorAddress account to execute the proposal on the timelock - function _simulateTimelockActions(address timelockAddress, address proposerAddress, address executorAddress) internal { + function _simulateTimelockActions( + address timelockAddress, + address proposerAddress, + address executorAddress + ) internal { require(actions.length > 0, "Empty timelock operation"); ITimelockController timelock = ITimelockController(payable(timelockAddress)); @@ -52,7 +56,11 @@ abstract contract TimelockProposal is Proposal { timelock.scheduleBatch(targets, values, payloads, predecessor, salt, delay); if (DEBUG) { - console.log("schedule batch calldata with ", actions.length, (actions.length > 1 ? " actions" : " action")); + console.log( + "schedule batch calldata with ", + actions.length, + (actions.length > 1 ? " actions" : " action") + ); emit log_bytes( abi.encodeWithSignature( "scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256)",