Skip to content

Commit

Permalink
dao: fix HH and TS renaming to V4
Browse files Browse the repository at this point in the history
  • Loading branch information
eladmallel committed Feb 6, 2024
1 parent e580373 commit b13ed55
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/nouns-contracts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export { default as NounsTokenABI } from '../abi/contracts/NounsToken.sol/NounsT
export { default as NounsAuctionHouseABI } from '../abi/contracts/NounsAuctionHouse.sol/NounsAuctionHouse.json';
export { default as NounsDescriptorABI } from '../abi/contracts/NounsDescriptor.sol/NounsDescriptor.json';
export { default as NounsSeederABI } from '../abi/contracts/NounsSeeder.sol/NounsSeeder.json';
export { default as NounsDAOV3ABI } from '../abi/contracts/governance/NounsDAOLogicV3.sol/NounsDAOLogicV3.json';
export { default as NounsDAOV3ABI } from '../abi/contracts/governance/NounsDAOLogicV4.json';
export { default as NounsDAODataABI } from '../abi/contracts/governance/data/NounsDAOData.sol/NounsDAOData.json';
export { default as NounsDAOExecutorV2ABI } from '../abi/contracts/governance/NounsDAOExecutorV2.sol/NounsDAOExecutorV2.json';
export { NounsToken__factory as NounsTokenFactory } from '../typechain/factories/contracts/NounsToken__factory';
Expand Down
2 changes: 1 addition & 1 deletion packages/nouns-contracts/tasks/create-proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ task('create-proposal', 'Create a governance proposal')
types.string,
)
.setAction(async ({ nounsDaoProxy }, { ethers }) => {
const nounsDaoFactory = await ethers.getContractFactory('NounsDAOLogicV3');
const nounsDaoFactory = await ethers.getContractFactory('NounsDAOLogicV4');
const nounsDao = nounsDaoFactory.attach(nounsDaoProxy);

const [deployer] = await ethers.getSigners();
Expand Down
4 changes: 2 additions & 2 deletions packages/nouns-contracts/tasks/deploy-local-dao-v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ task('deploy-local-dao-v3', 'Deploy contracts to hardhat')
NounsDAOV3Proposals: {},
NounsDAOV3Votes: {},
NounsDAOV3Fork: {},
NounsDAOLogicV3: {
NounsDAOLogicV4: {
libraries: () => ({
NounsDAOV3Admin: contracts.NounsDAOV3Admin.instance?.address as string,
NounsDAOV3DynamicQuorum: contracts.NounsDAOV3DynamicQuorum.instance?.address as string,
Expand Down Expand Up @@ -190,7 +190,7 @@ task('deploy-local-dao-v3', 'Deploy contracts to hardhat')
() => contracts.ForkDAODeployer.instance?.address, // forkDAODeployer
args.noundersdao || deployer.address, // vetoer
() => contracts.NounsDAOExecutorProxy.instance?.address, // admin
() => contracts.NounsDAOLogicV3.instance?.address, // implementation
() => contracts.NounsDAOLogicV4.instance?.address, // implementation
{
votingPeriod: args.votingPeriod,
votingDelay: args.votingDelay,
Expand Down
6 changes: 3 additions & 3 deletions packages/nouns-contracts/tasks/deploy-short-times-dao-v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ task('deploy-short-times-dao-v3', 'Deploy all Nouns contracts with short gov tim
NounsDAOV3Proposals: {},
NounsDAOV3Votes: {},
NounsDAOV3Fork: {},
NounsDAOLogicV3: {
NounsDAOLogicV4: {
libraries: () => ({
NounsDAOV3Admin: deployment.NounsDAOV3Admin.address,
NounsDAOV3DynamicQuorum: deployment.NounsDAOV3DynamicQuorum.address,
Expand Down Expand Up @@ -242,7 +242,7 @@ task('deploy-short-times-dao-v3', 'Deploy all Nouns contracts with short gov tim
() => deployment.ForkDAODeployer.address, // forkDAODeployer
args.noundersdao || deployer.address, // vetoer
() => deployment.NounsDAOExecutorProxy.address, // admin
() => deployment.NounsDAOLogicV3.address, // implementation
() => deployment.NounsDAOLogicV4.address, // implementation
{
votingPeriod: args.votingPeriod,
votingDelay: args.votingDelay,
Expand Down Expand Up @@ -313,7 +313,7 @@ task('deploy-short-times-dao-v3', 'Deploy all Nouns contracts with short gov tim
case 'NounsDAOExecutorV2':
nameForFactory = 'NounsDAOExecutorV2Test';
break;
case 'NounsDAOLogicV3':
case 'NounsDAOLogicV4':
nameForFactory = 'NounsDAOLogicV3Harness';
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion packages/nouns-contracts/tasks/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type ContractNamesDAOV3 =
| 'NounsAuctionHouse'
| 'NounsAuctionHouseProxyAdmin'
| 'NounsAuctionHouseProxy'
| 'NounsDAOLogicV3'
| 'NounsDAOLogicV4'
| 'NounsDAOProxyV3'
| 'NounsDAOV3Admin'
| 'NounsDAOV3DynamicQuorum'
Expand Down
2 changes: 1 addition & 1 deletion packages/nouns-contracts/tasks/update-configs-dao-v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ task('update-configs-dao-v3', 'Write the deployed addresses to the SDK and subgr
nounsAuctionHouseProxyAdmin: contracts.NounsAuctionHouseProxyAdmin.address,
nounsDaoExecutor: contracts.NounsDAOExecutorProxy.address,
nounsDAOProxy: contracts.NounsDAOProxyV3.address,
nounsDAOLogicV1: contracts.NounsDAOLogicV3.address,
nounsDAOLogicV1: contracts.NounsDAOLogicV4.address,
nounsDAOData: contracts.NounsDAODataProxy.address,
};
writeFileSync(addressesPath, JSON.stringify(addresses, null, 2));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task('upgrade-descriptor-via-proposal', 'Upgrade NounsToken to use Descriptor V2
const signatures = ['setDescriptor(address)'];
const calldatas = [ethers.utils.defaultAbiCoder.encode(['address'], [descriptor])];

const gov = (await ethers.getContractFactory('NounsDAOLogicV3')).attach(dao);
const gov = (await ethers.getContractFactory('NounsDAOLogicV4')).attach(dao);
const propTx = await gov['propose(address[],uint256[],string[],bytes[],string)'](
targets,
values,
Expand Down
2 changes: 1 addition & 1 deletion packages/nouns-contracts/test/governance/castVote.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers';
import {
NounsToken,
NounsDescriptorV2__factory as NounsDescriptorV2Factory,
NounsDAOLogicV3,
NounsDAOLogicV4,
} from '../../typechain';

chai.use(solidity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers';
import chai from 'chai';
import { solidity } from 'ethereum-waffle';
import { parseUnits } from 'ethers/lib/utils';
import { NounsDAOLogicV3 } from '../../typechain';
import { NounsDAOLogicV4 } from '../../typechain';
import { deployGovernorV3, getSigners, TestSigners } from '../utils';

chai.use(solidity);
const { expect } = chai;

let deployer: SignerWithAddress;
let signers: TestSigners;
let gov: NounsDAOLogicV3;
let gov: NounsDAOLogicV4;

describe('Dynamic Quorum', () => {
before(async () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/nouns-contracts/test/governance/proxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers';
import {
NounsToken,
NounsDescriptorV2__factory as NounsDescriptorV2Factory,
NounsDAOLogicV3,
NounsDAOLogicV4,
} from '../../typechain';
import { MAX_QUORUM_VOTES_BPS, MIN_QUORUM_VOTES_BPS } from '../constants';

Expand All @@ -24,7 +24,7 @@ const { expect } = chai;
let token: NounsToken;
let deployer: SignerWithAddress;
let signers: TestSigners;
let gov: NounsDAOLogicV3;
let gov: NounsDAOLogicV4;

async function setup() {
token = await deployNounsToken(signers.deployer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BigNumber, ContractReceipt } from 'ethers';
import { ethers } from 'hardhat';
import {
NounsDAOLogicV3__factory,
NounsDAOLogicV3,
NounsDAOLogicV4,
NounsDescriptorV2__factory,
NounsToken,
Voter__factory,
Expand Down
4 changes: 2 additions & 2 deletions packages/nouns-contracts/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
NounsDAOExecutor,
Inflator__factory,
NounsDAOStorageV2,
NounsDAOLogicV3,
NounsDAOLogicV4,
NounsDAOLogicV3__factory as NounsDaoLogicV3Factory,
NounsDAOProxyV3__factory as NounsDaoProxyV3Factory,
NounsDAOForkEscrow__factory as NounsDAOForkEscrowFactory,
Expand Down Expand Up @@ -541,7 +541,7 @@ function dataToDescriptorInput(data: string[]): {
};
}

export const deployGovernorV3 = async (deployer: SignerWithAddress): Promise<NounsDAOLogicV3> => {
export const deployGovernorV3 = async (deployer: SignerWithAddress): Promise<NounsDAOLogicV4> => {
const NounsDAOV3Proposals = await (
await ethers.getContractFactory('NounsDAOV3Proposals', deployer)
).deploy();
Expand Down
2 changes: 1 addition & 1 deletion packages/nouns-sdk/src/contract/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface ContractAddresses {
nounsDAOProxy: string;
nounsDAOLogicV1?: string;
nounsDAOLogicV2?: string;
nounsDAOLogicV3?: string;
NounsDAOLogicV4?: string;
nounsDAOData?: string;
}

Expand Down

0 comments on commit b13ed55

Please sign in to comment.