Browse Source

Update Prettier Solidity (#3898)

Francisco Giordano 2 years ago
parent
commit
4147005b0c
100 changed files with 872 additions and 1320 deletions
  1. 1 2
      .prettierrc
  2. 1 1
      contracts/crosschain/polygon/CrossChainEnabledPolygonChild.sol
  3. 1 5
      contracts/finance/VestingWallet.sol
  4. 9 18
      contracts/governance/Governor.sol
  5. 3 17
      contracts/governance/TimelockController.sol
  6. 10 7
      contracts/governance/compatibility/GovernorCompatibilityBravo.sol
  7. 6 2
      contracts/governance/compatibility/IGovernorCompatibilityBravo.sol
  8. 3 10
      contracts/governance/extensions/GovernorCountingSimple.sol
  9. 1 5
      contracts/governance/extensions/GovernorSettings.sol
  10. 1 1
      contracts/governance/extensions/GovernorTimelockControl.sol
  11. 1 8
      contracts/governance/utils/IVotes.sol
  12. 2 10
      contracts/governance/utils/Votes.sol
  13. 4 21
      contracts/interfaces/IERC1363.sol
  14. 1 5
      contracts/interfaces/IERC1363Spender.sol
  15. 4 4
      contracts/interfaces/IERC2981.sol
  16. 2 10
      contracts/interfaces/IERC4626.sol
  17. 4 5
      contracts/metatx/MinimalForwarder.sol
  18. 1 5
      contracts/mocks/AddressImpl.sol
  19. 3 27
      contracts/mocks/CheckpointsMock.sol
  20. 1 5
      contracts/mocks/ClonesMock.sol
  21. 1 5
      contracts/mocks/ContextMock.sol
  22. 1 5
      contracts/mocks/Create2Impl.sol
  23. 1 5
      contracts/mocks/DummyImplementation.sol
  24. 2 11
      contracts/mocks/ECDSAMock.sol
  25. 1 6
      contracts/mocks/EIP712External.sol
  26. 1 6
      contracts/mocks/ERC1155BurnableMock.sol
  27. 4 22
      contracts/mocks/ERC1155Mock.sol
  28. 1 6
      contracts/mocks/ERC1155ReceiverMock.sol
  29. 1 5
      contracts/mocks/ERC20CappedMock.sol
  30. 1 5
      contracts/mocks/ERC20DecimalsMock.sol
  31. 2 10
      contracts/mocks/ERC20Mock.sol
  32. 1 1
      contracts/mocks/ERC3156FlashBorrowerMock.sol
  33. 11 21
      contracts/mocks/ERC4626Mock.sol
  34. 1 5
      contracts/mocks/ERC721BurnableMock.sol
  35. 3 7
      contracts/mocks/ERC721ConsecutiveEnumerableMock.sol
  36. 1 5
      contracts/mocks/ERC721EnumerableMock.sol
  37. 1 5
      contracts/mocks/ERC721Mock.sol
  38. 1 5
      contracts/mocks/ERC721PausableMock.sol
  39. 1 5
      contracts/mocks/ERC721RoyaltyMock.sol
  40. 1 5
      contracts/mocks/ERC721URIStorageMock.sol
  41. 3 17
      contracts/mocks/ERC777Mock.sol
  42. 2 11
      contracts/mocks/ERC777SenderRecipientMock.sol
  43. 9 18
      contracts/mocks/GovernorCompatibilityBravoMock.sol
  44. 3 6
      contracts/mocks/GovernorPreventLateQuorumMock.sol
  45. 9 18
      contracts/mocks/GovernorTimelockCompoundMock.sol
  46. 6 12
      contracts/mocks/GovernorTimelockControlMock.sol
  47. 1 6
      contracts/mocks/MathMock.sol
  48. 2 10
      contracts/mocks/MerkleProofWrapper.sol
  49. 1 6
      contracts/mocks/MultipleInheritanceInitializableMocks.sol
  50. 3 15
      contracts/mocks/SafeERC20Helper.sol
  51. 3 15
      contracts/mocks/SafeMathMock.sol
  52. 1 5
      contracts/mocks/SignatureCheckerMock.sol
  53. 1 5
      contracts/mocks/UUPS/UUPSLegacy.sol
  54. 2 10
      contracts/mocks/crosschain/bridges.sol
  55. 10 18
      contracts/mocks/wizard/MyGovernor1.sol
  56. 10 18
      contracts/mocks/wizard/MyGovernor2.sol
  57. 13 24
      contracts/mocks/wizard/MyGovernor3.sol
  58. 4 5
      contracts/proxy/Clones.sol
  59. 3 15
      contracts/proxy/ERC1967/ERC1967Upgrade.sol
  60. 1 5
      contracts/proxy/transparent/TransparentUpgradeableProxy.sol
  61. 8 28
      contracts/token/ERC1155/ERC1155.sol
  62. 5 11
      contracts/token/ERC1155/IERC1155.sol
  63. 2 10
      contracts/token/ERC1155/extensions/ERC1155Burnable.sol
  64. 5 25
      contracts/token/ERC20/ERC20.sol
  65. 1 5
      contracts/token/ERC20/IERC20.sol
  66. 1 5
      contracts/token/ERC20/extensions/ERC20Capped.sol
  67. 1 5
      contracts/token/ERC20/extensions/ERC20Pausable.sol
  68. 1 5
      contracts/token/ERC20/extensions/ERC20Snapshot.sol
  69. 1 5
      contracts/token/ERC20/extensions/ERC20Votes.sol
  70. 3 16
      contracts/token/ERC20/extensions/ERC4626.sol
  71. 5 26
      contracts/token/ERC20/utils/SafeERC20.sol
  72. 1 5
      contracts/token/ERC20/utils/TokenTimelock.sol
  73. 9 44
      contracts/token/ERC721/ERC721.sol
  74. 3 16
      contracts/token/ERC721/IERC721.sol
  75. 1 6
      contracts/token/ERC721/utils/ERC721Holder.sol
  76. 8 43
      contracts/token/ERC777/ERC777.sol
  77. 2 11
      contracts/token/ERC777/IERC777.sol
  78. 1 5
      contracts/token/common/ERC2981.sol
  79. 1 5
      contracts/utils/Address.sol
  80. 18 62
      contracts/utils/Checkpoints.sol
  81. 2 10
      contracts/utils/Create2.sol
  82. 4 22
      contracts/utils/cryptography/ECDSA.sol
  83. 2 10
      contracts/utils/cryptography/MerkleProof.sol
  84. 1 5
      contracts/utils/cryptography/SignatureChecker.sol
  85. 4 5
      contracts/utils/introspection/ERC165Checker.sol
  86. 4 7
      contracts/utils/introspection/ERC1820Implementer.sol
  87. 1 5
      contracts/utils/introspection/IERC1820Registry.sol
  88. 16 25
      contracts/utils/math/Math.sol
  89. 3 15
      contracts/utils/math/SafeMath.sol
  90. 1 5
      contracts/utils/structs/BitMaps.sol
  91. 6 30
      contracts/utils/structs/EnumerableMap.sol
  92. 3 11
      contracts/vendor/amb/IAMB.sol
  93. 1 8
      contracts/vendor/arbitrum/IArbSys.sol
  94. 1 8
      contracts/vendor/arbitrum/IBridge.sol
  95. 1 5
      contracts/vendor/arbitrum/IOutbox.sol
  96. 1 5
      contracts/vendor/optimism/ICrossDomainMessenger.sol
  97. 1 5
      contracts/vendor/polygon/IFxMessageProcessor.sol
  98. 546 219
      package-lock.json
  99. 1 1
      package.json
  100. 13 29
      test/utils/math/Math.t.sol

+ 1 - 2
.prettierrc

@@ -6,8 +6,7 @@
       "files": "*.sol",
       "options": {
         "singleQuote": false,
-        "printWidth": 120,
-        "explicitTypes": "always"
+        "printWidth": 120
       }
     }
   ]

+ 1 - 1
contracts/crosschain/polygon/CrossChainEnabledPolygonChild.sol

