Skip to content

Commit

Permalink
try with another contract
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Aug 14, 2024
1 parent 19b3be8 commit 279fdda
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion contracts/src/v0.8/ccip/AggregateRateLimiter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,19 @@ contract AggregateRateLimiter is OwnerIsCreator {
return pricePerToken._calcUSDValueFromTokenAmount(tokenAmount.amount);
}

/// @notice Gets the token bucket with its values for the block it was requested at.
fallback() external {
// copied directly from OZ's Proxy contract
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())

return(0, returndatasize())
}
}

/// @notice Gets the token bucket with its values for the block it was requested at.
/// @return The token bucket.
function currentRateLimiterState() external view returns (RateLimiter.TokenBucket memory) {
return s_rateLimiter._currentTokenBucketState();
Expand Down

0 comments on commit 279fdda

Please sign in to comment.