// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; import { ProposalUtils } from "./ProposalUtils.sol"; import { Proposal, IGovernance } from "./interfaces/IGovernance.sol"; import { TornadoStakingRewards } from "@root/TornadoStakingRewards.sol"; import { RestoreRewardsProposal } from "@root/Proposal.sol"; import { Test } from "@forge-std/Test.sol"; contract MockProposal is Test, ProposalUtils { modifier executeCurrentProposalBefore() { createAndExecuteProposal(); _; } function createAndVoteProposal() public returns (uint256) { TornadoStakingRewards governanceStakingImplementation = new TornadoStakingRewards(_governanceAddress, _tokenAddress, _relayerRegistryAddress); RestoreRewardsProposal proposal = new RestoreRewardsProposal(address(governanceStakingImplementation)); uint256 proposalId = proposeAndVote(address(proposal)); return proposalId; } function createAndExecuteProposal() public { uint256 proposalId = createAndVoteProposal(); waitUntilExecutable(proposalId); IGovernance(_governanceAddress).execute(proposalId); } }