Skip to content

Commit

Permalink
Shift EmissionManager proposal script to use ProposalScript
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJem committed Nov 13, 2024
1 parent 4f063fb commit 07d8568
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions src/proposals/EmissionManagerProposal.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import {console2} from "forge-std/console2.sol";
import {ScriptSuite} from "proposal-sim/script/ScriptSuite.s.sol";
import {ProposalScript} from "src/proposals/ProposalScript.sol";

// OCG Proposal Simulator
import {Addresses} from "proposal-sim/addresses/Addresses.sol";
Expand Down Expand Up @@ -181,27 +180,7 @@ contract EmissionManagerProposal is GovernorBravoProposal {
}
}

/// @notice GovernorBravoScript is a script that runs BRAVO_01 proposal.
/// BRAVO_01 proposal deploys a Vault contract and an ERC20 token contract
/// Then the proposal transfers ownership of both Vault and ERC20 to the timelock address
/// Finally the proposal whitelist the ERC20 token in the Vault contract
/// @dev Use this script to simulates or run a single proposal
/// Use this as a template to create your own script
/// `forge script script/GovernorBravo.s.sol:GovernorBravoScript -vvvv --rpc-url {rpc} --broadcast --verify --etherscan-api-key {key}`
// solhint-disable-next-line contract-name-camelcase
contract EmissionManagerProposalScript is ScriptSuite {
string public constant ADDRESSES_PATH = "./src/proposals/addresses.json";

constructor() ScriptSuite(ADDRESSES_PATH, new EmissionManagerProposal()) {}

function run() public override {
// set debug mode to true and run it to build the actions list
proposal.setDebug(true);

// run the proposal to build it
proposal.run(addresses, address(0));

// get the calldata for the proposal, doing so in debug mode prints it to the console
proposal.getCalldata();
}
contract EmissionManagerProposalScript is ProposalScript {
constructor() ProposalScript(new EmissionManagerProposal()) {}
}

0 comments on commit 07d8568

Please sign in to comment.