Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo cleanup #796

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pragma solidity ^0.8.15;

import 'forge-std/Script.sol';
import { NounsDAOLogicV1 } from '../contracts/governance/NounsDAOLogicV1.sol';
import { NounsDAOForkEscrow } from '../contracts/governance/fork/NounsDAOForkEscrow.sol';
import { ForkDAODeployer } from '../contracts/governance/fork/ForkDAODeployer.sol';
import { IERC20 } from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pragma solidity ^0.8.15;

import 'forge-std/Script.sol';
import { NounsDAOLogicV1 } from '../contracts/governance/NounsDAOLogicV1.sol';
import { NounsDAOForkEscrow } from '../contracts/governance/fork/NounsDAOForkEscrow.sol';
import { ForkDAODeployer } from '../contracts/governance/fork/ForkDAODeployer.sol';

Expand Down
76 changes: 76 additions & 0 deletions packages/nouns-contracts/contracts/interfaces/INounsDAOLogic.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.19;

import { INounsDAOExecutor, NounsDAOStorageV2, NounsDAOStorageV3 } from '../governance/NounsDAOInterfaces.sol';

interface INounsDAOLogic {
function castVote(uint256 proposalId, uint8 support) external;

function castVoteWithReason(
uint256 proposalId,
uint8 support,
string calldata reason
) external;

function castRefundableVote(uint256 proposalId, uint8 support) external;

function castRefundableVoteWithReason(
uint256 proposalId,
uint8 support,
string calldata reason
) external;

function nouns() external view returns (address);

function propose(
address[] memory targets,
uint256[] memory values,
string[] memory signatures,
bytes[] memory calldatas,
string memory description
) external returns (uint256);

function votingDelay() external view returns (uint256);

function votingPeriod() external view returns (uint256);

function proposalThresholdBPS() external view returns (uint256);

function proposalThreshold() external view returns (uint256);

function timelock() external view returns (INounsDAOExecutor);

function _setVotingPeriod(uint256 newVotingPeriod) external;

function _setVotingDelay(uint256 newVotingDelay) external;

function _setProposalThresholdBPS(uint256 newProposalThresholdBPS) external;

function _setQuorumVotesBPS(uint256 newQuorumVotesBPS) external;

function _setDynamicQuorumParams(
uint16 newMinQuorumVotesBPS,
uint16 newMaxQuorumVotesBPS,
uint32 newQuorumCoefficient
) external;

function state(uint256 proposalId) external view returns (uint256);

function cancel(uint256 proposalId) external;

function queue(uint256 proposalId) external;

function execute(uint256 proposalId) external;

// V2

function getDynamicQuorumParamsAt(uint256 blockNumber_)
external
view
returns (NounsDAOStorageV3.DynamicQuorumParams memory);

function minQuorumVotes() external view returns (uint256);

function proposals(uint256 proposalId) external view returns (NounsDAOStorageV2.ProposalCondensed memory);
}
6 changes: 3 additions & 3 deletions packages/nouns-contracts/contracts/test/MaliciousVoter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

pragma solidity ^0.8.19;

import { NounsDAOLogicV2 } from '../governance/NounsDAOLogicV2.sol';
import { INounsDAOLogic } from '../interfaces/INounsDAOLogic.sol';

