diff --git a/contracts/proxy/Proxy.sol b/contracts/proxy/DelegateProxy.sol similarity index 97% rename from contracts/proxy/Proxy.sol rename to contracts/proxy/DelegateProxy.sol index e68622f6d8a..5d0983bc711 100644 --- a/contracts/proxy/Proxy.sol +++ b/contracts/proxy/DelegateProxy.sol @@ -3,13 +3,13 @@ pragma solidity ^0.6.0; /** - * @title Proxy + * @title DelegateProxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ -abstract contract Proxy { +abstract contract DelegateProxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. diff --git a/contracts/proxy/UpgradeabilityProxy.sol b/contracts/proxy/UpgradeabilityProxy.sol index 10f143e3b73..87bc033c280 100644 --- a/contracts/proxy/UpgradeabilityProxy.sol +++ b/contracts/proxy/UpgradeabilityProxy.sol @@ -2,7 +2,7 @@ pragma solidity ^0.6.0; -import "./Proxy.sol"; +import "./DelegateProxy.sol"; import "../utils/Address.sol"; /** @@ -11,7 +11,7 @@ import "../utils/Address.sol"; * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ -contract UpgradeabilityProxy is Proxy { +contract UpgradeabilityProxy is DelegateProxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. diff --git a/test/proxy/AdminUpgradeabilityProxy.behaviour.js b/test/proxy/AdminUpgradeabilityProxy.behaviour.js index f8cd50b4ceb..2d8671394b8 100644 --- a/test/proxy/AdminUpgradeabilityProxy.behaviour.js +++ b/test/proxy/AdminUpgradeabilityProxy.behaviour.js @@ -6,7 +6,8 @@ const { toChecksumAddress, keccak256 } = require('ethereumjs-util'); const { expect } = require('chai'); -const Proxy = contract.fromArtifact('Proxy'); +const DelegateProxy = contract.fromArtifact('DelegateProxy'); + const Implementation1 = contract.fromArtifact('Implementation1'); const Implementation2 = contract.fromArtifact('Implementation2'); const Implementation3 = contract.fromArtifact('Implementation3'); @@ -138,7 +139,7 @@ module.exports = function shouldBehaveLikeAdminUpgradeabilityProxy (createProxy, // - 1-50: Initailizable reserved storage (50 slots) // - 51: initializerRan // - 52: x - const storedValue = await Proxy.at(this.proxyAddress).getStorageAt(52); + const storedValue = await DelegateProxy.at(this.proxyAddress).getStorageAt(52); expect(parseInt(storedValue)).to.eq(42); }); });