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

Fix parent pool complete deposit #30

Merged
merged 5 commits into from
Dec 5, 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
4 changes: 1 addition & 3 deletions contracts/ConceroBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ contract ConceroBridge is IConceroBridge, InfraCCIP {

/**
* @notice Function to calculate the proportional CCIP fee based on the amount
* @param ccipFeeInUsdc the total CCIP fee for a full batch (5000 USDC)
* @param ccipFeeInUsdc the total CCIP fee for a full batch
* @param amount the amount of USDC being transferred
*/
function _calculateProportionalCCIPFee(
Expand All @@ -257,5 +257,3 @@ contract ConceroBridge is IConceroBridge, InfraCCIP {
return (ccipFeeInUsdc * amount) / BATCHED_TX_THRESHOLD;
}
}

// broken tx concero id - 0x20abe54976b93ee76fc726f070b3626f9e7867bb855aa323981fcca1f2ec7efe
4 changes: 4 additions & 0 deletions contracts/ParentPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ error NotOwner();
error OnlyRouterCanFulfill(address);
error Unauthorized();
error NotUsdcToken();
error DepositDeadlinePassed();

contract ParentPool is IParentPool, CCIPReceiver, ParentPoolCommon, ParentPoolStorage {
/* TYPE DECLARATIONS */
Expand Down Expand Up @@ -305,6 +306,9 @@ contract ParentPool is IParentPool, CCIPReceiver, ParentPoolCommon, ParentPoolSt
if (msg.sender != lpAddress) {
revert NotAllowedToCompleteDeposit();
}
if (block.timestamp > request.deadline) {
revert DepositDeadlinePassed();
}
if (childPoolsLiquiditySnapshot == 0) {
revert DepositRequestNotReady();
}
Expand Down
Loading