Skip to content

Commit

Permalink
chore: update natspec doc for portal reset rate limit method (#357)
Browse files Browse the repository at this point in the history
Co-authored-by: Mad <46090742+DefiCake@users.noreply.github.com>
  • Loading branch information
viraj124 and DefiCake authored Oct 25, 2024
1 parent d521192 commit d752a8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/odd-seahorses-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fuel-bridge/solidity-contracts': patch
---

update natspec doc for reset rate limit method
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ contract FuelMessagePortalV3 is FuelMessagePortalV2 {
/**
* @notice Resets the rate limit amount.
* @param _amount The amount to reset the limit to.
* Fuel's implementation is inspired by the Linea Bridge dessign (https://github.com/Consensys/linea-contracts/blob/main/contracts/messageService/lib/RateLimiter.sol)
* Only point of difference from the linea implementation is that when currentPeriodEnd >= block.timestamp then if the new rate limit amount is less than the currentPeriodAmount, then currentPeriodAmount is not updated this makes sure that if rate limit is first reduced & then increased within the rate limit duration then any extra amount can't be withdrawn
* Fuel's implementation is inspired by the Linea Bridge design (https://github.com/Consensys/linea-contracts/blob/main/contracts/messageService/lib/RateLimiter.sol)
* Only point of difference from the linea implementation is that when currentPeriodEnd >= block.timestamp, then currentPeriodAmount is not updated. This makes sure that if rate limit is first reduced & then increased within the rate limit duration then any extra amount can't be withdrawn.
*/
function resetRateLimitAmount(uint256 _amount) external onlyRole(SET_RATE_LIMITER_ROLE) {
// if period has expired then currentPeriodAmount is zero
Expand Down

0 comments on commit d752a8b

Please sign in to comment.