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 solhint #54

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open

Add solhint #54

wants to merge 35 commits into from

Conversation

bxmmm1
Copy link
Collaborator

@bxmmm1 bxmmm1 commented Sep 8, 2024

No description provided.

ksatyarth2 and others added 30 commits August 23, 2024 16:40
forge fmt

feat: add WithdrawalManager contract for mainnet deployment

feat: update requestWithdrawals to manage withdrawals and batch processing for toBurn and toTransfer arrays

feat: restructure WithdrawalManager to use a Withdrawal struct and update requestWithdrawals function to include recipient address

feat: update requestWithdrawals to store Withdrawal struct in withdrawals array

feat: update BATCH_SIZE to 10 and adjust withdrawal logic accordingly

refactor: consolidate withdrawal management by replacing multiple arrays with a single WithdrawalBatch struct array

fix: update initial exchange rate to 0 in WithdrawalManager contract

feat: add WithdrawalRequested event to requestWithdrawals function

fix: restore emit statement for WithdrawalRequested in WithdrawalManager contract

feat: add validation to prevent finalizing an already finalized withdrawal batch

feat: replace require statement with custom error for batch finalization check

wip

aider stuff

feat: loop over withdrawal batches to finalize them in finalizeWithdrawals function

fix: reintroduce validation to prevent finalizing already finalized withdrawal batches

feat: add constructor to initialize immutable PufferVaultV3 variable

feat: import PufferVaultV3 and update withdrawal logic to use its exchange rate for transfers

feat: import OpenZeppelin's Math library and use min function in completeQueuedWithdrawal

fix: correct withdrawal logic in WithdrawalManager contract to ensure accurate ETH transfer and burning of pufETH

feat: create BatchFinalized event and emit it in finalizeWithdrawals function

feat: update withdrawal process to include dynamic exchange rate calculation and improve batch finalization logic

fix: resolve undeclared identifiers in WithdrawalManager contract

feat: update BatchFinalized event and refactor withdrawal logic in WithdrawalManager contract

feat: use custom errors instead of revert in WithdrawalManager contract

feat: use SafeTransferLib for secure ETH transfers in WithdrawalManager

docs: update comment to clarify batch finalization behavior in WithdrawalManager contract

fix: prevent finalizeWithdrawals if the batch is not full by adding a check and reverting with BatchNotFull error

refactor: remove outdated comments and clean up code in WithdrawalManager contract

fix: update import and usage of SafeTransferLib to Address for ETH transfers in WithdrawalManager.sol

feat: introduce minimum withdrawal amount of 0.01 ETH in WithdrawalManager contract

feat: replace require statements with custom errors for withdrawal amount validation

feat: enhance WithdrawalManager with error handling and event logging for withdrawals

feat: add WithdrawalCompleted event and emit it in completeQueuedWithdrawal function

add the missing event

feat: add unit tests for WithdrawalManager contract

test: add test for creating five deposits in WithdrawalManager.t.sol

feat: create multiple actors for deposits from different addresses in tests

fuzz

test: add test for 10 deposits and finalizeWithdrawals function

basic withdrawal test

update gitignore

test POC
* FWR Deployment script (#36)

* remove unused imports

* update the deployment script

* forge fmt

* remove unused variables

* forge fmt

* remove duplicate import

---------

Co-authored-by: bxmmm1 <bxmmm1@users.noreply.github.com>

* docs: update README.md (#35)

reedamable -> redeemable

* constructor code coverage (#37)

* L2RewardManager bugfix

* fmt

* Upload signed audit reports (#39)

* feat: add ACL, interfaces, upgradability

* Create puffer.json

* Delete mainnet-contracts/mainnet-contracts/output/puffer.json

* chore: adding puffer to the files name

* chore: improved natspec with convention

* fix: acl in tests ; 4 still failing

* fix: acl in tests; still 2 failing

* fix: checks and passing tests

* feat: add withdraw idx, batch idx in event

* feat: add permit in `requestWithdrawals`

* update withdrawal manager

* update wording

* update natspec

* update common addresses in test helper

* fmt

* FWR Fixes (#44)

FWR audit fixes

* getter test

---------

Co-authored-by: Benjamin <benjaminxh+github@gmail.com>
Co-authored-by: bxmmm1 <bxmmm1@users.noreply.github.com>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
Copy link

codecov bot commented Sep 8, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
mainnet-contracts/src/PufferDepositorV2.sol 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
mainnet-contracts/src/GuardianModule.sol 92.23% <ø> (ø)
mainnet-contracts/src/L1RewardManager.sol 100.00% <100.00%> (ø)
mainnet-contracts/src/LibBeaconchainContract.sol 100.00% <ø> (ø)
mainnet-contracts/src/NoImplementation.sol 100.00% <100.00%> (ø)
mainnet-contracts/src/PufLocker.sol 93.44% <ø> (ø)
mainnet-contracts/src/PufToken.sol 90.00% <ø> (ø)
mainnet-contracts/src/PufferL2Depositor.sol 94.59% <100.00%> (ø)
mainnet-contracts/src/PufferModule.sol 100.00% <ø> (ø)
mainnet-contracts/src/PufferModuleManager.sol 86.36% <100.00%> (ø)
mainnet-contracts/src/PufferOracleV2.sol 86.95% <ø> (ø)
... and 6 more

@bxmmm1 bxmmm1 self-assigned this Sep 10, 2024
@bxmmm1 bxmmm1 changed the base branch from 2step-poc to master September 13, 2024 13:02
@@ -161,7 +161,7 @@ contract L1RewardManager is
* @notice This contract receives XPufETH from the L2RewardManager via the bridge, unwraps it to pufETH and then burns the pufETH, reverting the original mintAndBridge call
* @dev Restricted access to `ROLE_ID_BRIDGE`
*/
function xReceive(bytes32, uint256, address, address originSender, uint32 originDomainId, bytes memory callData)
function xReceive(bytes32, uint256, address, address originSender, uint32 originDomainId, bytes calldata callData)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will these changes memory -> calldata affect future upgradation (if any) by any chance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants