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

Use deployed governors in tests #32

Merged
merged 1 commit into from
Aug 28, 2024
Merged
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
5 changes: 3 additions & 2 deletions script/SharedGovernorConstants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pragma solidity 0.8.26;
// Inheritable extension holding governor deployment constants that are shared between the Core Governor and the
// Treasury Governor. These should be carefully checked and reviewed before final deployment.
contract SharedGovernorConstants {
uint256 constant FORK_BLOCK = 245_608_716; // Arbitrary recent block
address public constant L2_ARB_TOKEN_ADDRESS = 0x912CE59144191C1204E64559FE8253a0e49E6548;

address public constant L2_CORE_GOVERNOR = 0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9;
Expand All @@ -23,8 +24,8 @@ contract SharedGovernorConstants {
uint256 public constant L1_TIMELOCK_MIN_DELAY = 259_200; // TODO: Make sure this is up to date.
address public constant L1_ARB_ONE_DELAYED_INBOX = 0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f;

address public constant L2_CORE_GOVERNOR_ONCHAIN = address(0); // TODO: Update with the deployed address.
address public constant L2_TREASURY_GOVERNOR_ONCHAIN = address(0); // TODO: Update with the deployed address.
address public constant L2_CORE_GOVERNOR_ONCHAIN = 0x7796F378B3c56ceD57350B938561D8c52256456b;
address public constant L2_TREASURY_GOVERNOR_ONCHAIN = 0x4fd1216c8b5E72b22785169Ae5C1e8f3b30C19E4;
bool public constant UPGRADE_PROPOSAL_PASSED_ONCHAIN = false; // TODO: Update after the upgrade proposal is passed.

address public constant L2_UPGRADE_EXECUTOR = 0xCF57572261c7c2BCF21ffD220ea7d1a27D40A827;
Expand Down
2 changes: 1 addition & 1 deletion test/L2ArbitrumGovernorV2.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ contract CoreGovernorHasVoted is CoreGovernorBase, CastVoteWithReasonAndParams {
}
}

contract CoverGovernorQueue is CoreGovernorBase, Queue {
contract CoreGovernorQueue is CoreGovernorBase, Queue {
function setUp() public override(L2ArbitrumGovernorV2Test, CoreGovernorBase) {
super.setUp();
}
Expand Down
10 changes: 6 additions & 4 deletions test/helpers/SetupNewGovernors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import {L2ArbitrumGovernorV2} from "src/L2ArbitrumGovernorV2.sol";
import {TimelockRolesUpgrader} from "src/gov-action-contracts/TimelockRolesUpgrader.sol";

abstract contract SetupNewGovernors is SharedGovernorConstants, Test {
uint256 constant FORK_BLOCK = 220_819_857; // Arbitrary recent block

// Deploy & setup scripts
SubmitUpgradeProposalScript submitUpgradeProposalScript;
TimelockRolesUpgrader timelockRolesUpgrader;
Expand Down Expand Up @@ -49,8 +47,12 @@ abstract contract SetupNewGovernors is SharedGovernorConstants, Test {
proxyTreasuryGovernorDeployer.setUp();

// Deploy Governor proxy contracts
newCoreGovernor = proxyCoreGovernorDeployer.run(_implementation);
newTreasuryGovernor = proxyTreasuryGovernorDeployer.run(_implementation);
newCoreGovernor = L2_CORE_GOVERNOR_ONCHAIN == address(0)
? proxyCoreGovernorDeployer.run(_implementation)
: L2ArbitrumGovernorV2(payable(L2_CORE_GOVERNOR_ONCHAIN));
newTreasuryGovernor = L2_TREASURY_GOVERNOR_ONCHAIN == address(0)
? proxyTreasuryGovernorDeployer.run(_implementation)
: L2ArbitrumGovernorV2(payable(L2_TREASURY_GOVERNOR_ONCHAIN));

// Current governors and timelocks
currentCoreGovernor = GovernorUpgradeable(payable(L2_CORE_GOVERNOR));
Expand Down
Loading