Skip to content

Commit

Permalink
refactor: revert proxy factory addition
Browse files Browse the repository at this point in the history
  • Loading branch information
heueristik committed Oct 24, 2023
1 parent e673b0e commit 0717be2
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 334 deletions.
43 changes: 0 additions & 43 deletions contracts/src/utils/proxy/ProxyFactory.sol

This file was deleted.

43 changes: 0 additions & 43 deletions contracts/src/utils/proxy/ProxyLib.sol

This file was deleted.

10 changes: 4 additions & 6 deletions contracts/test/plugin/majority-voting/majority-voting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
IProtocolVersion__factory,
} from '../../../typechain';
import {getInterfaceId} from '../../../utils/interfaces';
import {deployUUPSProxy} from '../../../utils/proxy';
import {deployWithProxy} from '../../../utils/proxy';
import {pctToRatio} from '../../utils/math/ratio';
import {VotingSettings, VotingMode, ONE_HOUR, ONE_YEAR} from './voting-helpers';
import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers';
Expand Down Expand Up @@ -38,10 +38,8 @@ describe('MajorityVotingMock', function () {
signers = await ethers.getSigners();
ownerAddress = await signers[0].getAddress();

dao = await deployUUPSProxy<DAO>(new DAO__factory(signers[0]), {
initializerName: 'initialize',
args: [[], ownerAddress, ethers.constants.AddressZero, 'examplURI'],
});
dao = await deployWithProxy<DAO>(new DAO__factory(signers[0]));
dao.initialize([], ownerAddress, ethers.constants.AddressZero, 'examplURI');
});

beforeEach(async () => {
Expand All @@ -55,7 +53,7 @@ describe('MajorityVotingMock', function () {

const MajorityVotingBase = new MajorityVotingMock__factory(signers[0]);

votingBase = await deployUUPSProxy(MajorityVotingBase);
votingBase = await deployWithProxy<MajorityVotingMock>(MajorityVotingBase);
await dao.grant(
votingBase.address,
ownerAddress,
Expand Down
10 changes: 4 additions & 6 deletions contracts/test/token/erc20/governance-erc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
IERC20Upgradeable__factory,
IVotesUpgradeable__factory,
} from '../../../typechain';
import {deployUUPSProxy} from '../../../utils/events';
import {getInterfaceId} from '../../../utils/interfaces';
import {deployWithProxy} from '../../../utils/proxy';
import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers';
import {expect} from 'chai';
import {ethers} from 'hardhat';
Expand All @@ -26,7 +26,7 @@ const governanceERC20Symbol = 'GOV';

const addressZero = ethers.constants.AddressZero;

describe('GovernanceERC20', function () {
describe.only('GovernanceERC20', function () {
let signers: SignerWithAddress[];
let dao: DAO;
let token: GovernanceERC20;
Expand All @@ -43,10 +43,8 @@ describe('GovernanceERC20', function () {
signers = await ethers.getSigners();
GovernanceERC20 = new GovernanceERC20__factory(signers[0]);

dao = await deployUUPSProxy<DAO>(new DAO__factory(signers[0]), {
initializerName: 'initialize',
args: [[], signers[0].address, addressZero, 'exampleURI'],
});
dao = await deployWithProxy<DAO>(new DAO__factory(signers[0]));
await dao.initialize([], signers[0].address, addressZero, 'exampleURI');

from = signers[0];
to = signers[1];
Expand Down
182 changes: 0 additions & 182 deletions contracts/test/utils/proxy/proxy-factory.ts

This file was deleted.

Loading

0 comments on commit 0717be2

Please sign in to comment.