37 lines
1.5 KiB
Solidity
37 lines
1.5 KiB
Solidity
|
// SPDX-License-Identifier: MIT
|
||
|
pragma solidity ^0.8.19;
|
||
|
|
||
|
import { IGovernance } from "@interfaces/IGovernance.sol";
|
||
|
import { TornadoAddresses } from "@proprietary/TornadoAddresses.sol";
|
||
|
|
||
|
import { Test } from "@forge-std/Test.sol";
|
||
|
import { console2 } from "@forge-std/console2.sol";
|
||
|
|
||
|
contract MockProposal is TornadoAddresses, Test {
|
||
|
uint256 public PROPOSAL_VOTING_DURATION;
|
||
|
uint256 public PROPOSAL_LOCKED_DURATION;
|
||
|
uint256 public PROPOSAL_DURATION;
|
||
|
uint256 public PROPOSAL_EXECUTION_MAX_DURATION;
|
||
|
uint256 public PROPOSAL_QOURUM_THRESHOLD;
|
||
|
string public constant PROPOSAL_DESCRIPTION = "{title:'Some proposal',description:''}";
|
||
|
|
||
|
function _fetchConfiguration() internal {
|
||
|
IGovernance governance = IGovernance(governanceAddress);
|
||
|
|
||
|
PROPOSAL_LOCKED_DURATION = governance.EXECUTION_DELAY();
|
||
|
PROPOSAL_EXECUTION_MAX_DURATION = governance.EXECUTION_EXPIRATION();
|
||
|
PROPOSAL_QOURUM_THRESHOLD = governance.QUORUM_VOTES();
|
||
|
PROPOSAL_VOTING_DURATION = governance.VOTING_DELAY();
|
||
|
PROPOSAL_VOTING_DURATION = governance.VOTING_PERIOD();
|
||
|
PROPOSAL_DURATION = PROPOSAL_VOTING_DURATION + PROPOSAL_LOCKED_DURATION;
|
||
|
}
|
||
|
|
||
|
function setUp() public virtual {
|
||
|
// If fork block number unitialized, then set latest
|
||
|
if (block.number == 1) vm.createSelectFork(vm.rpcUrl("mainnet"));
|
||
|
else vm.createSelectFork(vm.rpcUrl("mainnet"), block.number);
|
||
|
|
||
|
_fetchConfiguration();
|
||
|
}
|
||
|
}
|