Skip to content

Commit df4ec11

Browse files
eladioschgithub-actions[bot]
authored andcommitted
forge fmt
1 parent 34a1764 commit df4ec11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+619
-579
lines changed

mainnet-contracts/script/AccessManagerMigrations/08_GenerateFeeSetterCalldata.s.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ contract GenerateFeeSetterCalldata is Script {
1616
daoSelectors[0] = PufferVaultV5.setExitFeeBasisPoints.selector;
1717
daoSelectors[1] = PufferVaultV5.setTreasuryExitFeeBasisPoints.selector;
1818

19-
calldatas[0] =
20-
abi.encodeWithSelector(AccessManager.setTargetFunctionRole.selector, pufferVault, daoSelectors, ROLE_ID_DAO);
19+
calldatas[0] = abi.encodeWithSelector(
20+
AccessManager.setTargetFunctionRole.selector, pufferVault, daoSelectors, ROLE_ID_DAO
21+
);
2122

2223
bytes memory encodedMulticall = abi.encodeCall(Multicall.multicall, (calldatas));
2324

mainnet-contracts/script/CompleteQueuedWithdrawals.s.sol

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ contract CompleteQueuedWithdrawals is Script {
6565
tokens[0] = t;
6666

6767
vm.startBroadcast();
68-
PufferModuleManager(payable(params.pufferModuleManager)).callCompleteQueuedWithdrawals({
69-
moduleName: params.moduleName,
70-
withdrawals: withdrawals,
71-
tokens: tokens,
72-
receiveAsTokens: params.receiveAsTokens
73-
});
68+
PufferModuleManager(payable(params.pufferModuleManager))
69+
.callCompleteQueuedWithdrawals({
70+
moduleName: params.moduleName,
71+
withdrawals: withdrawals,
72+
tokens: tokens,
73+
receiveAsTokens: params.receiveAsTokens
74+
});
7475
}
7576
}

