From 0fa785833c344cfcce76fb024b79f91d5511d1c4 Mon Sep 17 00:00:00 2001 From: lufaque <95128636+lufaque@users.noreply.github.com> Date: Mon, 2 Dec 2024 23:06:51 +0300 Subject: [PATCH 1/4] remove comments --- contracts/ConceroBridge.sol | 2 -- 1 file changed, 2 deletions(-) diff --git a/contracts/ConceroBridge.sol b/contracts/ConceroBridge.sol index 75361ed1..a8fdd1e4 100644 --- a/contracts/ConceroBridge.sol +++ b/contracts/ConceroBridge.sol @@ -257,5 +257,3 @@ contract ConceroBridge is IConceroBridge, InfraCCIP { return (ccipFeeInUsdc * amount) / BATCHED_TX_THRESHOLD; } } - -// broken tx concero id - 0x20abe54976b93ee76fc726f070b3626f9e7867bb855aa323981fcca1f2ec7efe From 3ad630f43d75740a4e0fcc47754dbd82e1d26c5a Mon Sep 17 00:00:00 2001 From: lufaque <95128636+lufaque@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:34:24 +0300 Subject: [PATCH 2/4] fix docs --- contracts/ConceroBridge.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/ConceroBridge.sol b/contracts/ConceroBridge.sol index a8fdd1e4..758940fc 100644 --- a/contracts/ConceroBridge.sol +++ b/contracts/ConceroBridge.sol @@ -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( From 75ac05f1223e3ffd507ed1a53d63b57e74ed19ec Mon Sep 17 00:00:00 2001 From: lufaque <95128636+lufaque@users.noreply.github.com> Date: Thu, 5 Dec 2024 14:37:24 +0300 Subject: [PATCH 3/4] fix ParentPool.sol complete deposit --- contracts/ParentPool.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contracts/ParentPool.sol b/contracts/ParentPool.sol index 57579335..4a22fd28 100644 --- a/contracts/ParentPool.sol +++ b/contracts/ParentPool.sol @@ -47,6 +47,7 @@ error NotOwner(); error OnlyRouterCanFulfill(address); error Unauthorized(); error NotUsdcToken(); +error DepositDeadlinePassed(); contract ParentPool is IParentPool, CCIPReceiver, ParentPoolCommon, ParentPoolStorage { /* TYPE DECLARATIONS */ @@ -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(); } @@ -325,6 +329,7 @@ contract ParentPool is IParentPool, CCIPReceiver, ParentPoolCommon, ParentPoolSt emit DepositCompleted(_depositRequestId, msg.sender, usdcAmount, lpTokensToMint); delete s_depositRequests[_depositRequestId]; + delete s_clfRequestTypes[_depositRequestId]; } /* From 399c73f4de34e2f3820cf795ae99685ab0217a48 Mon Sep 17 00:00:00 2001 From: lufaque <95128636+lufaque@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:10:52 +0300 Subject: [PATCH 4/4] fix ParentPool.sol complete deposit --- contracts/ParentPool.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/contracts/ParentPool.sol b/contracts/ParentPool.sol index 4a22fd28..699e8625 100644 --- a/contracts/ParentPool.sol +++ b/contracts/ParentPool.sol @@ -329,7 +329,6 @@ contract ParentPool is IParentPool, CCIPReceiver, ParentPoolCommon, ParentPoolSt emit DepositCompleted(_depositRequestId, msg.sender, usdcAmount, lpTokensToMint); delete s_depositRequests[_depositRequestId]; - delete s_clfRequestTypes[_depositRequestId]; } /*