Skip to content

Commit

Permalink
rename Proxy -> DelegateProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Aug 25, 2020
1 parent e20b389 commit da93e35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions contracts/proxy/UpgradeabilityProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.6.0;

import "./Proxy.sol";
import "./DelegateProxy.sol";
import "../utils/Address.sol";

/**
Expand All @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions test/proxy/AdminUpgradeabilityProxy.behaviour.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);
});
});
Expand Down

0 comments on commit da93e35

Please sign in to comment.