827e1d6991
Signed-off-by: AlienTornadosaurusHex <>
76 lines
2.0 KiB
Solidity
76 lines
2.0 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.6.12;
|
|
pragma experimental ABIEncoderV2;
|
|
|
|
// OZ Imports
|
|
|
|
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
|
|
// Local imports
|
|
|
|
import { InfrastructureUpgradeProposal } from "src/proposals/InfrastructureUpgradeProposal.sol";
|
|
|
|
import { UniswapV3FeeOracle } from "src/v2/UniswapV3FeeOracle.sol";
|
|
|
|
import { CurveFeeOracle, ICurvePriceOracle, CurveChainedOracles } from "src/v2/CurveFeeOracle.sol";
|
|
|
|
import { InstanceRegistry } from "src/v2/InstanceRegistry.sol";
|
|
|
|
import { FeeOracleManager } from "src/v2/FeeOracleManager.sol";
|
|
|
|
import { TornadoRouter } from "src/v2/TornadoRouter.sol";
|
|
|
|
// Test imports
|
|
|
|
import { TornadoProposalTest } from "./TornadoProposalTest.sol";
|
|
|
|
contract ProposalTests is TornadoProposalTest {
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ VARIABLES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
IERC20 public constant TORN = IERC20(0x77777FeDdddFfC19Ff86DB637967013e6C6A116C);
|
|
|
|
InstanceRegistry implInstanceRegisty;
|
|
|
|
UniswapV3FeeOracle v3FeeOracle;
|
|
|
|
FeeOracleManager feeOracleManager;
|
|
|
|
TornadoRouter router;
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TESTING ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
function setUp() public override {
|
|
super.setUp();
|
|
|
|
implInstanceRegisty = new InstanceRegistry(address(governance));
|
|
|
|
v3FeeOracle = new UniswapV3FeeOracle(address(governance));
|
|
|
|
feeOracleManager = new FeeOracleManager(address(TORN), address(governance));
|
|
|
|
router = new TornadoRouter(address(governance));
|
|
}
|
|
|
|
function test_infrastructureUpgradeProposalBasic() public {
|
|
// Create proposal
|
|
address proposal = address(
|
|
new InfrastructureUpgradeProposal(
|
|
address(v3FeeOracle),
|
|
address(feeOracleManager),
|
|
address(implInstanceRegisty),
|
|
address(router)
|
|
)
|
|
);
|
|
|
|
// Propose
|
|
uint256 id = easyPropose(proposal);
|
|
|
|
// Wait
|
|
waitUntilExecutable(id);
|
|
|
|
// Exec
|
|
governance.execute(id);
|
|
}
|
|
}
|