Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Audit and Slight Deployment Script Changes #9

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added audit/pashov-boring-vault.pdf
Binary file not shown.
1 change: 0 additions & 1 deletion lib/foundry-arbitrum
Submodule foundry-arbitrum deleted from 1ff06d
1 change: 0 additions & 1 deletion lib/openzeppelin-contracts-upgradeable
Submodule openzeppelin-contracts-upgradeable deleted from 2d081f
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"solhint": "solhint -w 0 'src/**/*.sol'",
"slither": "slither src",
"prepare": "husky",
"deploy-mainnet": "forge script script/deploy/deployAll.s.sol -f $MAINNET_RPC_URL --private-key=$PRIVATE_KEY --slow",
"deploy-createx-l1": "forge script script/DeployCustomCreatex.s.sol --rpc-url $L1_RPC_URL --private-key $PRIVATE_KEY --slow",
"deploy-createx-l2": "forge script script/DeployCustomCreatex.s.sol --rpc-url $L2_RPC_URL --private-key $PRIVATE_KEY --slow",
"deploy-l1": "forge script script/deploy/deployAll.s.sol -f $L1_RPC_URL --private-key=$PRIVATE_KEY --slow",
"deploy-l2": "forge script script/deploy/deployAll.s.sol -f $L2_RPC_URL --private-key=$PRIVATE_KEY --slow"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ contract EtherFiLiquidDecoderAndSanitizer is
* @notice BalancerV2, NativeWrapper, Curve, and Gearbox all specify a `withdraw(uint256)`,
* all cases are handled the same way.
*/
function withdraw(uint256)
function withdraw(
uint256
)
external
pure
override(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ contract EtherFiLiquidEthDecoderAndSanitizer is
* @notice BalancerV2, NativeWrapper, Curve, and Gearbox all specify a `withdraw(uint256)`,
* all cases are handled the same way.
*/
function withdraw(uint256)
function withdraw(
uint256
)
external
pure
override(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ contract EtherFiLiquidUsdDecoderAndSanitizer is
* @notice BalancerV2, NativeWrapper, Curve, and Gearbox all specify a `withdraw(uint256)`,
* all cases are handled the same way.
*/
function withdraw(uint256)
function withdraw(
uint256
)
external
pure
override(
Expand Down Expand Up @@ -114,7 +116,9 @@ contract EtherFiLiquidUsdDecoderAndSanitizer is
* @notice EtherFi, and Lido all specify a `wrap(uint256)`,
* all cases are handled the same way.
*/
function wrap(uint256)
function wrap(
uint256
)
external
pure
override(EtherFiDecoderAndSanitizer, LidoDecoderAndSanitizer)
Expand All @@ -128,7 +132,9 @@ contract EtherFiLiquidUsdDecoderAndSanitizer is
* @notice EtherFi, and Lido all specify a `unwrap(uint256)`,
* all cases are handled the same way.
*/
function unwrap(uint256)
function unwrap(
uint256
)
external
pure
override(EtherFiDecoderAndSanitizer, LidoDecoderAndSanitizer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ contract LidoLiquidDecoderAndSanitizer is
* @notice BalancerV2, NativeWrapper, Curve, and Gearbox all specify a `withdraw(uint256)`,
* all cases are handled the same way.
*/
function withdraw(uint256)
function withdraw(
uint256
)
external
pure
override(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ abstract contract EigenLayerLSTStakingDecoderAndSanitizer is BaseDecoderAndSanit
addressesFound = abi.encodePacked(strategy, token);
}

function queueWithdrawals(DecoderCustomTypes.QueuedWithdrawalParams[] calldata queuedWithdrawalParams)
function queueWithdrawals(
DecoderCustomTypes.QueuedWithdrawalParams[] calldata queuedWithdrawalParams
)
external
pure
virtual
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ abstract contract UniswapV3DecoderAndSanitizer is BaseDecoderAndSanitizer {

//============================== UNISWAP V3 ===============================

function exactInput(DecoderCustomTypes.ExactInputParams calldata params)
function exactInput(
DecoderCustomTypes.ExactInputParams calldata params
)
external
pure
virtual
Expand All @@ -44,7 +46,9 @@ abstract contract UniswapV3DecoderAndSanitizer is BaseDecoderAndSanitizer {
addressesFound = abi.encodePacked(addressesFound, params.recipient);
}

function mint(DecoderCustomTypes.MintParams calldata params)
function mint(
DecoderCustomTypes.MintParams calldata params
)
external
pure
virtual
Expand All @@ -55,7 +59,9 @@ abstract contract UniswapV3DecoderAndSanitizer is BaseDecoderAndSanitizer {
addressesFound = abi.encodePacked(params.token0, params.token1, params.recipient);
}

function increaseLiquidity(DecoderCustomTypes.IncreaseLiquidityParams calldata params)
function increaseLiquidity(
DecoderCustomTypes.IncreaseLiquidityParams calldata params
)
external
view
virtual
Expand All @@ -71,7 +77,9 @@ abstract contract UniswapV3DecoderAndSanitizer is BaseDecoderAndSanitizer {
addressesFound = abi.encodePacked(operator, token0, token1);
}

function decreaseLiquidity(DecoderCustomTypes.DecreaseLiquidityParams calldata params)
function decreaseLiquidity(
DecoderCustomTypes.DecreaseLiquidityParams calldata params
)
external
view
virtual
Expand All @@ -88,7 +96,9 @@ abstract contract UniswapV3DecoderAndSanitizer is BaseDecoderAndSanitizer {
return addressesFound;
}

function collect(DecoderCustomTypes.CollectParams calldata params)
function collect(
DecoderCustomTypes.CollectParams calldata params
)
external
view
virtual
Expand Down
4 changes: 3 additions & 1 deletion src/interfaces/EtherFiLiquid1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ interface EtherFiLiquid1 {
function addPosition(uint32 index, uint32 positionId, bytes memory configurationData, bool inDebtArray) external;
function addPositionToCatalogue(uint32 positionId) external;
function allowance(address, address) external view returns (uint256);
function alternativeAssetData(address)
function alternativeAssetData(
address
)
external
view
returns (bool isSupported, uint32 holdingPosition, uint32 depositFee);
Expand Down
4 changes: 3 additions & 1 deletion src/interfaces/IStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ interface IUNSTETH {
bool isClaimed;
}

function getWithdrawalStatus(uint256[] calldata _requestIds)
function getWithdrawalStatus(
uint256[] calldata _requestIds
)
external
view
returns (WithdrawalRequestStatus[] memory statuses);
Expand Down
4 changes: 3 additions & 1 deletion src/interfaces/RawDataDecoderAndSanitizerInterfaces.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ interface INonFungiblePositionManager {
}

function ownerOf(uint256 tokenId) external view returns (address);
function positions(uint256 tokenId)
function positions(
uint256 tokenId
)
external
view
returns (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { UlnOptions } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uln/li
contract UlnOptionsMock {
using UlnOptions for bytes;

function decode(bytes calldata _options)
function decode(
bytes calldata _options
)
public
pure
returns (bytes memory executorOptions, bytes memory dvnOptions)
Expand All @@ -31,7 +33,9 @@ contract OptionsHelper {
(gas, value) = this.decodeLzReceiveOption(option);
}

function _parseExecutorNativeDropOption(bytes memory _options)
function _parseExecutorNativeDropOption(
bytes memory _options
)
internal
view
returns (uint256 amount, bytes32 receiver)
Expand All @@ -42,7 +46,9 @@ contract OptionsHelper {
(amount, receiver) = this.decodeNativeDropOption(option);
}

function _parseExecutorLzComposeOption(bytes memory _options)
function _parseExecutorLzComposeOption(
bytes memory _options
)
internal
view
returns (uint16 index, uint256 gas, uint256 value)
Expand Down Expand Up @@ -103,7 +109,9 @@ contract OptionsHelper {
return ExecutorOptions.decodeNativeDropOption(_option);
}

function decodeLzComposeOption(bytes calldata _option)
function decodeLzComposeOption(
bytes calldata _option
)
external
pure
returns (uint16 index, uint128 gas, uint128 value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ contract SendUln302Mock is SendUlnBase, SendLibBaseE2 {
(otherWorkerFees, encodedPacket) = _payDVNs(fees, _packet, _options);
}

function _splitOptions(bytes calldata _options)
function _splitOptions(
bytes calldata _options
)
internal
pure
override
Expand Down
Loading