mainnet-contracts/script/DeployCarrotVesting.s.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ contract DeployCarrotVesting is Script {
2525
address carrot, // CARROT token address, for impl constructor
2626
address puffer, // PUFFER token address, for impl constructor
2727
address owner // owner of the contract, for initialize
28-
) public {
28+
)
29+
public
30+
{
2931
vm.startBroadcast();
3032

3133
CarrotVesting impl = new CarrotVesting(carrot, puffer);

mainnet-contracts/script/DeployEverything.s.sol

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ import { DeployPufferOracle } from "script/DeployPufferOracle.s.sol";
1313
import { GuardiansDeployment, PufferProtocolDeployment, BridgingDeployment } from "./DeploymentStructs.sol";
1414
import { PufferRevenueDepositor } from "src/PufferRevenueDepositor.sol";
1515
import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
16-
import { GenerateRevenueDepositorCalldata } from
17-
"script/AccessManagerMigrations/06_GenerateRevenueDepositorCalldata.s.sol";
16+
import {
17+
GenerateRevenueDepositorCalldata
18+
} from "script/AccessManagerMigrations/06_GenerateRevenueDepositorCalldata.s.sol";
1819
import { MockAeraVault } from "test/mocks/MockAeraVault.sol";
1920

2021
/**
@@ -47,9 +48,8 @@ contract DeployEverything is BaseScript {
4748
GuardiansDeployment memory guardiansDeployment =
4849
new DeployGuardians().run(AccessManager(puffETHDeployment.accessManager), guardians, threshold);
4950

50-
address pufferOracle = new DeployPufferOracle().run(
51-
puffETHDeployment.accessManager, guardiansDeployment.guardianModule, puffETHDeployment.pufferVault
52-
);
51+
address pufferOracle = new DeployPufferOracle()
52+
.run(puffETHDeployment.accessManager, guardiansDeployment.guardianModule, puffETHDeployment.pufferVault);
5353

5454
PufferProtocolDeployment memory pufferDeployment =
5555
new DeployPuffer().run(guardiansDeployment, puffETHDeployment.pufferVault, pufferOracle);
@@ -114,14 +114,10 @@ contract DeployEverything is BaseScript {
114114
});
115115

116116
PufferRevenueDepositor revenueDepositor = PufferRevenueDepositor(
117-
(
118-
payable(
119-
new ERC1967Proxy{ salt: bytes32("revenueDepositor") }(
117+
(payable(new ERC1967Proxy{ salt: bytes32("revenueDepositor") }(
120118
address(revenueDepositorImpl),
121119
abi.encodeCall(PufferRevenueDepositor.initialize, (address(puffETHDeployment.accessManager)))
122-
)
123-
)
124-
)
120+
)))
125121
);
126122

127123
bytes memory accessManagerCd =

mainnet-contracts/script/DeployPufETH.s.sol

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,16 @@ contract DeployPufETH is BaseScript {
126126
}
127127

128128
// Initialize Depositor
129-
NoImplementation(payable(address(depositorProxy))).upgradeToAndCall(
130-
address(pufferDepositorImplementation), abi.encodeCall(PufferDepositor.initialize, (address(accessManager)))
131-
);
129+
NoImplementation(payable(address(depositorProxy)))
130+
.upgradeToAndCall(
131+
address(pufferDepositorImplementation),
132+
abi.encodeCall(PufferDepositor.initialize, (address(accessManager)))
133+
);
132134
// Initialize Vault
133-
NoImplementation(payable(address(vaultProxy))).upgradeToAndCall(
134-
address(pufferVaultImplementation), abi.encodeCall(PufferVaultV5.initialize, (address(accessManager)))
135-
);
135+
NoImplementation(payable(address(vaultProxy)))
136+
.upgradeToAndCall(
137+
address(pufferVaultImplementation), abi.encodeCall(PufferVaultV5.initialize, (address(accessManager)))
138+
);
136139

137140
vm.serializeAddress(obj, "PufferDepositor", address(depositorProxy));
138141
vm.serializeAddress(obj, "PufferDepositorImplementation", address(pufferDepositorImplementation));
@@ -210,8 +213,9 @@ contract DeployPufETH is BaseScript {
210213
bytes[] memory calldatas = new bytes[](4);
211214

212215
// Setup role members (no delay)
213-
calldatas[0] =
214-
abi.encodeWithSelector(AccessManager.grantRole.selector, ROLE_ID_OPERATIONS_MULTISIG, operationsMultisig, 0);
216+
calldatas[0] = abi.encodeWithSelector(
217+
AccessManager.grantRole.selector, ROLE_ID_OPERATIONS_MULTISIG, operationsMultisig, 0
218+
);
215219
// Grant admin role to timelock
216220
calldatas[1] =
217221
abi.encodeWithSelector(AccessManager.grantRole.selector, accessManager.ADMIN_ROLE(), address(timelock), 0);

mainnet-contracts/script/DeployPuffer.s.sol

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,14 @@ contract DeployPuffer is BaseScript {
113113
operationsMultisig: operationsMultisig
114114
});
115115

116-
NoImplementation(payable(address(validatorTicketProxy))).upgradeToAndCall(
117-
address(validatorTicketImplementation),
118-
abi.encodeCall(
119-
ValidatorTicket.initialize,
120-
(address(accessManager), 500, 50) //@todo recheck 5% treasury, 0.5% guardians
121-
)
122-
);
116+
NoImplementation(payable(address(validatorTicketProxy)))
117+
.upgradeToAndCall(
118+
address(validatorTicketImplementation),
119+
abi.encodeCall(
120+
ValidatorTicket.initialize,
121+
(address(accessManager), 500, 50) //@todo recheck 5% treasury, 0.5% guardians
122+
)
123+
);
123124

124125
// UUPS proxy for PufferProtocol
125126
proxy = new ERC1967Proxy(address(new NoImplementation()), "");
@@ -175,9 +176,10 @@ contract DeployPuffer is BaseScript {
175176
pufferProtocol: address(proxy)
176177
});
177178

178-
NoImplementation(payable(address(moduleManagerProxy))).upgradeToAndCall(
179-
address(moduleManager), abi.encodeCall(moduleManager.initialize, (address(accessManager)))
180-
);
179+
NoImplementation(payable(address(moduleManagerProxy)))
180+
.upgradeToAndCall(
181+
address(moduleManager), abi.encodeCall(moduleManager.initialize, (address(accessManager)))
182+
);
181183

182184
// Initialize the Pool
183185
pufferProtocol.initialize({ accessManager: address(accessManager) });
@@ -215,7 +217,7 @@ contract DeployPuffer is BaseScript {
215217
pufferDepositor: address(0), // overwritten in DeployEverything
216218
weth: address(0), // overwritten in DeployEverything
217219
revenueDepositor: address(0) // overwritten in DeployEverything
218-
});
220+
});
219221
}
220222

221223
function getStakingContract() internal returns (address) {

mainnet-contracts/script/DeployPufferOracle.s.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ contract DeployPufferOracle is BaseScript {
1313
broadcast
1414
returns (address)
1515
{
16-
PufferOracleV2 oracle =
17-
new PufferOracleV2(GuardianModule(payable(guardianModule)), payable(pufferVault), accessManager);
16+
PufferOracleV2 oracle = new PufferOracleV2(
17+
GuardianModule(payable(guardianModule)), payable(pufferVault), accessManager
18+
);
1819

1920
return address(oracle);
2021
}

mainnet-contracts/script/DeployPufferWithdrawalManager.s.sol

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,10 @@ contract DeployPufferWithdrawalManager is DeployerHelper {
2727
((new PufferWithdrawalManager(BATCH_SIZE, PufferVaultV5(payable(_getPufferVault())), IWETH(_getWETH()))));
2828

2929
withdrawalManager = PufferWithdrawalManager(
30-
(
31-
payable(
32-
new ERC1967Proxy{ salt: bytes32("PufferWithdrawalManager") }(
30+
(payable(new ERC1967Proxy{ salt: bytes32("PufferWithdrawalManager") }(
3331
address(withdrawalManagerImpl),
3432
abi.encodeCall(PufferWithdrawalManager.initialize, address(_getAccessManager()))
35-
)
36-
)
37-
)
33+
)))
3834
);
3935

4036
vm.label(address(withdrawalManager), "PufferWithdrawalManagerProxy");

mainnet-contracts/script/DeployRevenueDepositor.s.sol

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,17 @@ contract DeployRevenueDepositor is DeployerHelper {
2424
new PufferRevenueDepositor({ vault: _getPufferVault(), weth: _getWETH(), aeraVault: _getAeraVault() });
2525

2626
revenueDepositor = PufferRevenueDepositor(
27-
(
28-
payable(
29-
new ERC1967Proxy{ salt: bytes32("RevenueDepositor") }(
27+
(payable(new ERC1967Proxy{ salt: bytes32("RevenueDepositor") }(
3028
address(revenueDepositorImpl),
3129
abi.encodeCall(PufferRevenueDepositor.initialize, (address(_getAccessManager())))
32-
)
33-
)
34-
)
30+
)))
3531
);
3632

3733
vm.label(address(revenueDepositor), "PufferRevenueDepositorProxy");
3834
vm.label(address(revenueDepositorImpl), "PufferRevenueDepositorImplementation");
3935

4036
encodedCalldata = calldataGenerator.run({
41-
revenueDepositorProxy: address(revenueDepositor),
42-
operationsMultisig: _getOPSMultisig()
37+
revenueDepositorProxy: address(revenueDepositor), operationsMultisig: _getOPSMultisig()
4338
});
4439

4540
console.log("Queue from Timelock -> AccessManager", _getAccessManager());

mainnet-contracts/script/DeployerHelper.s.sol

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ abstract contract DeployerHelper is Script {
6060
console.log("Deployed", contractName, "at", implementation);
6161

6262
if (block.chainid == holesky) {
63-
AccessManager(_getAccessManager()).execute(
64-
proxyTarget, abi.encodeCall(UUPSUpgradeable.upgradeToAndCall, (address(implementation), data))
65-
);
63+
AccessManager(_getAccessManager())
64+
.execute(proxyTarget, abi.encodeCall(UUPSUpgradeable.upgradeToAndCall, (address(implementation), data)));
6665
} else {
6766
bytes memory upgradeCallData =
6867
abi.encodeCall(UUPSUpgradeable.upgradeToAndCall, (address(implementation), data));
@@ -98,9 +97,8 @@ abstract contract DeployerHelper is Script {
9897
console.log("Deployed", contractName, "at", implementation);
9998

10099
if (block.chainid == holesky) {
101-
AccessManager(_getAccessManager()).execute(
102-
proxyTarget, abi.encodeCall(UUPSUpgradeable.upgradeToAndCall, (address(implementation), data))
103-
);
100+
AccessManager(_getAccessManager())
101+
.execute(proxyTarget, abi.encodeCall(UUPSUpgradeable.upgradeToAndCall, (address(implementation), data)));
104102
} else {
105103
bytes memory upgradeCallData =
106104
abi.encodeCall(UUPSUpgradeable.upgradeToAndCall, (address(implementation), data));

0 commit comments

Comments
 (0)