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(contracts): OZ-N07 Naming Issue #910

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions contracts/src/rate-limiter/ETHRateLimiter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contract ETHRateLimiter is Ownable, IETHRateLimiter {
* Structs *
***********/

struct TokenAmount {
struct ETHAmount {
// The timestamp when the amount is updated.
uint48 lastUpdateTs;
// The ETH limit in wei.
Expand All @@ -39,8 +39,8 @@ contract ETHRateLimiter is Ownable, IETHRateLimiter {
* Variables *
*************/

/// @notice The token amount used in current period.
TokenAmount public currentPeriod;
/// @notice The ETH amount used in current period.
ETHAmount public currentPeriod;

/***************
* Constructor *
Expand Down Expand Up @@ -80,7 +80,7 @@ contract ETHRateLimiter is Ownable, IETHRateLimiter {

// check total limit
uint256 _currentTotalAmount;
TokenAmount memory _currentPeriod = currentPeriod;
ETHAmount memory _currentPeriod = currentPeriod;

if (_currentPeriod.lastUpdateTs < _currentPeriodStart) {
_currentTotalAmount = _amount;
Expand All @@ -101,7 +101,7 @@ contract ETHRateLimiter is Ownable, IETHRateLimiter {
* Restricted Functions *
************************/

/// @notice Update the total token amount limit.
/// @notice Update the total ETH amount limit.
/// @param _newTotalLimit The new total limit.
function updateTotalLimit(uint104 _newTotalLimit) external onlyOwner {
if (_newTotalLimit == 0) {
Expand Down