contract MaliciousVoter {
NounsDAOLogicV2 public dao;
INounsDAOLogic public dao;
uint256 public proposalId;
uint8 public support;
bool useReason;

constructor(
NounsDAOLogicV2 dao_,
INounsDAOLogic dao_,
uint256 proposalId_,
uint8 support_,
bool useReason_
Expand Down
44 changes: 0 additions & 44 deletions packages/nouns-contracts/contracts/test/NounsDAOImmutable.sol

This file was deleted.

28 changes: 0 additions & 28 deletions packages/nouns-contracts/contracts/test/NounsDAOLogicV1Harness.sol

This file was deleted.

32 changes: 0 additions & 32 deletions packages/nouns-contracts/contracts/test/NounsDAOLogicV2Harness.sol

This file was deleted.

6 changes: 3 additions & 3 deletions packages/nouns-contracts/contracts/test/Voter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

pragma solidity ^0.8.19;

import { NounsDAOLogicV2 } from '../governance/NounsDAOLogicV2.sol';
import { INounsDAOLogic } from '../interfaces/INounsDAOLogic.sol';

/**
* @dev this contract is used to simulate voting via a multisig
*/
contract Voter {
NounsDAOLogicV2 public dao;
INounsDAOLogic public dao;
uint256 public proposalId;
uint8 public support;
bool useReason;

constructor(
NounsDAOLogicV2 dao_,
INounsDAOLogic dao_,
uint256 proposalId_,
uint8 support_,
bool useReason_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
pragma solidity ^0.8.15;

import 'forge-std/Script.sol';
import { NounsDAOLogicV1 } from '../contracts/governance/NounsDAOLogicV1.sol';
import { NounsDAOData } from '../contracts/governance/data/NounsDAOData.sol';
import { NounsDAODataProxy } from '../contracts/governance/data/NounsDAODataProxy.sol';
import { INounsDAOLogic } from '../contracts/interfaces/INounsDAOLogic.sol';

contract DeployDAOV3DataContractsBase is Script {
uint256 public constant CREATE_CANDIDATE_COST = 0.01 ether;

NounsDAOLogicV1 public immutable daoProxy;
INounsDAOLogic public immutable daoProxy;
address public immutable timelockV2Proxy;

constructor(address _daoProxy, address _timelockV2Proxy) {
daoProxy = NounsDAOLogicV1(payable(_daoProxy));
daoProxy = INounsDAOLogic(payable(_daoProxy));
timelockV2Proxy = _timelockV2Proxy;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pragma solidity ^0.8.15;
import 'forge-std/Script.sol';
import { NounsDAOExecutorV2 } from '../contracts/governance/NounsDAOExecutorV2.sol';
import { NounsDAOExecutorV2Test } from '../contracts/test/NounsDAOExecutorHarness.sol';
import { NounsDAOLogicV1 } from '../contracts/governance/NounsDAOLogicV1.sol';
import { NounsDAOLogicV3 } from '../contracts/governance/NounsDAOLogicV3.sol';
import { NounsDAOExecutorProxy } from '../contracts/governance/NounsDAOExecutorProxy.sol';
import { INounsDAOExecutor } from '../contracts/governance/NounsDAOInterfaces.sol';
Expand All @@ -14,6 +13,7 @@ import { NounsAuctionHouseFork } from '../contracts/governance/fork/newdao/Nouns
import { NounsDAOLogicV1Fork } from '../contracts/governance/fork/newdao/governance/NounsDAOLogicV1Fork.sol';
import { ForkDAODeployer } from '../contracts/governance/fork/ForkDAODeployer.sol';
import { ERC20Transferer } from '../contracts/utils/ERC20Transferer.sol';
import { INounsDAOLogic } from '../contracts/interfaces/INounsDAOLogic.sol';

contract DeployDAOV3NewContractsBase is Script {
uint256 public constant DELAYED_GOV_DURATION = 30 days;
Expand All @@ -22,7 +22,7 @@ contract DeployDAOV3NewContractsBase is Script {
uint256 public constant FORK_DAO_PROPOSAL_THRESHOLD_BPS = 25; // 0.25%
uint256 public constant FORK_DAO_QUORUM_VOTES_BPS = 1000; // 10%

NounsDAOLogicV1 public immutable daoProxy;
INounsDAOLogic public immutable daoProxy;
INounsDAOExecutor public immutable timelockV1;
bool public immutable deployTimelockV2Harness; // should be true only for testnets

Expand All @@ -33,7 +33,7 @@ contract DeployDAOV3NewContractsBase is Script {
uint256 _forkDAOVotingPeriod,
uint256 _forkDAOVotingDelay
) {
daoProxy = NounsDAOLogicV1(payable(_daoProxy));
daoProxy = INounsDAOLogic(payable(_daoProxy));
timelockV1 = INounsDAOExecutor(_timelockV1);
deployTimelockV2Harness = _deployTimelockV2Harness;
forkDAOVotingPeriod = _forkDAOVotingPeriod;
Expand Down
87 changes: 0 additions & 87 deletions packages/nouns-contracts/test/foundry/DescriptorUpgrade.t.sol

This file was deleted.

Loading