From 279fdda94ded228c319cf1832a022f4fd8571a63 Mon Sep 17 00:00:00 2001 From: Bartek Tofel Date: Wed, 14 Aug 2024 11:44:35 +0200 Subject: [PATCH] try with another contract --- contracts/src/v0.8/ccip/AggregateRateLimiter.sol | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/contracts/src/v0.8/ccip/AggregateRateLimiter.sol b/contracts/src/v0.8/ccip/AggregateRateLimiter.sol index 7401df2ed49..b1b1dc9f805 100644 --- a/contracts/src/v0.8/ccip/AggregateRateLimiter.sol +++ b/contracts/src/v0.8/ccip/AggregateRateLimiter.sol @@ -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();