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

Add proposer &minDelay as arguments to SubmitUpgradeProposalScript #2

Merged
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
16 changes: 7 additions & 9 deletions script/SubmitUpgradeProposalScript.s.sol
Original file line number Diff line number Diff line change
@@ -9,12 +9,10 @@ import {GovernorUpgradeable} from "openzeppelin-upgradeable-v5/governance/Govern
import {CreateL2ArbSysProposal} from "script/helpers/CreateL2ArbSysProposal.sol";

contract SubmitUpgradeProposalScript is Script, SharedGovernorConstants, CreateL2ArbSysProposal {
// TODO: Update `PROPOSER` to script msg.sender who will submit the proposal.
address PROPOSER = 0x1B686eE8E31c5959D9F5BBd8122a58682788eeaD; // L2Beat
// TODO: Update `minDelay` to latest getMinDelay() from L1Timelock.
uint256 minDelay = 259_200;
address PROPOSER_ADDRESS =
vm.envOr("PROPOSER_ADDRESS", 0x1B686eE8E31c5959D9F5BBd8122a58682788eeaD); //L2Beat

function run(address _timelockRolesUpgrader)
function run(address _timelockRolesUpgrader, uint256 _minDelay)
public
returns (
address[] memory targets,
@@ -24,10 +22,10 @@ contract SubmitUpgradeProposalScript is Script, SharedGovernorConstants, CreateL
uint256 _proposalId
)
{
return proposeUpgrade(_timelockRolesUpgrader);
return proposeUpgrade(_timelockRolesUpgrader, _minDelay);
}

function proposeUpgrade(address _timelockRolesUpgrader)
function proposeUpgrade(address _timelockRolesUpgrader, uint256 _minDelay)
internal
returns (
address[] memory _targets,
@@ -85,8 +83,8 @@ contract SubmitUpgradeProposalScript is Script, SharedGovernorConstants, CreateL
By approving this proposal, the Arbitrum DAO will upgrade its governance infrastructure, enabling new features and improvements in the governance process. \
";
(_targets, _values, _calldatas) =
createL2ArbSysProposal(_description, _timelockRolesUpgrader, minDelay);
vm.startBroadcast(PROPOSER);
createL2ArbSysProposal(_description, _timelockRolesUpgrader, _minDelay);
vm.startBroadcast(PROPOSER_ADDRESS);
_proposalId = GovernorUpgradeable(payable(L2_CORE_GOVERNOR)).propose(
_targets, _values, _calldatas, _description
);
4 changes: 2 additions & 2 deletions test/L2ArbitrumGovernorV2.t.sol
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ abstract contract L2ArbitrumGovernorV2Test is SetupNewGovernors {
bytes[] memory _calldatas,
string memory _description,
uint256 _proposalId
) = submitUpgradeProposalScript.run(address(timelockRolesUpgrader));
) = submitUpgradeProposalScript.run(address(timelockRolesUpgrader), L1_TIMELOCK_MIN_DELAY);

vm.roll(vm.getBlockNumber() + currentCoreGovernor.votingDelay() + 1);
assertEq(
@@ -1091,7 +1091,7 @@ abstract contract Queue is L2ArbitrumGovernorV2Test {
/*string memory _description*/
,
uint256 _proposalId
) = submitUpgradeProposalScript.run(address(timelockRolesUpgrader));
) = submitUpgradeProposalScript.run(address(timelockRolesUpgrader), L1_TIMELOCK_MIN_DELAY);

vm.roll(vm.getBlockNumber() + currentCoreGovernor.votingDelay() + 1);
assertEq(