Skip to content

Commit

Permalink
remove UUPSLegacy testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Jun 16, 2023
1 parent 98bede1 commit 8631faf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 69 deletions.
54 changes: 0 additions & 54 deletions contracts/mocks/proxy/UUPSLegacy.sol

This file was deleted.

15 changes: 0 additions & 15 deletions test/proxy/utils/UUPSUpgradeable.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const { expectRevertCustomError } = require('../../helpers/customError');
const ERC1967Proxy = artifacts.require('ERC1967Proxy');
const UUPSUpgradeableMock = artifacts.require('UUPSUpgradeableMock');
const UUPSUpgradeableUnsafeMock = artifacts.require('UUPSUpgradeableUnsafeMock');
const UUPSUpgradeableLegacyMock = artifacts.require('UUPSUpgradeableLegacyMock');
const NonUpgradeableMock = artifacts.require('NonUpgradeableMock');

contract('UUPSUpgradeable', function () {
Expand Down Expand Up @@ -63,18 +62,4 @@ contract('UUPSUpgradeable', function () {
otherInstance.address,
]);
});

it('can upgrade from legacy implementations', async function () {
const legacyImpl = await UUPSUpgradeableLegacyMock.new();
const legacyInstance = await ERC1967Proxy.new(legacyImpl.address, '0x').then(({ address }) =>
UUPSUpgradeableLegacyMock.at(address),
);

const receipt = await legacyInstance.upgradeTo(this.implInitial.address);
expectEvent(receipt, 'Upgraded', { implementation: this.implInitial.address });

const implementationSlot = await getSlot(legacyInstance, ImplementationSlot);
const implementationAddress = web3.utils.toChecksumAddress(implementationSlot.substr(-40));
expect(implementationAddress).to.be.equal(this.implInitial.address);
});
});

0 comments on commit 8631faf

Please sign in to comment.