Skip to content

Commit

Permalink
Update natspec change broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkeating committed Feb 14, 2024
1 parent bf75440 commit 39f7f0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion script/ProposeProtocolFeesBase.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ abstract contract ProposeProtocolFeesBase is Script, DeployInput {
/// will be proposed.
function getPoolFeeSettings() internal pure virtual returns (PoolFeeSettings[] memory);

/// @dev Create a proposal on the Uniswap Governor with targets, values, signatures, and calldatas
/// defined in this contracts. These values should have been built using
/// `pushFeeSettingToProposalCalldata`.
function propose() internal returns (uint256 _proposalId) {
return GOVERNOR.propose(
targets,
Expand All @@ -74,7 +77,6 @@ abstract contract ProposeProtocolFeesBase is Script, DeployInput {
uint256 _proposerKey = vm.envUint("PROPOSER_PRIVATE_KEY");
vm.rememberKey(_proposerKey);

vm.startBroadcast(_proposer);
PoolFeeSettings[] memory poolFeeSettings = getPoolFeeSettings();
for (uint256 i = 0; i < poolFeeSettings.length; i++) {
pushFeeSettingToProposalCalldata(
Expand All @@ -85,6 +87,7 @@ abstract contract ProposeProtocolFeesBase is Script, DeployInput {
);
}

vm.startBroadcast(_proposer);
_proposalId = propose();
vm.stopBroadcast();
return _proposalId;
Expand Down
4 changes: 3 additions & 1 deletion script/ProposeProtocolFeesBatch1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import {DeployInput} from "script/DeployInput.sol";
import {GovernorBravoDelegate} from "script/interfaces/GovernorBravoInterfaces.sol";
import {ProposeProtocolFeesBase} from "script/ProposeProtocolFeesBase.s.sol";

/// @dev This script will turn on protocol fees for the following pools: WBTC-WETH-3000,
/// DAI-WETH-300, and DAI-USDC-100.
contract ProposeProtocolFeesBatch1 is ProposeProtocolFeesBase {
// TODO Double check these are the right pools
address constant WBTC_WETH_3000_POOL = 0xCBCdF9626bC03E24f779434178A73a0B4bad62eD;
address constant DAI_WETH_3000_POOL = 0xC2e9F25Be6257c210d7Adf0D4Cd6E3E881ba25f8;
address constant DAI_USDC_100_POOL = 0x5777d92f208679DB4b9778590Fa3CAB3aC9e2168;

/// @return An array of pools and new fee values to set
/// @return A list of pool settings used to update protocol fees for each pool.
function getPoolFeeSettings() internal pure override returns (PoolFeeSettings[] memory) {
PoolFeeSettings[] memory poolFeeSettings = new PoolFeeSettings[](3);
poolFeeSettings[0] = PoolFeeSettings(WBTC_WETH_3000_POOL, 10, 10);
Expand Down

0 comments on commit 39f7f0f

Please sign in to comment.