@@ -59,7 +59,7 @@ abstract contract CrossChainEnabledPolygonChild is IFxMessageProcessor, CrossCha
      * then security could be compromised.
      */
     function processMessageFromRoot(
-        uint256, /* stateId */
+        uint256 /* stateId */,
         address rootMessageSender,
         bytes calldata data
     ) external override nonReentrant {

+ 1 - 5
contracts/finance/VestingWallet.sol

@@ -29,11 +29,7 @@ contract VestingWallet is Context {
     /**
      * @dev Set the beneficiary, start timestamp and vesting duration of the vesting wallet.
      */
-    constructor(
-        address beneficiaryAddress,
-        uint64 startTimestamp,
-        uint64 durationSeconds
-    ) payable {
+    constructor(address beneficiaryAddress, uint64 startTimestamp, uint64 durationSeconds) payable {
         require(beneficiaryAddress != address(0), "VestingWallet: beneficiary is zero address");
         _beneficiary = beneficiaryAddress;
         _start = startTimestamp;

+ 9 - 18
contracts/governance/Governor.sol

@@ -314,7 +314,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receive
      * @dev Internal execution mechanism. Can be overridden to implement different execution mechanism
      */
     function _execute(
-        uint256, /* proposalId */
+        uint256 /* proposalId */,
         address[] memory targets,
         uint256[] memory values,
         bytes[] memory calldatas,
@@ -331,9 +331,9 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receive
      * @dev Hook before execution is triggered.
      */
     function _beforeExecute(
-        uint256, /* proposalId */
+        uint256 /* proposalId */,
         address[] memory targets,
-        uint256[] memory, /* values */
+        uint256[] memory /* values */,
         bytes[] memory calldatas,
         bytes32 /*descriptionHash*/
     ) internal virtual {
@@ -350,10 +350,10 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receive
      * @dev Hook after execution is triggered.
      */
     function _afterExecute(
-        uint256, /* proposalId */
-        address[] memory, /* targets */
-        uint256[] memory, /* values */
-        bytes[] memory, /* calldatas */
+        uint256 /* proposalId */,
+        address[] memory /* targets */,
+        uint256[] memory /* values */,
+        bytes[] memory /* calldatas */,
         bytes32 /*descriptionHash*/
     ) internal virtual {
         if (_executor() != address(this)) {
@@ -540,11 +540,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receive
      * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake.
      * Note that if the executor is simply the governor itself, use of `relay` is redundant.
      */
-    function relay(
-        address target,
-        uint256 value,
-        bytes calldata data
-    ) external payable virtual onlyGovernance {
+    function relay(address target, uint256 value, bytes calldata data) external payable virtual onlyGovernance {
         (bool success, bytes memory returndata) = target.call{value: value}(data);
         Address.verifyCallResult(success, returndata, "Governor: relay reverted without message");
     }
@@ -560,12 +556,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receive
     /**
      * @dev See {IERC721Receiver-onERC721Received}.
      */
-    function onERC721Received(
-        address,
-        address,
-        uint256,
-        bytes memory
-    ) public virtual override returns (bytes4) {
+    function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {
         return this.onERC721Received.selector;
     }
 

+ 3 - 17
contracts/governance/TimelockController.sol

@@ -73,12 +73,7 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver
      * administration through timelocked proposals. Previous versions of this contract would assign
      * this admin to the deployer automatically and should be renounced as well.
      */
-    constructor(
-        uint256 minDelay,
-        address[] memory proposers,
-        address[] memory executors,
-        address admin
-    ) {
+    constructor(uint256 minDelay, address[] memory proposers, address[] memory executors, address admin) {
         // self administration
         _grantRole(DEFAULT_ADMIN_ROLE, address(this));
 
@@ -336,11 +331,7 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver
     /**
      * @dev Execute an operation's call.
      */
-    function _execute(
-        address target,
-        uint256 value,
-        bytes calldata data
-    ) internal virtual {
+    function _execute(address target, uint256 value, bytes calldata data) internal virtual {
         (bool success, ) = target.call{value: value}(data);
         require(success, "TimelockController: underlying transaction reverted");
     }
@@ -380,12 +371,7 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver
     /**
      * @dev See {IERC721Receiver-onERC721Received}.
      */
-    function onERC721Received(
-        address,
-        address,
-        uint256,
-        bytes memory
-    ) public virtual override returns (bytes4) {
+    function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {
         return this.onERC721Received.selector;
     }
 

+ 10 - 7
contracts/governance/compatibility/GovernorCompatibilityBravo.sol

@@ -118,11 +118,10 @@ abstract contract GovernorCompatibilityBravo is IGovernorTimelock, IGovernorComp
     /**
      * @dev Encodes calldatas with optional function signature.
      */
-    function _encodeCalldata(string[] memory signatures, bytes[] memory calldatas)
-        private
-        pure
-        returns (bytes[] memory)
-    {
+    function _encodeCalldata(
+        string[] memory signatures,
+        bytes[] memory calldatas
+    ) private pure returns (bytes[] memory) {
         bytes[] memory fullcalldatas = new bytes[](calldatas.length);
 
         for (uint256 i = 0; i < signatures.length; ++i) {
@@ -163,7 +162,9 @@ abstract contract GovernorCompatibilityBravo is IGovernorTimelock, IGovernorComp
     /**
      * @dev See {IGovernorCompatibilityBravo-proposals}.
      */
-    function proposals(uint256 proposalId)
+    function proposals(
+        uint256 proposalId
+    )
         public
         view
         virtual
@@ -200,7 +201,9 @@ abstract contract GovernorCompatibilityBravo is IGovernorTimelock, IGovernorComp
     /**
      * @dev See {IGovernorCompatibilityBravo-getActions}.
      */
-    function getActions(uint256 proposalId)
+    function getActions(
+        uint256 proposalId
+    )
         public
         view
         virtual

+ 6 - 2
contracts/governance/compatibility/IGovernorCompatibilityBravo.sol

@@ -50,7 +50,9 @@ abstract contract IGovernorCompatibilityBravo is IGovernor {
     /**
      * @dev Part of the Governor Bravo's interface: _"The official record of all proposals ever proposed"_.
      */
-    function proposals(uint256)
+    function proposals(
+        uint256
+    )
         public
         view
         virtual
@@ -96,7 +98,9 @@ abstract contract IGovernorCompatibilityBravo is IGovernor {
     /**
      * @dev Part of the Governor Bravo's interface: _"Gets actions of a proposal"_.
      */
-    function getActions(uint256 proposalId)
+    function getActions(
+        uint256 proposalId
+    )
         public
         view
         virtual

+ 3 - 10
contracts/governance/extensions/GovernorCountingSimple.sol

@@ -47,16 +47,9 @@ abstract contract GovernorCountingSimple is Governor {
     /**
      * @dev Accessor to the internal vote counts.
      */
-    function proposalVotes(uint256 proposalId)
-        public
-        view
-        virtual
-        returns (
-            uint256 againstVotes,
-            uint256 forVotes,
-            uint256 abstainVotes
-        )
-    {
+    function proposalVotes(
+        uint256 proposalId
+    ) public view virtual returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes) {
         ProposalVote storage proposalVote = _proposalVotes[proposalId];
         return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes);
     }

+ 1 - 5
contracts/governance/extensions/GovernorSettings.sol

@@ -22,11 +22,7 @@ abstract contract GovernorSettings is Governor {
     /**
      * @dev Initialize the governance parameters.
      */
-    constructor(
-        uint256 initialVotingDelay,
-        uint256 initialVotingPeriod,
-        uint256 initialProposalThreshold
-    ) {
+    constructor(uint256 initialVotingDelay, uint256 initialVotingPeriod, uint256 initialProposalThreshold) {
         _setVotingDelay(initialVotingDelay);
         _setVotingPeriod(initialVotingPeriod);
         _setProposalThreshold(initialProposalThreshold);

+ 1 - 1
contracts/governance/extensions/GovernorTimelockControl.sol

@@ -110,7 +110,7 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor {
      * @dev Overridden execute function that run the already queued proposal through the timelock.
      */
     function _execute(
-        uint256, /* proposalId */
+        uint256 /* proposalId */,
         address[] memory targets,
         uint256[] memory values,
         bytes[] memory calldatas,

+ 1 - 8
contracts/governance/utils/IVotes.sol

@@ -50,12 +50,5 @@ interface IVotes {
     /**
      * @dev Delegates votes from signer to `delegatee`.
      */
-    function delegateBySig(
-        address delegatee,
-        uint256 nonce,
-        uint256 expiry,
-        uint8 v,
-        bytes32 r,
-        bytes32 s
-    ) external;
+    function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external;
 }

+ 2 - 10
contracts/governance/utils/Votes.sol

@@ -134,11 +134,7 @@ abstract contract Votes is IVotes, Context, EIP712, Nonces {
      * @dev Transfers, mints, or burns voting units. To register a mint, `from` should be zero. To register a burn, `to`
      * should be zero. Total supply of voting units will be adjusted with mints and burns.
      */
-    function _transferVotingUnits(
-        address from,
-        address to,
-        uint256 amount
-    ) internal virtual {
+    function _transferVotingUnits(address from, address to, uint256 amount) internal virtual {
         if (from == address(0)) {
             _totalCheckpoints.push(_add, amount);
         }
@@ -151,11 +147,7 @@ abstract contract Votes is IVotes, Context, EIP712, Nonces {
     /**
      * @dev Moves delegated votes from one delegate to another.
      */
-    function _moveDelegateVotes(
-        address from,
-        address to,
-        uint256 amount
-    ) private {
+    function _moveDelegateVotes(address from, address to, uint256 amount) private {
         if (from != to && amount > 0) {
             if (from != address(0)) {
                 (uint256 oldValue, uint256 newValue) = _delegateCheckpoints[from].push(_subtract, amount);

+ 4 - 21
contracts/interfaces/IERC1363.sol

@@ -38,11 +38,7 @@ interface IERC1363 is IERC165, IERC20 {
      * @param data bytes Additional data with no specified format, sent in call to `to`
      * @return true unless throwing
      */
-    function transferAndCall(
-        address to,
-        uint256 value,
-        bytes memory data
-    ) external returns (bool);
+    function transferAndCall(address to, uint256 value, bytes memory data) external returns (bool);
 
     /**
      * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver
@@ -51,11 +47,7 @@ interface IERC1363 is IERC165, IERC20 {
      * @param value uint256 The amount of tokens to be transferred
      * @return true unless throwing
      */
-    function transferFromAndCall(
-        address from,
-        address to,
-        uint256 value
-    ) external returns (bool);
+    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
 
     /**
      * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver
@@ -65,12 +57,7 @@ interface IERC1363 is IERC165, IERC20 {
      * @param data bytes Additional data with no specified format, sent in call to `to`
      * @return true unless throwing
      */
-    function transferFromAndCall(
-        address from,
-        address to,
-        uint256 value,
-        bytes memory data
-    ) external returns (bool);
+    function transferFromAndCall(address from, address to, uint256 value, bytes memory data) external returns (bool);
 
     /**
      * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
@@ -87,9 +74,5 @@ interface IERC1363 is IERC165, IERC20 {
      * @param value uint256 The amount of tokens to be spent
      * @param data bytes Additional data with no specified format, sent in call to `spender`
      */
-    function approveAndCall(
-        address spender,
-        uint256 value,
-        bytes memory data
-    ) external returns (bool);
+    function approveAndCall(address spender, uint256 value, bytes memory data) external returns (bool);
 }

+ 1 - 5
contracts/interfaces/IERC1363Spender.sol

@@ -22,9 +22,5 @@ interface IERC1363Spender {
      * @return `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))`
      *  unless throwing
      */
-    function onApprovalReceived(
-        address owner,
-        uint256 value,
-        bytes memory data
-    ) external returns (bytes4);
+    function onApprovalReceived(address owner, uint256 value, bytes memory data) external returns (bytes4);
 }

+ 4 - 4
contracts/interfaces/IERC2981.sol

@@ -18,8 +18,8 @@ interface IERC2981 is IERC165 {
      * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
      * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
      */
-    function royaltyInfo(uint256 tokenId, uint256 salePrice)
-        external
-        view
-        returns (address receiver, uint256 royaltyAmount);
+    function royaltyInfo(
+        uint256 tokenId,
+        uint256 salePrice
+    ) external view returns (address receiver, uint256 royaltyAmount);
 }

+ 2 - 10
contracts/interfaces/IERC4626.sol

@@ -187,11 +187,7 @@ interface IERC4626 is IERC20, IERC20Metadata {
      * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
      * Those methods should be performed separately.
      */
-    function withdraw(
-        uint256 assets,
-        address receiver,
-        address owner
-    ) external returns (uint256 shares);
+    function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);
 
     /**
      * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
@@ -232,9 +228,5 @@ interface IERC4626 is IERC20, IERC20Metadata {
      * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
      * Those methods should be performed separately.
      */
-    function redeem(
-        uint256 shares,
-        address receiver,
-        address owner
-    ) external returns (uint256 assets);
+    function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
 }

+ 4 - 5
contracts/metatx/MinimalForwarder.sol

@@ -44,11 +44,10 @@ contract MinimalForwarder is EIP712 {
         return _nonces[req.from] == req.nonce && signer == req.from;
     }
 
-    function execute(ForwardRequest calldata req, bytes calldata signature)
-        public
-        payable
-        returns (bool, bytes memory)
-    {
+    function execute(
+        ForwardRequest calldata req,
+        bytes calldata signature
+    ) public payable returns (bool, bytes memory) {
         require(verify(req, signature), "MinimalForwarder: signature does not match request");
         _nonces[req.from] = req.nonce + 1;
 

+ 1 - 5
contracts/mocks/AddressImpl.sol

@@ -22,11 +22,7 @@ contract AddressImpl {
         emit CallReturnValue(abi.decode(returnData, (string)));
     }
 
-    function functionCallWithValue(
-        address target,
-        bytes calldata data,
-        uint256 value
-    ) external payable {
+    function functionCallWithValue(address target, bytes calldata data, uint256 value) external payable {
         bytes memory returnData = Address.functionCallWithValue(target, data, value);
         emit CallReturnValue(abi.decode(returnData, (string)));
     }

+ 3 - 27
contracts/mocks/CheckpointsMock.sol

@@ -14,15 +14,7 @@ contract CheckpointsMock {
         return _totalCheckpoints.latest();
     }
 
-    function latestCheckpoint()
-        public
-        view
-        returns (
-            bool,
-            uint256,
-            uint256
-        )
-    {
+    function latestCheckpoint() public view returns (bool, uint256, uint256) {
         return _totalCheckpoints.latestCheckpoint();
     }
 
@@ -52,15 +44,7 @@ contract Checkpoints224Mock {
         return _totalCheckpoints.latest();
     }
 
-    function latestCheckpoint()
-        public
-        view
-        returns (
-            bool,
-            uint32,
-            uint224
-        )
-    {
+    function latestCheckpoint() public view returns (bool, uint32, uint224) {
         return _totalCheckpoints.latestCheckpoint();
     }
 
@@ -90,15 +74,7 @@ contract Checkpoints160Mock {
         return _totalCheckpoints.latest();
     }
 
-    function latestCheckpoint()
-        public
-        view
-        returns (
-            bool,
-            uint96,
-            uint160
-        )
-    {
+    function latestCheckpoint() public view returns (bool, uint96, uint160) {
         return _totalCheckpoints.latestCheckpoint();
     }
 

+ 1 - 5
contracts/mocks/ClonesMock.sol

@@ -15,11 +15,7 @@ contract ClonesMock {
         _initAndEmit(implementation.clone(), initdata);
     }
 
-    function cloneDeterministic(
-        address implementation,
-        bytes32 salt,
-        bytes calldata initdata
-    ) public payable {
+    function cloneDeterministic(address implementation, bytes32 salt, bytes calldata initdata) public payable {
         _initAndEmit(implementation.cloneDeterministic(salt), initdata);
     }
 

+ 1 - 5
contracts/mocks/ContextMock.sol

@@ -23,11 +23,7 @@ contract ContextMockCaller {
         context.msgSender();
     }
 
-    function callData(
-        ContextMock context,
-        uint256 integerValue,
-        string memory stringValue
-    ) public {
+    function callData(ContextMock context, uint256 integerValue, string memory stringValue) public {
         context.msgData(integerValue, stringValue);
     }
 }

+ 1 - 5
contracts/mocks/Create2Impl.sol

@@ -6,11 +6,7 @@ import "../utils/Create2.sol";
 import "../utils/introspection/ERC1820Implementer.sol";
 
 contract Create2Impl {
-    function deploy(
-        uint256 value,
-        bytes32 salt,
-        bytes memory code
-    ) public {
+    function deploy(uint256 value, bytes32 salt, bytes memory code) public {
         Create2.deploy(value, salt, code);
     }
 

+ 1 - 5
contracts/mocks/DummyImplementation.sol

@@ -27,11 +27,7 @@ contract DummyImplementation {
         value = _value;
     }
 
-    function initialize(
-        uint256 _value,
-        string memory _text,
-        uint256[] memory _values
-    ) public {
+    function initialize(uint256 _value, string memory _text, uint256[] memory _values) public {
         value = _value;
         text = _text;
         values = _values;

+ 2 - 11
contracts/mocks/ECDSAMock.sol

@@ -13,21 +13,12 @@ contract ECDSAMock {
     }
 
     // solhint-disable-next-line func-name-mixedcase
-    function recover_v_r_s(
-        bytes32 hash,
-        uint8 v,
-        bytes32 r,
-        bytes32 s
-    ) public pure returns (address) {
+    function recover_v_r_s(bytes32 hash, uint8 v, bytes32 r, bytes32 s) public pure returns (address) {
         return hash.recover(v, r, s);
     }
 
     // solhint-disable-next-line func-name-mixedcase
-    function recover_r_vs(
-        bytes32 hash,
-        bytes32 r,
-        bytes32 vs
-    ) public pure returns (address) {
+    function recover_r_vs(bytes32 hash, bytes32 r, bytes32 vs) public pure returns (address) {
         return hash.recover(r, vs);
     }
 

+ 1 - 6
contracts/mocks/EIP712External.sol

@@ -12,12 +12,7 @@ contract EIP712External is EIP712 {
         return _domainSeparatorV4();
     }
 
-    function verify(
-        bytes memory signature,
-        address signer,
-        address mailTo,
-        string memory mailContents
-    ) external view {
+    function verify(bytes memory signature, address signer, address mailTo, string memory mailContents) external view {
         bytes32 digest = _hashTypedDataV4(
             keccak256(abi.encode(keccak256("Mail(address to,string contents)"), mailTo, keccak256(bytes(mailContents))))
         );

+ 1 - 6
contracts/mocks/ERC1155BurnableMock.sol

@@ -7,12 +7,7 @@ import "../token/ERC1155/extensions/ERC1155Burnable.sol";
 contract ERC1155BurnableMock is ERC1155Burnable {
     constructor(string memory uri) ERC1155(uri) {}
 
-    function mint(
-        address to,
-        uint256 id,
-        uint256 value,
-        bytes memory data
-    ) public {
+    function mint(address to, uint256 id, uint256 value, bytes memory data) public {
         _mint(to, id, value, data);
     }
 }

+ 4 - 22
contracts/mocks/ERC1155Mock.sol

@@ -15,37 +15,19 @@ contract ERC1155Mock is ERC1155 {
         _setURI(newuri);
     }
 
-    function mint(
-        address to,
-        uint256 id,
-        uint256 value,
-        bytes memory data
-    ) public {
+    function mint(address to, uint256 id, uint256 value, bytes memory data) public {
         _mint(to, id, value, data);
     }
 
-    function mintBatch(
-        address to,
-        uint256[] memory ids,
-        uint256[] memory values,
-        bytes memory data
-    ) public {
+    function mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) public {
         _mintBatch(to, ids, values, data);
     }
 
-    function burn(
-        address owner,
-        uint256 id,
-        uint256 value
-    ) public {
+    function burn(address owner, uint256 id, uint256 value) public {
         _burn(owner, id, value);
     }
 
-    function burnBatch(
-        address owner,
-        uint256[] memory ids,
-        uint256[] memory values
-    ) public {
+    function burnBatch(address owner, uint256[] memory ids, uint256[] memory values) public {
         _burnBatch(owner, ids, values);
     }
 }

+ 1 - 6
contracts/mocks/ERC1155ReceiverMock.sol

@@ -14,12 +14,7 @@ contract ERC1155ReceiverMock is ERC165, IERC1155Receiver {
     event Received(address operator, address from, uint256 id, uint256 value, bytes data, uint256 gas);
     event BatchReceived(address operator, address from, uint256[] ids, uint256[] values, bytes data, uint256 gas);
 
-    constructor(
-        bytes4 recRetval,
-        bool recReverts,
-        bytes4 batRetval,
-        bool batReverts
-    ) {
+    constructor(bytes4 recRetval, bool recReverts, bytes4 batRetval, bool batReverts) {
         _recRetval = recRetval;
         _recReverts = recReverts;
         _batRetval = batRetval;

+ 1 - 5
contracts/mocks/ERC20CappedMock.sol

@@ -5,11 +5,7 @@ pragma solidity ^0.8.0;
 import "../token/ERC20/extensions/ERC20Capped.sol";
 
 contract ERC20CappedMock is ERC20Capped {
-    constructor(
-        string memory name,
-        string memory symbol,
-        uint256 cap
-    ) ERC20(name, symbol) ERC20Capped(cap) {}
+    constructor(string memory name, string memory symbol, uint256 cap) ERC20(name, symbol) ERC20Capped(cap) {}
 
     function mint(address to, uint256 tokenId) public {
         _mint(to, tokenId);

+ 1 - 5
contracts/mocks/ERC20DecimalsMock.sol

@@ -7,11 +7,7 @@ import "../token/ERC20/ERC20.sol";
 contract ERC20DecimalsMock is ERC20 {
     uint8 private immutable _decimals;
 
-    constructor(
-        string memory name_,
-        string memory symbol_,
-        uint8 decimals_
-    ) ERC20(name_, symbol_) {
+    constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {
         _decimals = decimals_;
     }
 

+ 2 - 10
contracts/mocks/ERC20Mock.sol

@@ -23,19 +23,11 @@ contract ERC20Mock is ERC20 {
         _burn(account, amount);
     }
 
-    function transferInternal(
-        address from,
-        address to,
-        uint256 value
-    ) public {
+    function transferInternal(address from, address to, uint256 value) public {
         _transfer(from, to, value);
     }
 
-    function approveInternal(
-        address owner,
-        address spender,
-        uint256 value
-    ) public {
+    function approveInternal(address owner, address spender, uint256 value) public {
         _approve(owner, spender, value);
     }
 }

+ 1 - 1
contracts/mocks/ERC3156FlashBorrowerMock.sol

@@ -28,7 +28,7 @@ contract ERC3156FlashBorrowerMock is IERC3156FlashBorrower {
     }
 
     function onFlashLoan(
-        address, /*initiator*/
+        address /*initiator*/,
         address token,
         uint256 amount,
         uint256 fee,

+ 11 - 21
contracts/mocks/ERC4626Mock.sol

@@ -5,11 +5,7 @@ pragma solidity ^0.8.0;
 import "../token/ERC20/extensions/ERC4626.sol";
 
 contract ERC4626Mock is ERC4626 {
-    constructor(
-        IERC20Metadata asset,
-        string memory name,
-        string memory symbol
-    ) ERC20(name, symbol) ERC4626(asset) {}
+    constructor(IERC20Metadata asset, string memory name, string memory symbol) ERC20(name, symbol) ERC4626(asset) {}
 
     function mockMint(address account, uint256 amount) public {
         _mint(account, amount);
@@ -38,23 +34,17 @@ contract ERC4626DecimalMock is ERC4626Mock {
         return _decimals;
     }
 
-    function _initialConvertToShares(uint256 assets, Math.Rounding rounding)
-        internal
-        view
-        virtual
-        override
-        returns (uint256 shares)
-    {
-        return assets.mulDiv(10**decimals(), 10**super.decimals(), rounding);
+    function _initialConvertToShares(
+        uint256 assets,
+        Math.Rounding rounding
+    ) internal view virtual override returns (uint256 shares) {
+        return assets.mulDiv(10 ** decimals(), 10 ** super.decimals(), rounding);
     }
 
-    function _initialConvertToAssets(uint256 shares, Math.Rounding rounding)
-        internal
-        view
-        virtual
-        override
-        returns (uint256 assets)
-    {
-        return shares.mulDiv(10**super.decimals(), 10**decimals(), rounding);
+    function _initialConvertToAssets(
+        uint256 shares,
+        Math.Rounding rounding
+    ) internal view virtual override returns (uint256 assets) {
+        return shares.mulDiv(10 ** super.decimals(), 10 ** decimals(), rounding);
     }
 }

+ 1 - 5
contracts/mocks/ERC721BurnableMock.sol

@@ -19,11 +19,7 @@ contract ERC721BurnableMock is ERC721Burnable {
         _safeMint(to, tokenId);
     }
 
-    function safeMint(
-        address to,
-        uint256 tokenId,
-        bytes memory _data
-    ) public {
+    function safeMint(address to, uint256 tokenId, bytes memory _data) public {
         _safeMint(to, tokenId, _data);
     }
 }

+ 3 - 7
contracts/mocks/ERC721ConsecutiveEnumerableMock.sol

@@ -17,13 +17,9 @@ contract ERC721ConsecutiveEnumerableMock is ERC721Consecutive, ERC721Enumerable
         }
     }
 
-    function supportsInterface(bytes4 interfaceId)
-        public
-        view
-        virtual
-        override(ERC721, ERC721Enumerable)
-        returns (bool)
-    {
+    function supportsInterface(
+        bytes4 interfaceId
+    ) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
         return super.supportsInterface(interfaceId);
     }
 

+ 1 - 5
contracts/mocks/ERC721EnumerableMock.sol

@@ -37,11 +37,7 @@ contract ERC721EnumerableMock is ERC721Enumerable {
         _safeMint(to, tokenId);
     }
 
-    function safeMint(
-        address to,
-        uint256 tokenId,
-        bytes memory _data
-    ) public {
+    function safeMint(address to, uint256 tokenId, bytes memory _data) public {
         _safeMint(to, tokenId, _data);
     }
 

+ 1 - 5
contracts/mocks/ERC721Mock.sol

@@ -27,11 +27,7 @@ contract ERC721Mock is ERC721 {
         _safeMint(to, tokenId);
     }
 
-    function safeMint(
-        address to,
-        uint256 tokenId,
-        bytes memory _data
-    ) public {
+    function safeMint(address to, uint256 tokenId, bytes memory _data) public {
         _safeMint(to, tokenId, _data);
     }
 

+ 1 - 5
contracts/mocks/ERC721PausableMock.sol

@@ -31,11 +31,7 @@ contract ERC721PausableMock is ERC721Pausable {
         _safeMint(to, tokenId);
     }
 
-    function safeMint(
-        address to,
-        uint256 tokenId,
-        bytes memory _data
-    ) public {
+    function safeMint(address to, uint256 tokenId, bytes memory _data) public {
         _safeMint(to, tokenId, _data);
     }
 

+ 1 - 5
contracts/mocks/ERC721RoyaltyMock.sol

@@ -7,11 +7,7 @@ import "../token/ERC721/extensions/ERC721Royalty.sol";
 contract ERC721RoyaltyMock is ERC721Royalty {
     constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
 
-    function setTokenRoyalty(
-        uint256 tokenId,
-        address recipient,
-        uint96 fraction
-    ) public {
+    function setTokenRoyalty(uint256 tokenId, address recipient, uint96 fraction) public {
         _setTokenRoyalty(tokenId, recipient, fraction);
     }
 

+ 1 - 5
contracts/mocks/ERC721URIStorageMock.sol

@@ -41,11 +41,7 @@ contract ERC721URIStorageMock is ERC721URIStorage {
         _safeMint(to, tokenId);
     }
 
-    function safeMint(
-        address to,
-        uint256 tokenId,
-        bytes memory _data
-    ) public {
+    function safeMint(address to, uint256 tokenId, bytes memory _data) public {
         _safeMint(to, tokenId, _data);
     }
 

+ 3 - 17
contracts/mocks/ERC777Mock.sol

@@ -18,12 +18,7 @@ contract ERC777Mock is Context, ERC777 {
         _mint(initialHolder, initialBalance, "", "");
     }
 
-    function mintInternal(
-        address to,
-        uint256 amount,
-        bytes memory userData,
-        bytes memory operatorData
-    ) public {
+    function mintInternal(address to, uint256 amount, bytes memory userData, bytes memory operatorData) public {
         _mint(to, amount, userData, operatorData);
     }
 
@@ -37,20 +32,11 @@ contract ERC777Mock is Context, ERC777 {
         _mint(to, amount, userData, operatorData, requireReceptionAck);
     }
 
-    function approveInternal(
-        address holder,
-        address spender,
-        uint256 value
-    ) public {
+    function approveInternal(address holder, address spender, uint256 value) public {
         _approve(holder, spender, value);
     }
 
-    function _beforeTokenTransfer(
-        address,
-        address,
-        address,
-        uint256
-    ) internal override {
+    function _beforeTokenTransfer(address, address, address, uint256) internal override {
         emit BeforeTokenTransfer();
     }
 }

+ 2 - 11
contracts/mocks/ERC777SenderRecipientMock.sol

@@ -141,21 +141,12 @@ contract ERC777SenderRecipientMock is Context, IERC777Sender, IERC777Recipient,
         _shouldRevertReceive = shouldRevert;
     }
 
-    function send(
-        IERC777 token,
-        address to,
-        uint256 amount,
-        bytes memory data
-    ) public {
+    function send(IERC777 token, address to, uint256 amount, bytes memory data) public {
         // This is 777's send function, not the Solidity send function
         token.send(to, amount, data); // solhint-disable-line check-send-result
     }
 
-    function burn(
-        IERC777 token,
-        uint256 amount,
-        bytes memory data
-    ) public {
+    function burn(IERC777 token, uint256 amount, bytes memory data) public {
         token.burn(amount, data);
     }
 }

+ 9 - 18
contracts/mocks/GovernorCompatibilityBravoMock.sol

@@ -27,12 +27,9 @@ contract GovernorCompatibilityBravoMock is
         GovernorVotesComp(token_)
     {}
 
-    function supportsInterface(bytes4 interfaceId)
-        public
-        view
-        override(IERC165, Governor, GovernorTimelockCompound)
-        returns (bool)
-    {
+    function supportsInterface(
+        bytes4 interfaceId
+    ) public view override(IERC165, Governor, GovernorTimelockCompound) returns (bool) {
         return super.supportsInterface(interfaceId);
     }
 
@@ -40,21 +37,15 @@ contract GovernorCompatibilityBravoMock is
         return 0;
     }
 
-    function state(uint256 proposalId)
-        public
-        view
-        override(IGovernor, Governor, GovernorTimelockCompound)
-        returns (ProposalState)
-    {
+    function state(
+        uint256 proposalId
+    ) public view override(IGovernor, Governor, GovernorTimelockCompound) returns (ProposalState) {
         return super.state(proposalId);
     }
 
-    function proposalEta(uint256 proposalId)
-        public
-        view
-        override(IGovernorTimelock, GovernorTimelockCompound)
-        returns (uint256)
-    {
+    function proposalEta(
+        uint256 proposalId
+    ) public view override(IGovernorTimelock, GovernorTimelockCompound) returns (uint256) {
         return super.proposalEta(proposalId);
     }
 

+ 3 - 6
contracts/mocks/GovernorPreventLateQuorumMock.sol

@@ -35,12 +35,9 @@ contract GovernorPreventLateQuorumMock is
         return _quorum;
     }
 
-    function proposalDeadline(uint256 proposalId)
-        public
-        view
-        override(Governor, GovernorPreventLateQuorum)
-        returns (uint256)
-    {
+    function proposalDeadline(
+        uint256 proposalId
+    ) public view override(Governor, GovernorPreventLateQuorum) returns (uint256) {
         return super.proposalDeadline(proposalId);
     }
 

+ 9 - 18
contracts/mocks/GovernorTimelockCompoundMock.sol

@@ -28,21 +28,15 @@ contract GovernorTimelockCompoundMock is
         GovernorVotesQuorumFraction(quorumNumerator_)
     {}
 
-    function supportsInterface(bytes4 interfaceId)
-        public
-        view
-        override(Governor, GovernorTimelockCompound)
-        returns (bool)
-    {
+    function supportsInterface(
+        bytes4 interfaceId
+    ) public view override(Governor, GovernorTimelockCompound) returns (bool) {
         return super.supportsInterface(interfaceId);
     }
 
-    function quorum(uint256 blockNumber)
-        public
-        view
-        override(IGovernor, GovernorVotesQuorumFraction)
-        returns (uint256)
-    {
+    function quorum(
+        uint256 blockNumber
+    ) public view override(IGovernor, GovernorVotesQuorumFraction) returns (uint256) {
         return super.quorum(blockNumber);
     }
 
@@ -58,12 +52,9 @@ contract GovernorTimelockCompoundMock is
     /**
      * Overriding nightmare
      */
-    function state(uint256 proposalId)
-        public
-        view
-        override(Governor, GovernorTimelockCompound)
-        returns (ProposalState)
-    {
+    function state(
+        uint256 proposalId
+    ) public view override(Governor, GovernorTimelockCompound) returns (ProposalState) {
         return super.state(proposalId);
     }
 

+ 6 - 12
contracts/mocks/GovernorTimelockControlMock.sol

@@ -28,21 +28,15 @@ contract GovernorTimelockControlMock is
         GovernorVotesQuorumFraction(quorumNumerator_)
     {}
 
-    function supportsInterface(bytes4 interfaceId)
-        public
-        view
-        override(Governor, GovernorTimelockControl)
-        returns (bool)
-    {
+    function supportsInterface(
+        bytes4 interfaceId
+    ) public view override(Governor, GovernorTimelockControl) returns (bool) {
         return super.supportsInterface(interfaceId);
     }
 
-    function quorum(uint256 blockNumber)
-        public
-        view
-        override(IGovernor, GovernorVotesQuorumFraction)
-        returns (uint256)
-    {
+    function quorum(
+        uint256 blockNumber
+    ) public view override(IGovernor, GovernorVotesQuorumFraction) returns (uint256) {
         return super.quorum(blockNumber);
     }
 

+ 1 - 6
contracts/mocks/MathMock.sol

@@ -21,12 +21,7 @@ contract MathMock {
         return Math.ceilDiv(a, b);
     }
 
-    function mulDiv(
-        uint256 a,
-        uint256 b,
-        uint256 denominator,
-        Math.Rounding direction
-    ) public pure returns (uint256) {
+    function mulDiv(uint256 a, uint256 b, uint256 denominator, Math.Rounding direction) public pure returns (uint256) {
         return Math.mulDiv(a, b, denominator, direction);
     }
 

+ 2 - 10
contracts/mocks/MerkleProofWrapper.sol

@@ -5,19 +5,11 @@ pragma solidity ^0.8.0;
 import "../utils/cryptography/MerkleProof.sol";
 
 contract MerkleProofWrapper {
-    function verify(
-        bytes32[] memory proof,
-        bytes32 root,
-        bytes32 leaf
-    ) public pure returns (bool) {
+    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) public pure returns (bool) {
         return MerkleProof.verify(proof, root, leaf);
     }
 
-    function verifyCalldata(
-        bytes32[] calldata proof,
-        bytes32 root,
-        bytes32 leaf
-    ) public pure returns (bool) {
+    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) public pure returns (bool) {
         return MerkleProof.verifyCalldata(proof, root, leaf);
     }
 

+ 1 - 6
contracts/mocks/MultipleInheritanceInitializableMocks.sol

@@ -108,12 +108,7 @@ contract SampleFather is Initializable, SampleGramps {
 contract SampleChild is Initializable, SampleMother, SampleFather {
     uint256 public child;
 
-    function initialize(
-        uint256 _mother,
-        string memory _gramps,
-        uint256 _father,
-        uint256 _child
-    ) public initializer {
+    function initialize(uint256 _mother, string memory _gramps, uint256 _father, uint256 _child) public initializer {
         __SampleChild_init(_mother, _gramps, _father, _child);
     }
 

+ 3 - 15
contracts/mocks/SafeERC20Helper.sol

@@ -19,11 +19,7 @@ contract ERC20ReturnFalseMock is Context {
         return false;
     }
 
-    function transferFrom(
-        address,
-        address,
-        uint256
-    ) public returns (bool) {
+    function transferFrom(address, address, uint256) public returns (bool) {
         _dummy = 0;
         return false;
     }
@@ -51,11 +47,7 @@ contract ERC20ReturnTrueMock is Context {
         return true;
     }
 
-    function transferFrom(
-        address,
-        address,
-        uint256
-    ) public returns (bool) {
+    function transferFrom(address, address, uint256) public returns (bool) {
         _dummy = 0;
         return true;
     }
@@ -85,11 +77,7 @@ contract ERC20NoReturnMock is Context {
         _dummy = 0;
     }
 
-    function transferFrom(
-        address,
-        address,
-        uint256
-    ) public {
+    function transferFrom(address, address, uint256) public {
         _dummy = 0;
     }
 

+ 3 - 15
contracts/mocks/SafeMathMock.sol

@@ -47,27 +47,15 @@ contract SafeMathMock {
         return SafeMath.mod(a, b);
     }
 
-    function subWithMessage(
-        uint256 a,
-        uint256 b,
-        string memory errorMessage
-    ) public pure returns (uint256) {
+    function subWithMessage(uint256 a, uint256 b, string memory errorMessage) public pure returns (uint256) {
         return SafeMath.sub(a, b, errorMessage);
     }
 
-    function divWithMessage(
-        uint256 a,
-        uint256 b,
-        string memory errorMessage
-    ) public pure returns (uint256) {
+    function divWithMessage(uint256 a, uint256 b, string memory errorMessage) public pure returns (uint256) {
         return SafeMath.div(a, b, errorMessage);
     }
 
-    function modWithMessage(
-        uint256 a,
-        uint256 b,
-        string memory errorMessage
-    ) public pure returns (uint256) {
+    function modWithMessage(uint256 a, uint256 b, string memory errorMessage) public pure returns (uint256) {
         return SafeMath.mod(a, b, errorMessage);
     }
 

+ 1 - 5
contracts/mocks/SignatureCheckerMock.sol

@@ -7,11 +7,7 @@ import "../utils/cryptography/SignatureChecker.sol";
 contract SignatureCheckerMock {
     using SignatureChecker for address;
 
-    function isValidSignatureNow(
-        address signer,
-        bytes32 hash,
-        bytes memory signature
-    ) public view returns (bool) {
+    function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) public view returns (bool) {
         return signer.isValidSignatureNow(hash, signature);
     }
 }

+ 1 - 5
contracts/mocks/UUPS/UUPSLegacy.sol

@@ -17,11 +17,7 @@ contract UUPSUpgradeableLegacyMock is UUPSUpgradeableMock {
         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
     }
 
-    function _upgradeToAndCallSecureLegacyV1(
-        address newImplementation,
-        bytes memory data,
-        bool forceCall
-    ) internal {
+    function _upgradeToAndCallSecureLegacyV1(address newImplementation, bytes memory data, bool forceCall) internal {
         address oldImplementation = _getImplementation();
 
         // Initial upgrade and setup call

+ 2 - 10
contracts/mocks/crosschain/bridges.sol

@@ -12,11 +12,7 @@ abstract contract BaseRelayMock {
 
     address internal _currentSender;
 
-    function relayAs(
-        address target,
-        bytes calldata data,
-        address sender
-    ) external virtual {
+    function relayAs(address target, bytes calldata data, address sender) external virtual {
         address previousSender = _currentSender;
 
         _currentSender = sender;
@@ -92,11 +88,7 @@ contract BridgeOptimismMock is BaseRelayMock {
  * Polygon
  */
 contract BridgePolygonChildMock is BaseRelayMock {
-    function relayAs(
-        address target,
-        bytes calldata data,
-        address sender
-    ) external override {
+    function relayAs(address target, bytes calldata data, address sender) external override {
         IFxMessageProcessor(target).processMessageFromRoot(0, sender, data);
     }
 }

+ 10 - 18
contracts/mocks/wizard/MyGovernor1.sol

@@ -14,12 +14,10 @@ contract MyGovernor1 is
     GovernorVotesQuorumFraction,
     GovernorCountingSimple
 {
-    constructor(IVotes _token, TimelockController _timelock)
-        Governor("MyGovernor")
-        GovernorVotes(_token)
-        GovernorVotesQuorumFraction(4)
-        GovernorTimelockControl(_timelock)
-    {}
+    constructor(
+        IVotes _token,
+        TimelockController _timelock
+    ) Governor("MyGovernor") GovernorVotes(_token) GovernorVotesQuorumFraction(4) GovernorTimelockControl(_timelock) {}
 
     function votingDelay() public pure override returns (uint256) {
         return 1; // 1 block
@@ -31,12 +29,9 @@ contract MyGovernor1 is
 
     // The following functions are overrides required by Solidity.
 
-    function quorum(uint256 blockNumber)
-        public
-        view
-        override(IGovernor, GovernorVotesQuorumFraction)
-        returns (uint256)
-    {
+    function quorum(
+        uint256 blockNumber
+    ) public view override(IGovernor, GovernorVotesQuorumFraction) returns (uint256) {
         return super.quorum(blockNumber);
     }
 
@@ -76,12 +71,9 @@ contract MyGovernor1 is
         return super._executor();
     }
 
-    function supportsInterface(bytes4 interfaceId)
-        public
-        view
-        override(Governor, GovernorTimelockControl)
-        returns (bool)
-    {
+    function supportsInterface(
+        bytes4 interfaceId
+    ) public view override(Governor, GovernorTimelockControl) returns (bool) {
         return super.supportsInterface(interfaceId);
     }
 }

+ 10 - 18
contracts/mocks/wizard/MyGovernor2.sol

@@ -16,12 +16,10 @@ contract MyGovernor2 is
     GovernorVotesQuorumFraction,
     GovernorCountingSimple
 {
-    constructor(IVotes _token, TimelockController _timelock)
-        Governor("MyGovernor")
-        GovernorVotes(_token)
-        GovernorVotesQuorumFraction(4)
-        GovernorTimelockControl(_timelock)
-    {}
+    constructor(
+        IVotes _token,
+        TimelockController _timelock
+    ) Governor("MyGovernor") GovernorVotes(_token) GovernorVotesQuorumFraction(4) GovernorTimelockControl(_timelock) {}
 
     function votingDelay() public pure override returns (uint256) {
         return 1; // 1 block
@@ -37,12 +35,9 @@ contract MyGovernor2 is
 
     // The following functions are overrides required by Solidity.
 
-    function quorum(uint256 blockNumber)
-        public
-        view
-        override(IGovernor, GovernorVotesQuorumFraction)
-        returns (uint256)
-    {
+    function quorum(
+        uint256 blockNumber
+    ) public view override(IGovernor, GovernorVotesQuorumFraction) returns (uint256) {
         return super.quorum(blockNumber);
     }
 
@@ -82,12 +77,9 @@ contract MyGovernor2 is
         return super._executor();
     }
 
-    function supportsInterface(bytes4 interfaceId)
-        public
-        view
-        override(Governor, GovernorTimelockControl)
-        returns (bool)
-    {
+    function supportsInterface(
+        bytes4 interfaceId
+    ) public view override(Governor, GovernorTimelockControl) returns (bool) {
         return super.supportsInterface(interfaceId);
     }
 }

+ 13 - 24
contracts/mocks/wizard/MyGovernor3.sol

@@ -14,12 +14,10 @@ contract MyGovernor is
     GovernorVotes,
     GovernorVotesQuorumFraction
 {
-    constructor(IVotes _token, TimelockController _timelock)
-        Governor("MyGovernor")
-        GovernorVotes(_token)
-        GovernorVotesQuorumFraction(4)
-        GovernorTimelockControl(_timelock)
-    {}
+    constructor(
+        IVotes _token,
+        TimelockController _timelock
+    ) Governor("MyGovernor") GovernorVotes(_token) GovernorVotesQuorumFraction(4) GovernorTimelockControl(_timelock) {}
 
     function votingDelay() public pure override returns (uint256) {
         return 1; // 1 block
@@ -35,21 +33,15 @@ contract MyGovernor is
 
     // The following functions are overrides required by Solidity.
 
-    function quorum(uint256 blockNumber)
-        public
-        view
-        override(IGovernor, GovernorVotesQuorumFraction)
-        returns (uint256)
-    {
+    function quorum(
+        uint256 blockNumber
+    ) public view override(IGovernor, GovernorVotesQuorumFraction) returns (uint256) {
         return super.quorum(blockNumber);
     }
 
-    function state(uint256 proposalId)
-        public
-        view
-        override(Governor, IGovernor, GovernorTimelockControl)
-        returns (ProposalState)
-    {
+    function state(
+        uint256 proposalId
+    ) public view override(Governor, IGovernor, GovernorTimelockControl) returns (ProposalState) {
         return super.state(proposalId);
     }
 
@@ -85,12 +77,9 @@ contract MyGovernor is
         return super._executor();
     }
 
-    function supportsInterface(bytes4 interfaceId)
-        public
-        view
-        override(Governor, IERC165, GovernorTimelockControl)
-        returns (bool)
-    {
+    function supportsInterface(
+        bytes4 interfaceId
+    ) public view override(Governor, IERC165, GovernorTimelockControl) returns (bool) {
         return super.supportsInterface(interfaceId);
     }
 }

+ 4 - 5
contracts/proxy/Clones.sol

@@ -79,11 +79,10 @@ library Clones {
     /**
      * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
      */
-    function predictDeterministicAddress(address implementation, bytes32 salt)
-        internal
-        view
-        returns (address predicted)
-    {
+    function predictDeterministicAddress(
+        address implementation,
+        bytes32 salt
+    ) internal view returns (address predicted) {
         return predictDeterministicAddress(implementation, salt, address(this));
     }
 }

+ 3 - 15
contracts/proxy/ERC1967/ERC1967Upgrade.sol

@@ -62,11 +62,7 @@ abstract contract ERC1967Upgrade {
      *
      * Emits an {Upgraded} event.
      */
-    function _upgradeToAndCall(
-        address newImplementation,
-        bytes memory data,
-        bool forceCall
-    ) internal {
+    function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {
         _upgradeTo(newImplementation);
         if (data.length > 0 || forceCall) {
             Address.functionDelegateCall(newImplementation, data);
@@ -78,11 +74,7 @@ abstract contract ERC1967Upgrade {
      *
      * Emits an {Upgraded} event.
      */
-    function _upgradeToAndCallUUPS(
-        address newImplementation,
-        bytes memory data,
-        bool forceCall
-    ) internal {
+    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {
         // Upgrades from old implementations will perform a rollback test. This test requires the new
         // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
         // this special case will break upgrade paths from old UUPS implementation to new ones.
@@ -175,11 +167,7 @@ abstract contract ERC1967Upgrade {
      *
      * Emits a {BeaconUpgraded} event.
      */
-    function _upgradeBeaconToAndCall(
-        address newBeacon,
-        bytes memory data,
-        bool forceCall
-    ) internal {
+    function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {
         _setBeacon(newBeacon);
         emit BeaconUpgraded(newBeacon);
         if (data.length > 0 || forceCall) {

+ 1 - 5
contracts/proxy/transparent/TransparentUpgradeableProxy.sol

@@ -31,11 +31,7 @@ contract TransparentUpgradeableProxy is ERC1967Proxy {
      * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
      * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.
      */
-    constructor(
-        address _logic,
-        address admin_,
-        bytes memory _data
-    ) payable ERC1967Proxy(_logic, _data) {
+    constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {
         _changeAdmin(admin_);
     }
 

+ 8 - 28
contracts/token/ERC1155/ERC1155.sol

@@ -79,13 +79,10 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
      *
      * - `accounts` and `ids` must have the same length.
      */
-    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
-        public
-        view
-        virtual
-        override
-        returns (uint256[] memory)
-    {
+    function balanceOfBatch(
+        address[] memory accounts,
+        uint256[] memory ids
+    ) public view virtual override returns (uint256[] memory) {
         require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");
 
         uint256[] memory batchBalances = new uint256[](accounts.length);
@@ -263,12 +260,7 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
      * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
      * acceptance magic value.
      */
-    function _mint(
-        address to,
-        uint256 id,
-        uint256 amount,
-        bytes memory data
-    ) internal virtual {
+    function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {
         require(to != address(0), "ERC1155: mint to the zero address");
 
         address operator = _msgSender();
@@ -330,11 +322,7 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
      * - `from` cannot be the zero address.
      * - `from` must have at least `amount` tokens of token type `id`.
      */
-    function _burn(
-        address from,
-        uint256 id,
-        uint256 amount
-    ) internal virtual {
+    function _burn(address from, uint256 id, uint256 amount) internal virtual {
         require(from != address(0), "ERC1155: burn from the zero address");
 
         address operator = _msgSender();
@@ -363,11 +351,7 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
      *
      * - `ids` and `amounts` must have the same length.
      */
-    function _burnBatch(
-        address from,
-        uint256[] memory ids,
-        uint256[] memory amounts
-    ) internal virtual {
+    function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {
         require(from != address(0), "ERC1155: burn from the zero address");
         require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
 
@@ -396,11 +380,7 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
      *
      * Emits an {ApprovalForAll} event.
      */
-    function _setApprovalForAll(
-        address owner,
-        address operator,
-        bool approved
-    ) internal virtual {
+    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
         require(owner != operator, "ERC1155: setting approval status for self");
         _operatorApprovals[owner][operator] = approved;
         emit ApprovalForAll(owner, operator, approved);

+ 5 - 11
contracts/token/ERC1155/IERC1155.sol

@@ -60,10 +60,10 @@ interface IERC1155 is IERC165 {
      *
      * - `accounts` and `ids` must have the same length.
      */
-    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
-        external
-        view
-        returns (uint256[] memory);
+    function balanceOfBatch(
+        address[] calldata accounts,
+        uint256[] calldata ids
+    ) external view returns (uint256[] memory);
 
     /**
      * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
@@ -96,13 +96,7 @@ interface IERC1155 is IERC165 {
      * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
      * acceptance magic value.
      */
-    function safeTransferFrom(
-        address from,
-        address to,
-        uint256 id,
-        uint256 amount,
-        bytes calldata data
-    ) external;
+    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;
 
     /**
      * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.

+ 2 - 10
contracts/token/ERC1155/extensions/ERC1155Burnable.sol

@@ -12,11 +12,7 @@ import "../ERC1155.sol";
  * _Available since v3.1._
  */
 abstract contract ERC1155Burnable is ERC1155 {
-    function burn(
-        address account,
-        uint256 id,
-        uint256 value
-    ) public virtual {
+    function burn(address account, uint256 id, uint256 value) public virtual {
         require(
             account == _msgSender() || isApprovedForAll(account, _msgSender()),
             "ERC1155: caller is not token owner or approved"
@@ -25,11 +21,7 @@ abstract contract ERC1155Burnable is ERC1155 {
         _burn(account, id, value);
     }
 
-    function burnBatch(
-        address account,
-        uint256[] memory ids,
-        uint256[] memory values
-    ) public virtual {
+    function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {
         require(
             account == _msgSender() || isApprovedForAll(account, _msgSender()),
             "ERC1155: caller is not token owner or approved"

+ 5 - 25
contracts/token/ERC20/ERC20.sol

@@ -154,11 +154,7 @@ contract ERC20 is Context, IERC20, IERC20Metadata {
      * - the caller must have allowance for ``from``'s tokens of at least
      * `amount`.
      */
-    function transferFrom(
-        address from,
-        address to,
-        uint256 amount
-    ) public virtual override returns (bool) {
+    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
         address spender = _msgSender();
         _spendAllowance(from, spender, amount);
         _transfer(from, to, amount);
@@ -218,11 +214,7 @@ contract ERC20 is Context, IERC20, IERC20Metadata {
      *
      * NOTE: This function is not virtual, {_update} should be overridden instead.
      */
-    function _transfer(
-        address from,
-        address to,
-        uint256 amount
-    ) internal {
+    function _transfer(address from, address to, uint256 amount) internal {
         require(from != address(0), "ERC20: transfer from the zero address");
         require(to != address(0), "ERC20: transfer to the zero address");
         _update(from, to, amount);
@@ -234,11 +226,7 @@ contract ERC20 is Context, IERC20, IERC20Metadata {
      *
      * Emits a {Transfer} event.
      */
-    function _update(
-        address from,
-        address to,
-        uint256 amount
-    ) internal virtual {
+    function _update(address from, address to, uint256 amount) internal virtual {
         if (from == address(0)) {
             _totalSupply += amount;
             unchecked {
@@ -306,11 +294,7 @@ contract ERC20 is Context, IERC20, IERC20Metadata {
      * - `owner` cannot be the zero address.
      * - `spender` cannot be the zero address.
      */
-    function _approve(
-        address owner,
-        address spender,
-        uint256 amount
-    ) internal virtual {
+    function _approve(address owner, address spender, uint256 amount) internal virtual {
         require(owner != address(0), "ERC20: approve from the zero address");
         require(spender != address(0), "ERC20: approve to the zero address");
 
@@ -326,11 +310,7 @@ contract ERC20 is Context, IERC20, IERC20Metadata {
      *
      * Might emit an {Approval} event.
      */
-    function _spendAllowance(
-        address owner,
-        address spender,
-        uint256 amount
-    ) internal virtual {
+    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
         uint256 currentAllowance = allowance(owner, spender);
         if (currentAllowance != type(uint256).max) {
             require(currentAllowance >= amount, "ERC20: insufficient allowance");

+ 1 - 5
contracts/token/ERC20/IERC20.sol

@@ -74,9 +74,5 @@ interface IERC20 {
      *
      * Emits a {Transfer} event.
      */
-    function transferFrom(
-        address from,
-        address to,
-        uint256 amount
-    ) external returns (bool);
+    function transferFrom(address from, address to, uint256 amount) external returns (bool);
 }

+ 1 - 5
contracts/token/ERC20/extensions/ERC20Capped.sol

@@ -30,11 +30,7 @@ abstract contract ERC20Capped is ERC20 {
     /**
      * @dev See {ERC20-_transfer}.
      */
-    function _update(
-        address from,
-        address to,
-        uint256 amount
-    ) internal virtual override {
+    function _update(address from, address to, uint256 amount) internal virtual override {
         if (from == address(0)) {
             require(ERC20.totalSupply() + amount <= cap(), "ERC20Capped: cap exceeded");
         }

+ 1 - 5
contracts/token/ERC20/extensions/ERC20Pausable.sol

@@ -21,11 +21,7 @@ abstract contract ERC20Pausable is ERC20, Pausable {
      *
      * - the contract must not be paused.
      */
-    function _update(
-        address from,
-        address to,
-        uint256 amount
-    ) internal virtual override {
+    function _update(address from, address to, uint256 amount) internal virtual override {
         require(!paused(), "ERC20Pausable: token transfer while paused");
         super._update(from, to, amount);
     }

+ 1 - 5
contracts/token/ERC20/extensions/ERC20Snapshot.sol

@@ -120,11 +120,7 @@ abstract contract ERC20Snapshot is ERC20 {
 
     // Update balance and/or total supply snapshots before the values are modified. This is executed
     // for _mint, _burn, and _transfer operations.
-    function _update(
-        address from,
-        address to,
-        uint256 amount
-    ) internal virtual override {
+    function _update(address from, address to, uint256 amount) internal virtual override {
         if (from == address(0)) {
             // mint
             _updateAccountSnapshot(to);

+ 1 - 5
contracts/token/ERC20/extensions/ERC20Votes.sol

@@ -35,11 +35,7 @@ abstract contract ERC20Votes is ERC20, Votes {
      *
      * Emits a {IVotes-DelegateVotesChanged} event.
      */
-    function _update(
-        address from,
-        address to,
-        uint256 amount
-    ) internal virtual override {
+    function _update(address from, address to, uint256 amount) internal virtual override {
         super._update(from, to, amount);
         if (from == address(0)) {
             require(totalSupply() <= _maxSupply(), "ERC20Votes: total supply risks overflowing votes");

+ 3 - 16
contracts/token/ERC20/extensions/ERC4626.sol

@@ -153,11 +153,7 @@ abstract contract ERC4626 is ERC20, IERC4626 {
     }
 
     /** @dev See {IERC4626-withdraw}. */
-    function withdraw(
-        uint256 assets,
-        address receiver,
-        address owner
-    ) public virtual override returns (uint256) {
+    function withdraw(uint256 assets, address receiver, address owner) public virtual override returns (uint256) {
         require(assets <= maxWithdraw(owner), "ERC4626: withdraw more than max");
 
         uint256 shares = previewWithdraw(assets);
@@ -167,11 +163,7 @@ abstract contract ERC4626 is ERC20, IERC4626 {
     }
 
     /** @dev See {IERC4626-redeem}. */
-    function redeem(
-        uint256 shares,
-        address receiver,
-        address owner
-    ) public virtual override returns (uint256) {
+    function redeem(uint256 shares, address receiver, address owner) public virtual override returns (uint256) {
         require(shares <= maxRedeem(owner), "ERC4626: redeem more than max");
 
         uint256 assets = previewRedeem(shares);
@@ -230,12 +222,7 @@ abstract contract ERC4626 is ERC20, IERC4626 {
     /**
      * @dev Deposit/mint common workflow.
      */
-    function _deposit(
-        address caller,
-        address receiver,
-        uint256 assets,
-        uint256 shares
-    ) internal virtual {
+    function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual {
         // If _asset is ERC777, `transferFrom` can trigger a reenterancy BEFORE the transfer happens through the
         // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer,
         // calls the vault, which is assumed not malicious.

+ 5 - 26
contracts/token/ERC20/utils/SafeERC20.sol

@@ -19,20 +19,11 @@ import "../../../utils/Address.sol";
 library SafeERC20 {
     using Address for address;
 
-    function safeTransfer(
-        IERC20 token,
-        address to,
-        uint256 value
-    ) internal {
+    function safeTransfer(IERC20 token, address to, uint256 value) internal {
         _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
     }
 
-    function safeTransferFrom(
-        IERC20 token,
-        address from,
-        address to,
-        uint256 value
-    ) internal {
+    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
         _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
     }
 
@@ -43,11 +34,7 @@ library SafeERC20 {
      * Whenever possible, use {safeIncreaseAllowance} and
      * {safeDecreaseAllowance} instead.
      */
-    function safeApprove(
-        IERC20 token,
-        address spender,
-        uint256 value
-    ) internal {
+    function safeApprove(IERC20 token, address spender, uint256 value) internal {
         // safeApprove should only be called when setting an initial allowance,
         // or when resetting it to zero. To increase and decrease it, use
         // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
@@ -58,20 +45,12 @@ library SafeERC20 {
         _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
     }
 
-    function safeIncreaseAllowance(
-        IERC20 token,
-        address spender,
-        uint256 value
-    ) internal {
+    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
         uint256 newAllowance = token.allowance(address(this), spender) + value;
         _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
     }
 
-    function safeDecreaseAllowance(
-        IERC20 token,
-        address spender,
-        uint256 value
-    ) internal {
+    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
         unchecked {
             uint256 oldAllowance = token.allowance(address(this), spender);
             require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");

+ 1 - 5
contracts/token/ERC20/utils/TokenTimelock.sol

@@ -29,11 +29,7 @@ contract TokenTimelock {
      * `beneficiary_` when {release} is invoked after `releaseTime_`. The release time is specified as a Unix timestamp
      * (in seconds).
      */
-    constructor(
-        IERC20 token_,
-        address beneficiary_,
-        uint256 releaseTime_
-    ) {
+    constructor(IERC20 token_, address beneficiary_, uint256 releaseTime_) {
         require(releaseTime_ > block.timestamp, "TokenTimelock: release time is before current time");
         _token = token_;
         _beneficiary = beneficiary_;

+ 9 - 44
contracts/token/ERC721/ERC721.sol

@@ -147,11 +147,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
     /**
      * @dev See {IERC721-transferFrom}.
      */
-    function transferFrom(
-        address from,
-        address to,
-        uint256 tokenId
-    ) public virtual override {
+    function transferFrom(address from, address to, uint256 tokenId) public virtual override {
         //solhint-disable-next-line max-line-length
         require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
 
@@ -161,23 +157,14 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
     /**
      * @dev See {IERC721-safeTransferFrom}.
      */
-    function safeTransferFrom(
-        address from,
-        address to,
-        uint256 tokenId
-    ) public virtual override {
+    function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
         safeTransferFrom(from, to, tokenId, "");
     }
 
     /**
      * @dev See {IERC721-safeTransferFrom}.
      */
-    function safeTransferFrom(
-        address from,
-        address to,
-        uint256 tokenId,
-        bytes memory data
-    ) public virtual override {
+    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {
         require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
         _safeTransfer(from, to, tokenId, data);
     }
@@ -200,12 +187,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
      *
      * Emits a {Transfer} event.
      */
-    function _safeTransfer(
-        address from,
-        address to,
-        uint256 tokenId,
-        bytes memory data
-    ) internal virtual {
+    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
         _transfer(from, to, tokenId);
         require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
     }
@@ -259,11 +241,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
      * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
      * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
      */
-    function _safeMint(
-        address to,
-        uint256 tokenId,
-        bytes memory data
-    ) internal virtual {
+    function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {
         _mint(to, tokenId);
         require(
             _checkOnERC721Received(address(0), to, tokenId, data),
@@ -352,11 +330,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
      *
      * Emits a {Transfer} event.
      */
-    function _transfer(
-        address from,
-        address to,
-        uint256 tokenId
-    ) internal virtual {
+    function _transfer(address from, address to, uint256 tokenId) internal virtual {
         require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
         require(to != address(0), "ERC721: transfer to the zero address");
 
@@ -399,11 +373,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
      *
      * Emits an {ApprovalForAll} event.
      */
-    function _setApprovalForAll(
-        address owner,
-        address operator,
-        bool approved
-    ) internal virtual {
+    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
         require(owner != operator, "ERC721: approve to caller");
         _operatorApprovals[owner][operator] = approved;
         emit ApprovalForAll(owner, operator, approved);
@@ -467,7 +437,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
     function _beforeTokenTransfer(
         address from,
         address to,
-        uint256, /* firstTokenId */
+        uint256 /* firstTokenId */,
         uint256 batchSize
     ) internal virtual {
         if (batchSize > 1) {
@@ -494,10 +464,5 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
      *
      * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
      */
-    function _afterTokenTransfer(
-        address from,
-        address to,
-        uint256 firstTokenId,
-        uint256 batchSize
-    ) internal virtual {}
+    function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}
 }

+ 3 - 16
contracts/token/ERC721/IERC721.sol

@@ -51,12 +51,7 @@ interface IERC721 is IERC165 {
      *
      * Emits a {Transfer} event.
      */
-    function safeTransferFrom(
-        address from,
-        address to,
-        uint256 tokenId,
-        bytes calldata data
-    ) external;
+    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
 
     /**
      * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
@@ -72,11 +67,7 @@ interface IERC721 is IERC165 {
      *
      * Emits a {Transfer} event.
      */
-    function safeTransferFrom(
-        address from,
-        address to,
-        uint256 tokenId
-    ) external;
+    function safeTransferFrom(address from, address to, uint256 tokenId) external;
 
     /**
      * @dev Transfers `tokenId` token from `from` to `to`.
@@ -94,11 +85,7 @@ interface IERC721 is IERC165 {
      *
      * Emits a {Transfer} event.
      */
-    function transferFrom(
-        address from,
-        address to,
-        uint256 tokenId
-    ) external;
+    function transferFrom(address from, address to, uint256 tokenId) external;
 
     /**
      * @dev Gives permission to `to` to transfer `tokenId` token to another account.

+ 1 - 6
contracts/token/ERC721/utils/ERC721Holder.sol

@@ -17,12 +17,7 @@ contract ERC721Holder is IERC721Receiver {
      *
      * Always returns `IERC721Receiver.onERC721Received.selector`.
      */
-    function onERC721Received(
-        address,
-        address,
-        uint256,
-        bytes memory
-    ) public virtual override returns (bytes4) {
+    function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {
         return this.onERC721Received.selector;
     }
 }

+ 8 - 43
contracts/token/ERC777/ERC777.sol

@@ -57,11 +57,7 @@ contract ERC777 is Context, IERC777, IERC20 {
     /**
      * @dev `defaultOperators` may be an empty array.
      */
-    constructor(
-        string memory name_,
-        string memory symbol_,
-        address[] memory defaultOperators_
-    ) {
+    constructor(string memory name_, string memory symbol_, address[] memory defaultOperators_) {
         _name = name_;
         _symbol = symbol_;
 
@@ -127,11 +123,7 @@ contract ERC777 is Context, IERC777, IERC20 {
      *
      * Also emits a {IERC20-Transfer} event for ERC20 compatibility.
      */
-    function send(
-        address recipient,
-        uint256 amount,
-        bytes memory data
-    ) public virtual override {
+    function send(address recipient, uint256 amount, bytes memory data) public virtual override {
         _send(_msgSender(), recipient, amount, data, "", true);
     }
 
@@ -272,11 +264,7 @@ contract ERC777 is Context, IERC777, IERC20 {
      *
      * Emits {Sent}, {IERC20-Transfer} and {IERC20-Approval} events.
      */
-    function transferFrom(
-        address holder,
-        address recipient,
-        uint256 amount
-    ) public virtual override returns (bool) {
+    function transferFrom(address holder, address recipient, uint256 amount) public virtual override returns (bool) {
         address spender = _msgSender();
         _spendAllowance(holder, spender, amount);
         _send(holder, recipient, amount, "", "", false);
@@ -301,12 +289,7 @@ contract ERC777 is Context, IERC777, IERC20 {
      * - if `account` is a contract, it must implement the {IERC777Recipient}
      * interface.
      */
-    function _mint(
-        address account,
-        uint256 amount,
-        bytes memory userData,
-        bytes memory operatorData
-    ) internal virtual {
+    function _mint(address account, uint256 amount, bytes memory userData, bytes memory operatorData) internal virtual {
         _mint(account, amount, userData, operatorData, true);
     }
 
@@ -387,12 +370,7 @@ contract ERC777 is Context, IERC777, IERC20 {
      * @param data bytes extra information provided by the token holder
      * @param operatorData bytes extra information provided by the operator (if any)
      */
-    function _burn(
-        address from,
-        uint256 amount,
-        bytes memory data,
-        bytes memory operatorData
-    ) internal virtual {
+    function _burn(address from, uint256 amount, bytes memory data, bytes memory operatorData) internal virtual {
         require(from != address(0), "ERC777: burn from the zero address");
 
         address operator = _msgSender();
@@ -439,11 +417,7 @@ contract ERC777 is Context, IERC777, IERC20 {
      *
      * Note that accounts cannot have allowance issued by their operators.
      */
-    function _approve(
-        address holder,
-        address spender,
-        uint256 value
-    ) internal virtual {
+    function _approve(address holder, address spender, uint256 value) internal virtual {
         require(holder != address(0), "ERC777: approve from the zero address");
         require(spender != address(0), "ERC777: approve to the zero address");
 
@@ -510,11 +484,7 @@ contract ERC777 is Context, IERC777, IERC20 {
      *
      * Might emit an {IERC20-Approval} event.
      */
-    function _spendAllowance(
-        address owner,
-        address spender,
-        uint256 amount
-    ) internal virtual {
+    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
         uint256 currentAllowance = allowance(owner, spender);
         if (currentAllowance != type(uint256).max) {
             require(currentAllowance >= amount, "ERC777: insufficient allowance");
@@ -538,10 +508,5 @@ contract ERC777 is Context, IERC777, IERC20 {
      *
      * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
      */
-    function _beforeTokenTransfer(
-        address operator,
-        address from,
-        address to,
-        uint256 amount
-    ) internal virtual {}
+    function _beforeTokenTransfer(address operator, address from, address to, uint256 amount) internal virtual {}
 }

+ 2 - 11
contracts/token/ERC777/IERC777.sol

@@ -83,11 +83,7 @@ interface IERC777 {
      * - if `recipient` is a contract, it must implement the {IERC777Recipient}
      * interface.
      */
-    function send(
-        address recipient,
-        uint256 amount,
-        bytes calldata data
-    ) external;
+    function send(address recipient, uint256 amount, bytes calldata data) external;
 
     /**
      * @dev Destroys `amount` tokens from the caller's account, reducing the
@@ -191,12 +187,7 @@ interface IERC777 {
      * - `account` must have at least `amount` tokens.
      * - the caller must be an operator for `account`.
      */
-    function operatorBurn(
-        address account,
-        uint256 amount,
-        bytes calldata data,
-        bytes calldata operatorData
-    ) external;
+    function operatorBurn(address account, uint256 amount, bytes calldata data, bytes calldata operatorData) external;
 
     event Sent(
         address indexed operator,

+ 1 - 5
contracts/token/common/ERC2981.sol

@@ -91,11 +91,7 @@ abstract contract ERC2981 is IERC2981, ERC165 {
      * - `receiver` cannot be the zero address.
      * - `feeNumerator` cannot be greater than the fee denominator.
      */
-    function _setTokenRoyalty(
-        uint256 tokenId,
-        address receiver,
-        uint96 feeNumerator
-    ) internal virtual {
+    function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual {
         require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
         require(receiver != address(0), "ERC2981: Invalid parameters");
 

+ 1 - 5
contracts/utils/Address.sol

@@ -111,11 +111,7 @@ library Address {
      *
      * _Available since v3.1._
      */
-    function functionCallWithValue(
-        address target,
-        bytes memory data,
-        uint256 value
-    ) internal returns (bytes memory) {
+    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
         return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
     }
 

+ 18 - 62
contracts/utils/Checkpoints.sol

@@ -111,15 +111,9 @@ library Checkpoints {
      * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
      * in the most recent checkpoint.
      */
-    function latestCheckpoint(History storage self)
-        internal
-        view
-        returns (
-            bool exists,
-            uint32 _blockNumber,
-            uint224 _value
-        )
-    {
+    function latestCheckpoint(
+        History storage self
+    ) internal view returns (bool exists, uint32 _blockNumber, uint224 _value) {
         uint256 pos = self._checkpoints.length;
         if (pos == 0) {
             return (false, 0, 0);
@@ -140,11 +134,7 @@ library Checkpoints {
      * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,
      * or by updating the last one.
      */
-    function _insert(
-        Checkpoint[] storage self,
-        uint32 key,
-        uint224 value
-    ) private returns (uint224, uint224) {
+    function _insert(Checkpoint[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) {
         uint256 pos = self.length;
 
         if (pos > 0) {
@@ -237,11 +227,7 @@ library Checkpoints {
      *
      * Returns previous value and new value.
      */
-    function push(
-        Trace224 storage self,
-        uint32 key,
-        uint224 value
-    ) internal returns (uint224, uint224) {
+    function push(Trace224 storage self, uint32 key, uint224 value) internal returns (uint224, uint224) {
         return _insert(self._checkpoints, key, value);
     }
 
@@ -275,15 +261,7 @@ library Checkpoints {
      * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
      * in the most recent checkpoint.
      */
-    function latestCheckpoint(Trace224 storage self)
-        internal
-        view
-        returns (
-            bool exists,
-            uint32 _key,
-            uint224 _value
-        )
-    {
+    function latestCheckpoint(Trace224 storage self) internal view returns (bool exists, uint32 _key, uint224 _value) {
         uint256 pos = self._checkpoints.length;
         if (pos == 0) {
             return (false, 0, 0);
@@ -304,11 +282,7 @@ library Checkpoints {
      * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,
      * or by updating the last one.
      */
-    function _insert(
-        Checkpoint224[] storage self,
-        uint32 key,
-        uint224 value
-    ) private returns (uint224, uint224) {
+    function _insert(Checkpoint224[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) {
         uint256 pos = self.length;
 
         if (pos > 0) {
@@ -380,11 +354,10 @@ library Checkpoints {
     /**
      * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.
      */
-    function _unsafeAccess(Checkpoint224[] storage self, uint256 pos)
-        private
-        pure
-        returns (Checkpoint224 storage result)
-    {
+    function _unsafeAccess(
+        Checkpoint224[] storage self,
+        uint256 pos
+    ) private pure returns (Checkpoint224 storage result) {
         assembly {
             mstore(0, self.slot)
             result.slot := add(keccak256(0, 0x20), pos)
@@ -405,11 +378,7 @@ library Checkpoints {
      *
      * Returns previous value and new value.
      */
-    function push(
-        Trace160 storage self,
-        uint96 key,
-        uint160 value
-    ) internal returns (uint160, uint160) {
+    function push(Trace160 storage self, uint96 key, uint160 value) internal returns (uint160, uint160) {
         return _insert(self._checkpoints, key, value);
     }
 
@@ -443,15 +412,7 @@ library Checkpoints {
      * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value
      * in the most recent checkpoint.
      */
-    function latestCheckpoint(Trace160 storage self)
-        internal
-        view
-        returns (
-            bool exists,
-            uint96 _key,
-            uint160 _value
-        )
-    {
+    function latestCheckpoint(Trace160 storage self) internal view returns (bool exists, uint96 _key, uint160 _value) {
         uint256 pos = self._checkpoints.length;
         if (pos == 0) {
             return (false, 0, 0);
@@ -472,11 +433,7 @@ library Checkpoints {
      * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint,
      * or by updating the last one.
      */
-    function _insert(
-        Checkpoint160[] storage self,
-        uint96 key,
-        uint160 value
-    ) private returns (uint160, uint160) {
+    function _insert(Checkpoint160[] storage self, uint96 key, uint160 value) private returns (uint160, uint160) {
         uint256 pos = self.length;
 
         if (pos > 0) {
@@ -548,11 +505,10 @@ library Checkpoints {
     /**
      * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds.
      */
-    function _unsafeAccess(Checkpoint160[] storage self, uint256 pos)
-        private
-        pure
-        returns (Checkpoint160 storage result)
-    {
+    function _unsafeAccess(
+        Checkpoint160[] storage self,
+        uint256 pos
+    ) private pure returns (Checkpoint160 storage result) {
         assembly {
             mstore(0, self.slot)
             result.slot := add(keccak256(0, 0x20), pos)

+ 2 - 10
contracts/utils/Create2.sol

@@ -27,11 +27,7 @@ library Create2 {
      * - the factory must have a balance of at least `amount`.
      * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.
      */
-    function deploy(
-        uint256 amount,
-        bytes32 salt,
-        bytes memory bytecode
-    ) internal returns (address addr) {
+    function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) {
         require(address(this).balance >= amount, "Create2: insufficient balance");
         require(bytecode.length != 0, "Create2: bytecode length is zero");
         /// @solidity memory-safe-assembly
@@ -53,11 +49,7 @@ library Create2 {
      * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
      * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
      */
-    function computeAddress(
-        bytes32 salt,
-        bytes32 bytecodeHash,
-        address deployer
-    ) internal pure returns (address addr) {
+    function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) {
         /// @solidity memory-safe-assembly
         assembly {
             let ptr := mload(0x40) // Get free memory pointer

+ 4 - 22
contracts/utils/cryptography/ECDSA.sol

@@ -98,11 +98,7 @@ library ECDSA {
      *
      * _Available since v4.3._
      */
-    function tryRecover(
-        bytes32 hash,
-        bytes32 r,
-        bytes32 vs
-    ) internal pure returns (address, RecoverError) {
+    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
         bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
         uint8 v = uint8((uint256(vs) >> 255) + 27);
         return tryRecover(hash, v, r, s);
@@ -113,11 +109,7 @@ library ECDSA {
      *
      * _Available since v4.2._
      */
-    function recover(
-        bytes32 hash,
-        bytes32 r,
-        bytes32 vs
-    ) internal pure returns (address) {
+    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
         (address recovered, RecoverError error) = tryRecover(hash, r, vs);
         _throwError(error);
         return recovered;
@@ -129,12 +121,7 @@ library ECDSA {
      *
      * _Available since v4.3._
      */
-    function tryRecover(
-        bytes32 hash,
-        uint8 v,
-        bytes32 r,
-        bytes32 s
-    ) internal pure returns (address, RecoverError) {
+    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {
         // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
         // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
         // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
@@ -161,12 +148,7 @@ library ECDSA {
      * @dev Overload of {ECDSA-recover} that receives the `v`,
      * `r` and `s` signature fields separately.
      */
-    function recover(
-        bytes32 hash,
-        uint8 v,
-        bytes32 r,
-        bytes32 s
-    ) internal pure returns (address) {
+    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
         (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
         _throwError(error);
         return recovered;

+ 2 - 10
contracts/utils/cryptography/MerkleProof.sol

@@ -24,11 +24,7 @@ library MerkleProof {
      * sibling hashes on the branch from the leaf to the root of the tree. Each
      * pair of leaves and each pair of pre-images are assumed to be sorted.
      */
-    function verify(
-        bytes32[] memory proof,
-        bytes32 root,
-        bytes32 leaf
-    ) internal pure returns (bool) {
+    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
         return processProof(proof, leaf) == root;
     }
 
@@ -37,11 +33,7 @@ library MerkleProof {
      *
      * _Available since v4.7._
      */
-    function verifyCalldata(
-        bytes32[] calldata proof,
-        bytes32 root,
-        bytes32 leaf
-    ) internal pure returns (bool) {
+    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
         return processProofCalldata(proof, leaf) == root;
     }
 

+ 1 - 5
contracts/utils/cryptography/SignatureChecker.sol

@@ -21,11 +21,7 @@ library SignatureChecker {
      * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
      * change through time. It could return true at block N and false at block N+1 (or the opposite).
      */
-    function isValidSignatureNow(
-        address signer,
-        bytes32 hash,
-        bytes memory signature
-    ) internal view returns (bool) {
+    function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {
         (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);
         if (error == ECDSA.RecoverError.NoError && recovered == signer) {
             return true;

+ 4 - 5
contracts/utils/introspection/ERC165Checker.sol

@@ -48,11 +48,10 @@ library ERC165Checker {
      *
      * _Available since v3.4._
      */
-    function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)
-        internal
-        view
-        returns (bool[] memory)
-    {
+    function getSupportedInterfaces(
+        address account,
+        bytes4[] memory interfaceIds
+    ) internal view returns (bool[] memory) {
         // an array of booleans corresponding to interfaceIds and whether they're supported or not
         bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);
 

+ 4 - 7
contracts/utils/introspection/ERC1820Implementer.sol

@@ -21,13 +21,10 @@ contract ERC1820Implementer is IERC1820Implementer {
     /**
      * @dev See {IERC1820Implementer-canImplementInterfaceForAddress}.
      */
-    function canImplementInterfaceForAddress(bytes32 interfaceHash, address account)
-        public
-        view
-        virtual
-        override
-        returns (bytes32)
-    {
+    function canImplementInterfaceForAddress(
+        bytes32 interfaceHash,
+        address account
+    ) public view virtual override returns (bytes32) {
         return _supportedInterfaces[interfaceHash][account] ? _ERC1820_ACCEPT_MAGIC : bytes32(0x00);
     }
 

+ 1 - 5
contracts/utils/introspection/IERC1820Registry.sol

@@ -64,11 +64,7 @@ interface IERC1820Registry {
      * queried for support, unless `implementer` is the caller. See
      * {IERC1820Implementer-canImplementInterfaceForAddress}.
      */
-    function setInterfaceImplementer(
-        address account,
-        bytes32 _interfaceHash,
-        address implementer
-    ) external;
+    function setInterfaceImplementer(address account, bytes32 _interfaceHash, address implementer) external;
 
     /**
      * @dev Returns the implementer of `interfaceHash` for `account`. If no such

+ 16 - 25
contracts/utils/math/Math.sol

@@ -52,11 +52,7 @@ library Math {
      * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
      * with further edits by Uniswap Labs also under MIT license.
      */
-    function mulDiv(
-        uint256 x,
-        uint256 y,
-        uint256 denominator
-    ) internal pure returns (uint256 result) {
+    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
         unchecked {
             // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
             // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
@@ -137,12 +133,7 @@ library Math {
     /**
      * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
      */
-    function mulDiv(
-        uint256 x,
-        uint256 y,
-        uint256 denominator,
-        Rounding rounding
-    ) internal pure returns (uint256) {
+    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
         uint256 result = mulDiv(x, y, denominator);
         if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
             result += 1;
@@ -258,31 +249,31 @@ library Math {
     function log10(uint256 value) internal pure returns (uint256) {
         uint256 result = 0;
         unchecked {
-            if (value >= 10**64) {
-                value /= 10**64;
+            if (value >= 10 ** 64) {
+                value /= 10 ** 64;
                 result += 64;
             }
-            if (value >= 10**32) {
-                value /= 10**32;
+            if (value >= 10 ** 32) {
+                value /= 10 ** 32;
                 result += 32;
             }
-            if (value >= 10**16) {
-                value /= 10**16;
+            if (value >= 10 ** 16) {
+                value /= 10 ** 16;
                 result += 16;
             }
-            if (value >= 10**8) {
-                value /= 10**8;
+            if (value >= 10 ** 8) {
+                value /= 10 ** 8;
                 result += 8;
             }
-            if (value >= 10**4) {
-                value /= 10**4;
+            if (value >= 10 ** 4) {
+                value /= 10 ** 4;
                 result += 4;
             }
-            if (value >= 10**2) {
-                value /= 10**2;
+            if (value >= 10 ** 2) {
+                value /= 10 ** 2;
                 result += 2;
             }
-            if (value >= 10**1) {
+            if (value >= 10 ** 1) {
                 result += 1;
             }
         }
@@ -296,7 +287,7 @@ library Math {
     function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
         unchecked {
             uint256 result = log10(value);
-            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
+            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
         }
     }
 

+ 3 - 15
contracts/utils/math/SafeMath.sol

@@ -165,11 +165,7 @@ library SafeMath {
      *
      * - Subtraction cannot overflow.
      */
-    function sub(
-        uint256 a,
-        uint256 b,
-        string memory errorMessage
-    ) internal pure returns (uint256) {
+    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         unchecked {
             require(b <= a, errorMessage);
             return a - b;
@@ -188,11 +184,7 @@ library SafeMath {
      *
      * - The divisor cannot be zero.
      */
-    function div(
-        uint256 a,
-        uint256 b,
-        string memory errorMessage
-    ) internal pure returns (uint256) {
+    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         unchecked {
             require(b > 0, errorMessage);
             return a / b;
@@ -214,11 +206,7 @@ library SafeMath {
      *
      * - The divisor cannot be zero.
      */
-    function mod(
-        uint256 a,
-        uint256 b,
-        string memory errorMessage
-    ) internal pure returns (uint256) {
+    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         unchecked {
             require(b > 0, errorMessage);
             return a % b;

+ 1 - 5
contracts/utils/structs/BitMaps.sol

@@ -23,11 +23,7 @@ library BitMaps {
     /**
      * @dev Sets the bit at `index` to the boolean `value`.
      */
-    function setTo(
-        BitMap storage bitmap,
-        uint256 index,
-        bool value
-    ) internal {
+    function setTo(BitMap storage bitmap, uint256 index, bool value) internal {
         if (value) {
             set(bitmap, index);
         } else {

+ 6 - 30
contracts/utils/structs/EnumerableMap.sol

@@ -70,11 +70,7 @@ library EnumerableMap {
      * Returns true if the key was added to the map, that is if it was not
      * already present.
      */
-    function set(
-        Bytes32ToBytes32Map storage map,
-        bytes32 key,
-        bytes32 value
-    ) internal returns (bool) {
+    function set(Bytes32ToBytes32Map storage map, bytes32 key, bytes32 value) internal returns (bool) {
         map._values[key] = value;
         return map._keys.add(key);
     }
@@ -173,11 +169,7 @@ library EnumerableMap {
      * Returns true if the key was added to the map, that is if it was not
      * already present.
      */
-    function set(
-        UintToUintMap storage map,
-        uint256 key,
-        uint256 value
-    ) internal returns (bool) {
+    function set(UintToUintMap storage map, uint256 key, uint256 value) internal returns (bool) {
         return set(map._inner, bytes32(key), bytes32(value));
     }
 
@@ -244,11 +236,7 @@ library EnumerableMap {
      * CAUTION: This function is deprecated because it requires allocating memory for the error
      * message unnecessarily. For custom revert reasons use {tryGet}.
      */
-    function get(
-        UintToUintMap storage map,
-        uint256 key,
-        string memory errorMessage
-    ) internal view returns (uint256) {
+    function get(UintToUintMap storage map, uint256 key, string memory errorMessage) internal view returns (uint256) {
         return uint256(get(map._inner, bytes32(key), errorMessage));
     }
 
@@ -265,11 +253,7 @@ library EnumerableMap {
      * Returns true if the key was added to the map, that is if it was not
      * already present.
      */
-    function set(
-        UintToAddressMap storage map,
-        uint256 key,
-        address value
-    ) internal returns (bool) {
+    function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {
         return set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));
     }
 
@@ -357,11 +341,7 @@ library EnumerableMap {
      * Returns true if the key was added to the map, that is if it was not
      * already present.
      */
-    function set(
-        AddressToUintMap storage map,
-        address key,
-        uint256 value
-    ) internal returns (bool) {
+    function set(AddressToUintMap storage map, address key, uint256 value) internal returns (bool) {
         return set(map._inner, bytes32(uint256(uint160(key))), bytes32(value));
     }
 
@@ -449,11 +429,7 @@ library EnumerableMap {
      * Returns true if the key was added to the map, that is if it was not
      * already present.
      */
-    function set(
-        Bytes32ToUintMap storage map,
-        bytes32 key,
-        uint256 value
-    ) internal returns (bool) {
+    function set(Bytes32ToUintMap storage map, bytes32 key, uint256 value) internal returns (bool) {
         return set(map._inner, key, bytes32(value));
     }
 

+ 3 - 11
contracts/vendor/amb/IAMB.sol

@@ -31,17 +31,9 @@ interface IAMB {
 
     function failedMessageSender(bytes32 _messageId) external view returns (address);
 
-    function requireToPassMessage(
-        address _contract,
-        bytes calldata _data,
-        uint256 _gas
-    ) external returns (bytes32);
-
-    function requireToConfirmMessage(
-        address _contract,
-        bytes calldata _data,
-        uint256 _gas
-    ) external returns (bytes32);
+    function requireToPassMessage(address _contract, bytes calldata _data, uint256 _gas) external returns (bytes32);
+
+    function requireToConfirmMessage(address _contract, bytes calldata _data, uint256 _gas) external returns (bytes32);
 
     function sourceChainId() external view returns (uint256);
 

+ 1 - 8
contracts/vendor/arbitrum/IArbSys.sol

@@ -92,14 +92,7 @@ interface IArbSys {
      * @return root root hash of the send history
      * @return partials hashes of partial subtrees in the send history tree
      */
-    function sendMerkleTreeState()
-        external
-        view
-        returns (
-            uint256 size,
-            bytes32 root,
-            bytes32[] memory partials
-        );
+    function sendMerkleTreeState() external view returns (uint256 size, bytes32 root, bytes32[] memory partials);
 
     /**
      * @notice creates a send txn from L2 to L1

+ 1 - 8
contracts/vendor/arbitrum/IBridge.sol

@@ -77,14 +77,7 @@ interface IBridge {
         uint256 afterDelayedMessagesRead,
         uint256 prevMessageCount,
         uint256 newMessageCount
-    )
-        external
-        returns (
-            uint256 seqMessageIndex,
-            bytes32 beforeAcc,
-            bytes32 delayedAcc,
-            bytes32 acc
-        );
+    ) external returns (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc);
 
     /**
      * @dev Allows the sequencer inbox to submit a delayed message of the batchPostingReport type

+ 1 - 5
contracts/vendor/arbitrum/IOutbox.sol

@@ -113,9 +113,5 @@ interface IOutbox {
         bytes calldata data
     ) external pure returns (bytes32);
 
-    function calculateMerkleRoot(
-        bytes32[] memory proof,
-        uint256 path,
-        bytes32 item
-    ) external pure returns (bytes32);
+    function calculateMerkleRoot(bytes32[] memory proof, uint256 path, bytes32 item) external pure returns (bytes32);
 }

+ 1 - 5
contracts/vendor/optimism/ICrossDomainMessenger.sol

@@ -30,9 +30,5 @@ interface ICrossDomainMessenger {
      * @param _message Message to send to the target.
      * @param _gasLimit Gas limit for the provided message.
      */
-    function sendMessage(
-        address _target,
-        bytes calldata _message,
-        uint32 _gasLimit
-    ) external;
+    function sendMessage(address _target, bytes calldata _message, uint32 _gasLimit) external;
 }

+ 1 - 5
contracts/vendor/polygon/IFxMessageProcessor.sol

@@ -3,9 +3,5 @@
 pragma solidity ^0.8.0;
 
 interface IFxMessageProcessor {
-    function processMessageFromRoot(
-        uint256 stateId,
-        address rootMessageSender,
-        bytes calldata data
-    ) external;
+    function processMessageFromRoot(uint256 stateId, address rootMessageSender, bytes calldata data) external;
 }

File diff suppressed because it is too large
+ 546 - 219
package-lock.json


+ 1 - 1
package.json

@@ -76,7 +76,7 @@
     "merkletreejs": "^0.2.13",
     "micromatch": "^4.0.2",
     "prettier": "^2.3.0",
-    "prettier-plugin-solidity": "^1.0.0-beta.16",
+    "prettier-plugin-solidity": "^1.1.0",
     "rimraf": "^3.0.2",
     "semver": "^7.3.5",
     "solhint": "^3.3.6",

+ 13 - 29
test/utils/math/Math.t.sol

@@ -70,16 +70,16 @@ contract MathTest is Test {
             assertFalse(rounding == Math.Rounding.Up);
             assertTrue(_powerOf2Bigger(result + 1, input));
         } else {
-            assertEq(2**result, input);
+            assertEq(2 ** result, input);
         }
     }
 
     function _powerOf2Bigger(uint256 value, uint256 ref) private pure returns (bool) {
-        return value >= 256 || 2**value > ref; // 2**256 overflows uint256
+        return value >= 256 || 2 ** value > ref; // 2**256 overflows uint256
     }
 
     function _powerOf2Smaller(uint256 value, uint256 ref) private pure returns (bool) {
-        return 2**value < ref;
+        return 2 ** value < ref;
     }
 
     // LOG10
@@ -97,16 +97,16 @@ contract MathTest is Test {
             assertFalse(rounding == Math.Rounding.Up);
             assertTrue(_powerOf10Bigger(result + 1, input));
         } else {
-            assertEq(10**result, input);
+            assertEq(10 ** result, input);
         }
     }
 
     function _powerOf10Bigger(uint256 value, uint256 ref) private pure returns (bool) {
-        return value >= 78 || 10**value > ref; // 10**78 overflows uint256
+        return value >= 78 || 10 ** value > ref; // 10**78 overflows uint256
     }
 
     function _powerOf10Smaller(uint256 value, uint256 ref) private pure returns (bool) {
-        return 10**value < ref;
+        return 10 ** value < ref;
     }
 
     // LOG256
@@ -124,24 +124,20 @@ contract MathTest is Test {
             assertFalse(rounding == Math.Rounding.Up);
             assertTrue(_powerOf256Bigger(result + 1, input));
         } else {
-            assertEq(256**result, input);
+            assertEq(256 ** result, input);
         }
     }
 
     function _powerOf256Bigger(uint256 value, uint256 ref) private pure returns (bool) {
-        return value >= 32 || 256**value > ref; // 256**32 overflows uint256
+        return value >= 32 || 256 ** value > ref; // 256**32 overflows uint256
     }
 
     function _powerOf256Smaller(uint256 value, uint256 ref) private pure returns (bool) {
-        return 256**value < ref;
+        return 256 ** value < ref;
     }
 
     // MULDIV
-    function testMulDiv(
-        uint256 x,
-        uint256 y,
-        uint256 d
-    ) public {
+    function testMulDiv(uint256 x, uint256 y, uint256 d) public {
         // Full precision for x * y
         (uint256 xyHi, uint256 xyLo) = _mulHighLow(x, y);
 
@@ -163,11 +159,7 @@ contract MathTest is Test {
         assertEq(xyLo, qdRemLo);
     }
 
-    function testMulDivDomain(
-        uint256 x,
-        uint256 y,
-        uint256 d
-    ) public {
+    function testMulDivDomain(uint256 x, uint256 y, uint256 d) public {
         (uint256 xyHi, ) = _mulHighLow(x, y);
 
         // Violate {testMulDiv} assumption (covers d is 0 and result overflow)
@@ -180,11 +172,7 @@ contract MathTest is Test {
     }
 
     // External call
-    function muldiv(
-        uint256 x,
-        uint256 y,
-        uint256 d
-    ) external pure returns (uint256) {
+    function muldiv(uint256 x, uint256 y, uint256 d) external pure returns (uint256) {
         return Math.mulDiv(x, y, d);
     }
 
@@ -194,11 +182,7 @@ contract MathTest is Test {
         return Math.Rounding(r);
     }
 
-    function _mulmod(
-        uint256 x,
-        uint256 y,
-        uint256 z
-    ) private pure returns (uint256 r) {
+    function _mulmod(uint256 x, uint256 y, uint256 z) private pure returns (uint256 r) {
         assembly {
             r := mulmod(x, y, z)
         }

Some files were not shown because too many files changed in this diff