Skip to content

Commit 64517ca

Browse files
committed
refactor(patterns): rename Upgradable to Upgradeable
1 parent e952c47 commit 64517ca

13 files changed

+26
-26
lines changed

contracts/impls/WitnetProxy.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pragma solidity >=0.7.0 <0.9.0;
44
pragma experimental ABIEncoderV2;
55

6-
import "../patterns/Upgradable.sol";
6+
import "../patterns/Upgradeable.sol";
77

88
/// @title WitnetProxy: upgradable delegate-proxy contract.
99
/// @author The Witnet Foundation.
@@ -70,7 +70,7 @@ contract WitnetProxy {
7070
require(_newImplementation != _oldImplementation, "WitnetProxy: nothing to upgrade");
7171

7272
// Assert whether current implementation is intrinsically upgradable:
73-
try Upgradable(_oldImplementation).isUpgradable() returns (bool _isUpgradable) {
73+
try Upgradeable(_oldImplementation).isUpgradable() returns (bool _isUpgradable) {
7474
require(_isUpgradable, "WitnetProxy: not upgradable");
7575
} catch {
7676
revert("WitnetProxy: unable to check upgradability");
@@ -86,7 +86,7 @@ contract WitnetProxy {
8686
require(_wasCalled, "WitnetProxy: not compliant");
8787
require(abi.decode(_result, (bool)), "WitnetProxy: not authorized");
8888
require(
89-
Upgradable(_oldImplementation).proxiableUUID() == Upgradable(_newImplementation).proxiableUUID(),
89+
Upgradeable(_oldImplementation).proxiableUUID() == Upgradeable(_newImplementation).proxiableUUID(),
9090
"WitnetProxy: proxiableUUIDs mismatch"
9191
);
9292
}
@@ -104,8 +104,8 @@ contract WitnetProxy {
104104
__proxySlot().implementation = _newImplementation;
105105
emit Upgraded(_newImplementation);
106106

107-
// Asserts new implementation complies w/ minimal implementation of Upgradable interface:
108-
try Upgradable(_newImplementation).isUpgradable() returns (bool _isUpgradable) {
107+
// Asserts new implementation complies w/ minimal implementation of Upgradeable interface:
108+
try Upgradeable(_newImplementation).isUpgradable() returns (bool _isUpgradable) {
109109
return _isUpgradable;
110110
}
111111
catch {

contracts/impls/WitnetUpgradableBase.sol

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ pragma solidity >=0.8.0 <0.9.0;
66
import "../patterns/ERC165.sol";
77
import "../patterns/Ownable2Step.sol";
88
import "../patterns/ReentrancyGuard.sol";
9-
import "../patterns/Upgradable.sol";
9+
import "../patterns/Upgradeable.sol";
1010

1111
import "./WitnetProxy.sol";
1212

13-
/// @title Witnet Request Board base contract, with an Upgradable (and Destructible) touch.
13+
/// @title Witnet Request Board base contract, with an Upgradeable (and Destructible) touch.
1414
/// @author The Witnet Foundation.
1515
abstract contract WitnetUpgradableBase
1616
is
1717
ERC165,
1818
Ownable2Step,
19-
Upgradable,
19+
Upgradeable,
2020
ReentrancyGuard
2121
{
2222
bytes32 internal immutable _WITNET_UPGRADABLE_VERSION;
@@ -31,7 +31,7 @@ abstract contract WitnetUpgradableBase
3131
bytes32 _versionTag,
3232
string memory _proxiableUUID
3333
)
34-
Upgradable(_upgradable)
34+
Upgradeable(_upgradable)
3535
{
3636
_WITNET_UPGRADABLE_VERSION = _versionTag;
3737
proxiableUUID = keccak256(bytes(_proxiableUUID));
@@ -55,21 +55,21 @@ abstract contract WitnetUpgradableBase
5555
returns (bool)
5656
{
5757
return _interfaceId == type(Ownable2Step).interfaceId
58-
|| _interfaceId == type(Upgradable).interfaceId
58+
|| _interfaceId == type(Upgradeable).interfaceId
5959
|| super.supportsInterface(_interfaceId);
6060
}
6161

6262
// ================================================================================================================
6363
// --- Overrides 'Proxiable' --------------------------------------------------------------------------------------
6464

65-
/// @dev Gets immutable "heritage blood line" (ie. genotype) as a Proxiable, and eventually Upgradable, contract.
66-
/// If implemented as an Upgradable touch, upgrading this contract to another one with a different
65+
/// @dev Gets immutable "heritage blood line" (ie. genotype) as a Proxiable, and eventually Upgradeable, contract.
66+
/// If implemented as an Upgradeable touch, upgrading this contract to another one with a different
6767
/// `proxiableUUID()` value should fail.
6868
bytes32 public immutable override proxiableUUID;
6969

7070

7171
// ================================================================================================================
72-
// --- Overrides 'Upgradable' --------------------------------------------------------------------------------------
72+
// --- Overrides 'Upgradeable' --------------------------------------------------------------------------------------
7373

7474
/// Retrieves human-readable version tag of current implementation.
7575
function version() public view override returns (string memory) {

contracts/impls/boards/trustable/WitnetRequestBoardTrustableBase.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ abstract contract WitnetRequestBoardTrustableBase
5656

5757

5858
// ================================================================================================================
59-
// --- Overrides 'Upgradable' -------------------------------------------------------------------------------------
59+
// --- Overrides 'Upgradeable' -------------------------------------------------------------------------------------
6060

6161
/// @notice Re-initialize contract's storage context upon a new upgrade from a proxy.
6262
/// @dev Must fail when trying to upgrade to same logic contract more than once.

contracts/impls/boards/trustless/WitnetRequestBoardTrustlessBase.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ abstract contract WitnetRequestBoardTrustlessBase
178178

179179

180180
// ================================================================================================================
181-
// --- Overrides 'Upgradable' -------------------------------------------------------------------------------------
181+
// --- Overrides 'Upgradeable' -------------------------------------------------------------------------------------
182182

183183
/// @notice Re-initialize contract's storage context upon a new upgrade from a proxy.
184184
/// @dev Must fail when trying to upgrade to same logic contract more than once.

contracts/impls/bytecodes/WitnetBytecodes.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ contract WitnetBytecodes
108108

109109

110110
// ================================================================================================================
111-
// --- Overrides 'Upgradable' -------------------------------------------------------------------------------------
111+
// --- Overrides 'Upgradeable' -------------------------------------------------------------------------------------
112112

113113
/// @notice Re-initialize contract's storage context upon a new upgrade from a proxy.
114114
/// @dev Must fail when trying to upgrade to same logic contract more than once.

contracts/patterns/Proxiable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pragma solidity >=0.6.0 <0.9.0;
44

55
interface Proxiable {
6-
/// @dev Complying with EIP-1822: Universal Upgradable Proxy Standard (UUPS)
6+
/// @dev Complying with EIP-1822: Universal Upgradeable Proxy Standard (UUPS)
77
/// @dev See https://eips.ethereum.org/EIPS/eip-1822.
88
function proxiableUUID() external view returns (bytes32);
99
}

contracts/patterns/Upgradable.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pragma solidity >=0.6.0 <0.9.0;
77
import "./Initializable.sol";
88
import "./Proxiable.sol";
99

10-
abstract contract Upgradable is Initializable, Proxiable {
10+
abstract contract Upgradeable is Initializable, Proxiable {
1111

1212
address internal immutable _BASE;
1313
bytes32 internal immutable _CODEHASH;
@@ -16,7 +16,7 @@ abstract contract Upgradable is Initializable, Proxiable {
1616
modifier onlyDelegateCalls {
1717
require(
1818
address(this) != _BASE,
19-
"Upgradable: not a delegate call"
19+
"Upgradeable: not a delegate call"
2020
);
2121
_;
2222
}

contracts/requests/WitnetRequestMalleableBase.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ abstract contract WitnetRequestMalleableBase
229229
// ================================================================================================================
230230
// --- 'Proxiable 'overriden functions ----------------------------------------------------------------------------
231231

232-
/// @dev Complying with EIP-1822: Universal Upgradable Proxy Standard (UUPS)
232+
/// @dev Complying with EIP-1822: Universal Upgradeable Proxy Standard (UUPS)
233233
/// @dev See https://eips.ethereum.org/EIPS/eip-1822.
234234
function proxiableUUID()
235235
external pure

test/helpers/WitnetRequestBoardTrojanHorseBadProxiable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import "../../contracts/patterns/Proxiable.sol";
1111
* @title Witnet Requests Board Trojan Horse: Proxiable with a bad `proxiableUUID()`.
1212
* @notice Contract to test proxy upgrade assertions.
1313
* @dev Upgrading an existing WitnetRequestBoard implementation with an instance of
14-
* this kind (i.e. Proxiable and Upgradable) but with a `proxiableUUID()` value different
14+
* this kind (i.e. Proxiable and Upgradeable) but with a `proxiableUUID()` value different
1515
* to the one required for WitnetRequestBoards, should not be permitted by the WitnetProxy.
1616
* The contract has been created for testing purposes.
1717
* @author Witnet Foundation

test/helpers/WitnetRequestBoardTrojanHorseNotUpgradable.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import "../../contracts/patterns/Initializable.sol";
88
import "../../contracts/patterns/Proxiable.sol";
99

1010
/**
11-
* @title Witnet Requests Board Trojan Horse: Proxiable but not-Upgradable
11+
* @title Witnet Requests Board Trojan Horse: Proxiable but not-Upgradeable
1212
* @notice Contract to test proxy upgrade assertions.
1313
* @dev Upgrading an existing WitnetRequestBoard implementation with an instance of
14-
* this kind (i.e. Proxiable but not-Upgradable), should not be permitted by the WitnetProxy.
14+
* this kind (i.e. Proxiable but not-Upgradeable), should not be permitted by the WitnetProxy.
1515
* The contract has been created for testing purposes.
1616
* @author Witnet Foundation
1717
*/

0 commit comments

Comments
 (0)