diff --git a/packages/protocol/contracts/identity/IdentityProxyHub.sol b/packages/protocol/contracts/identity/IdentityProxyHub.sol index 4256d2ba3ae..4525e338543 100644 --- a/packages/protocol/contracts/identity/IdentityProxyHub.sol +++ b/packages/protocol/contracts/identity/IdentityProxyHub.sol @@ -1,15 +1,27 @@ pragma solidity ^0.5.13; import "../common/Create2.sol"; +import "../common/interfaces/ICeloVersionedContract.sol"; import "../common/UsingRegistry.sol"; import "./IdentityProxy.sol"; -contract IdentityProxyHub is UsingRegistry { +contract IdentityProxyHub is UsingRegistry, ICeloVersionedContract { bytes32 public constant identityProxyCodeHash = keccak256( // solhint-disable-next-line indent abi.encodePacked(type(IdentityProxy).creationCode) ); + /** + * @notice Returns the storage, major, minor, and patch version of the contract. + * @return Storage version of the contract. + * @return Major version of the contract. + * @return Minor version of the contract. + * @return Patch version of the contract. + */ + function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) { + return (1, 0, 0, 1); + } + /** * @notice Returns the IdentityProxy address corresponding to the identifier. * @param identifier The identifier whose proxy address is computed. @@ -99,7 +111,7 @@ contract IdentityProxyHub is UsingRegistry { payable returns (bytes memory) { - require(passesIdentityHeuristic(msg.sender, identifier)); + require(passesIdentityHeuristic(msg.sender, identifier), "does not pass identity heuristic"); return getOrDeployIdentityProxy(identifier).makeCall.value(msg.value)(destination, data); } diff --git a/packages/protocol/contracts/stability/SortedOracles.sol b/packages/protocol/contracts/stability/SortedOracles.sol index 4c35ce5404d..b5dd428f5d0 100644 --- a/packages/protocol/contracts/stability/SortedOracles.sol +++ b/packages/protocol/contracts/stability/SortedOracles.sol @@ -62,7 +62,7 @@ contract SortedOracles is ISortedOracles, ICeloVersionedContract, Ownable, Initi * @return Patch version of the contract. */ function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) { - return (1, 1, 2, 1); + return (1, 1, 2, 2); } /** @@ -171,7 +171,7 @@ contract SortedOracles is ISortedOracles, ICeloVersionedContract, Ownable, Initi * @return The address of the last report. */ function isOldestReportExpired(address token) public view returns (bool, address) { - require(token != address(0)); + require(token != address(0), "token address cannot be null"); address oldest = timestamps[token].getTail(); uint256 timestamp = timestamps[token].getValue(oldest); // solhint-disable-next-line not-rely-on-time