Skip to content

Commit becb8b1

Browse files
authored
Add proposer &minDelay as arguments to SubmitUpgradeProposalScript (#2)
* Add `proposer` and `minDelay` as arguments to SubmitUpgradeProposalScript * Use proposer addresse defined in .env
1 parent ce941dd commit becb8b1

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

script/SubmitUpgradeProposalScript.s.sol

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ import {GovernorUpgradeable} from "openzeppelin-upgradeable-v5/governance/Govern
99
import {CreateL2ArbSysProposal} from "script/helpers/CreateL2ArbSysProposal.sol";
1010

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

17-
function run(address _timelockRolesUpgrader)
15+
function run(address _timelockRolesUpgrader, uint256 _minDelay)
1816
public
1917
returns (
2018
address[] memory targets,
@@ -24,10 +22,10 @@ contract SubmitUpgradeProposalScript is Script, SharedGovernorConstants, CreateL
2422
uint256 _proposalId
2523
)
2624
{
27-
return proposeUpgrade(_timelockRolesUpgrader);
25+
return proposeUpgrade(_timelockRolesUpgrader, _minDelay);
2826
}
2927

30-
function proposeUpgrade(address _timelockRolesUpgrader)
28+
function proposeUpgrade(address _timelockRolesUpgrader, uint256 _minDelay)
3129
internal
3230
returns (
3331
address[] memory _targets,
@@ -85,8 +83,8 @@ contract SubmitUpgradeProposalScript is Script, SharedGovernorConstants, CreateL
8583
By approving this proposal, the Arbitrum DAO will upgrade its governance infrastructure, enabling new features and improvements in the governance process. \
8684
";
8785
(_targets, _values, _calldatas) =
88-
createL2ArbSysProposal(_description, _timelockRolesUpgrader, minDelay);
89-
vm.startBroadcast(PROPOSER);
86+
createL2ArbSysProposal(_description, _timelockRolesUpgrader, _minDelay);
87+
vm.startBroadcast(PROPOSER_ADDRESS);
9088
_proposalId = GovernorUpgradeable(payable(L2_CORE_GOVERNOR)).propose(
9189
_targets, _values, _calldatas, _description
9290
);

test/L2ArbitrumGovernorV2.t.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ abstract contract L2ArbitrumGovernorV2Test is SetupNewGovernors {
123123
bytes[] memory _calldatas,
124124
string memory _description,
125125
uint256 _proposalId
126-
) = submitUpgradeProposalScript.run(address(timelockRolesUpgrader));
126+
) = submitUpgradeProposalScript.run(address(timelockRolesUpgrader), L1_TIMELOCK_MIN_DELAY);
127127

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

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

0 commit comments

Comments
 (0)