diff --git a/solidity/.soliumrc.json b/solidity/.soliumrc.json index 5c7001462..cf34a5a3c 100644 --- a/solidity/.soliumrc.json +++ b/solidity/.soliumrc.json @@ -10,6 +10,10 @@ "timestamp" ] ], + "indentation": [ + "warning", + 4 + ], "security/no-call-value": "off", "security/no-inline-assembly": "off" } diff --git a/solidity/contracts/AbstractBonding.sol b/solidity/contracts/AbstractBonding.sol index f1473f7bb..4ebfdc52e 100644 --- a/solidity/contracts/AbstractBonding.sol +++ b/solidity/contracts/AbstractBonding.sol @@ -19,7 +19,6 @@ import "@keep-network/sortition-pools/contracts/api/IBonding.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; - /// @title Keep Bonding /// @notice Contract holding deposits from keeps' operators. contract AbstractBonding is IBonding { @@ -175,11 +174,11 @@ contract AbstractBonding is IBonding { /// @param holder Address of the holder of the bond. /// @param referenceID Reference ID of the bond. /// @return Amount of wei in the selected bond. - function bondAmount(address operator, address holder, uint256 referenceID) - public - view - returns (uint256) - { + function bondAmount( + address operator, + address holder, + uint256 referenceID + ) public view returns (uint256) { bytes32 bondID = keccak256( abi.encodePacked(operator, holder, referenceID) ); diff --git a/solidity/contracts/BondedECDSAKeep.sol b/solidity/contracts/BondedECDSAKeep.sol index b03a60246..fc1f75c37 100644 --- a/solidity/contracts/BondedECDSAKeep.sol +++ b/solidity/contracts/BondedECDSAKeep.sol @@ -25,7 +25,6 @@ import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; - /// @title Bonded ECDSA Keep /// @notice ECDSA keep with additional signer bond requirement. /// @dev This contract is used as a master contract for clone factory in @@ -251,10 +250,11 @@ contract BondedECDSAKeep is IBondedECDSAKeep { /// @param _r Calculated signature's R value. /// @param _s Calculated signature's S value. /// @param _recoveryID Calculated signature's recovery ID (one of {0, 1, 2, 3}). - function submitSignature(bytes32 _r, bytes32 _s, uint8 _recoveryID) - external - onlyMember - { + function submitSignature( + bytes32 _r, + bytes32 _s, + uint8 _recoveryID + ) external onlyMember { require(isSigningInProgress(), "Not awaiting a signature"); require(_recoveryID < 4, "Recovery ID must be one of {0, 1, 2, 3}"); diff --git a/solidity/contracts/BondedECDSAKeepFactory.sol b/solidity/contracts/BondedECDSAKeepFactory.sol index 81c477b14..b107a0299 100644 --- a/solidity/contracts/BondedECDSAKeepFactory.sol +++ b/solidity/contracts/BondedECDSAKeepFactory.sol @@ -33,7 +33,6 @@ import "@keep-network/keep-core/contracts/utils/AddressArrayUtils.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; - /// @title Bonded ECDSA Keep Factory /// @notice Contract creating bonded ECDSA keeps. /// @dev We avoid redeployment of bonded ECDSA keep contract by using the clone factory. diff --git a/solidity/contracts/BondedECDSAKeepVendor.sol b/solidity/contracts/BondedECDSAKeepVendor.sol index ed2f28b4e..c103a1f5e 100644 --- a/solidity/contracts/BondedECDSAKeepVendor.sol +++ b/solidity/contracts/BondedECDSAKeepVendor.sol @@ -17,7 +17,6 @@ pragma solidity 0.5.17; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "@openzeppelin/upgrades/contracts/upgradeability/Proxy.sol"; - /// @title Proxy contract for Bonded ECDSA Keep vendor. contract BondedECDSAKeepVendor is Proxy { using SafeMath for uint256; @@ -25,28 +24,33 @@ contract BondedECDSAKeepVendor is Proxy { /// @dev Storage slot with the admin of the contract. /// This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is /// validated in the constructor. - bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; + bytes32 + internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /// @dev Storage slot with the address of the current implementation. /// This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is /// validated in the constructor. - bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + bytes32 + internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /// @dev Storage slot with the upgrade time delay. Upgrade time delay defines a /// period for implementation upgrade. /// This is the keccak-256 hash of "network.keep.bondedecdsavendor.proxy.upgradeTimeDelay" /// subtracted by 1, and is validated in the constructor. - bytes32 internal constant UPGRADE_TIME_DELAY_SLOT = 0x3ca583dafde9ce8bdb41fe825f85984a83b08ecf90ffaccbc4b049e8d8703563; + bytes32 + internal constant UPGRADE_TIME_DELAY_SLOT = 0x3ca583dafde9ce8bdb41fe825f85984a83b08ecf90ffaccbc4b049e8d8703563; /// @dev Storage slot with the new implementation address. /// This is the keccak-256 hash of "network.keep.bondedecdsavendor.proxy.upgradeImplementation" /// subtracted by 1, and is validated in the constructor. - bytes32 internal constant UPGRADE_IMPLEMENTATION_SLOT = 0x4e06287250f0fdd90b4a096f346c06d4e706d470a14747ab56a0156d48a6883f; + bytes32 + internal constant UPGRADE_IMPLEMENTATION_SLOT = 0x4e06287250f0fdd90b4a096f346c06d4e706d470a14747ab56a0156d48a6883f; /// @dev Storage slot with the implementation address upgrade initiation. /// This is the keccak-256 hash of "network.keep.bondedecdsavendor.proxy.upgradeInitiatedTimestamp" /// subtracted by 1, and is validated in the constructor. - bytes32 internal constant UPGRADE_INIT_TIMESTAMP_SLOT = 0x0816e8d9eeb2554df0d0b7edc58e2d957e6ce18adf92c138b50dd78a420bebaf; + bytes32 + internal constant UPGRADE_INIT_TIMESTAMP_SLOT = 0x0816e8d9eeb2554df0d0b7edc58e2d957e6ce18adf92c138b50dd78a420bebaf; /// @notice Details of initialization data to be called on the second step /// of upgrade. diff --git a/solidity/contracts/BondedECDSAKeepVendorImplV1.sol b/solidity/contracts/BondedECDSAKeepVendorImplV1.sol index 98305a410..ff5477ab7 100644 --- a/solidity/contracts/BondedECDSAKeepVendorImplV1.sol +++ b/solidity/contracts/BondedECDSAKeepVendorImplV1.sol @@ -20,7 +20,6 @@ import "@keep-network/keep-core/contracts/KeepRegistry.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; - /// @title Bonded ECDSA Keep Vendor /// @notice The contract is used to obtain a new Bonded ECDSA keep factory. contract BondedECDSAKeepVendorImplV1 is IBondedECDSAKeepVendor { diff --git a/solidity/contracts/CloneFactory.sol b/solidity/contracts/CloneFactory.sol index 210d9690f..ba6e43f58 100644 --- a/solidity/contracts/CloneFactory.sol +++ b/solidity/contracts/CloneFactory.sol @@ -1,6 +1,5 @@ pragma solidity 0.5.17; - /* The MIT License (MIT) Copyright (c) 2018 Murray Software, LLC. diff --git a/solidity/contracts/KeepBonding.sol b/solidity/contracts/KeepBonding.sol index bb26b2b3b..2a8543bed 100644 --- a/solidity/contracts/KeepBonding.sol +++ b/solidity/contracts/KeepBonding.sol @@ -19,7 +19,6 @@ import "./AbstractBonding.sol"; import "@keep-network/keep-core/contracts/TokenGrant.sol"; import "@keep-network/keep-core/contracts/libraries/RolesLookup.sol"; - /// @title Keep Bonding /// @notice Contract holding deposits from keeps' operators. contract KeepBonding is AbstractBonding { diff --git a/solidity/contracts/Migrations.sol b/solidity/contracts/Migrations.sol index 64c1e820d..74ecda2f0 100644 --- a/solidity/contracts/Migrations.sol +++ b/solidity/contracts/Migrations.sol @@ -1,6 +1,5 @@ pragma solidity >=0.4.21 <0.6.0; - contract Migrations { address public owner; uint256 public last_completed_migration;