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

[audit] #2: Typos, comments, unused imports #49

Merged
merged 7 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion script/deploy/DeployRegistrarController.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {NameEncoder} from "ens-contracts/utils/NameEncoder.sol";

import "src/util/Constants.sol";

contract DeployL2Resolver is Script {
contract DeployRegistrarController is Script {
function run() external {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
address deployerAddress = vm.addr(deployerPrivateKey);
Expand Down
2 changes: 1 addition & 1 deletion script/deploy/DeployTestnetDiscountValidator.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.23;
import "forge-std/Script.sol";
import {TestnetDiscountValidator} from "test/mocks/TestnetDiscountValidator.sol";

contract DeployRegistry is Script {
contract DeployTestnetDiscountValidator is Script {
function run() external {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);
Expand Down
2 changes: 1 addition & 1 deletion src/L2/BaseRegistrar.sol
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ contract BaseRegistrar is ERC721, Ownable {

/// @notice Returns whether the given spender can transfer a given token ID.abi
///
/// @dev v2.1.3 version of _isApprovedOrOwner which calls ownerOf(tokenId) and takes grace period into consideration instead of ERC721.ownerOf(tokenId);
/// @dev v2.1.3 version of _isApprovedOrOwner which calls ownerOf(tokenId) instead of ERC721.ownerOf(tokenId);
/// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.1.3/contracts/token/ERC721/ERC721.sol#L187
///
/// @param spender address of the spender to query
Expand Down
9 changes: 4 additions & 5 deletions src/L2/ExponentialPremiumPriceOracle.sol
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// SPDX-License-Identifier: MIT
pragma solidity ~0.8.17;

import "./StablePriceOracle.sol";
import {GRACE_PERIOD} from "src/util/Constants.sol";
import {FixedPointMathLib} from "solady/utils/FixedPointMathLib.sol";

import {EDAPrice} from "src/lib/EDAPrice.sol";
import "solady/utils/FixedPointMathLib.sol";
import {Test, console} from "forge-std/Test.sol";
import {GRACE_PERIOD} from "src/util/Constants.sol";
import {StablePriceOracle} from "src/L2/StablePriceOracle.sol";

contract ExponentialPremiumPriceOracle is StablePriceOracle {
uint256 public immutable startPremium;
uint256 public immutable endValue;
uint256 constant PRECISION = 1e18;

constructor(uint256[] memory rentPrices, uint256 startPremium_, uint256 totalDays) StablePriceOracle(rentPrices) {
startPremium = startPremium_;
Expand Down
1 change: 0 additions & 1 deletion src/lib/EDAPrice.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import {Test, console} from "forge-std/Test.sol";
import "solady/utils/FixedPointMathLib.sol";

library EDAPrice {
Expand Down
4 changes: 2 additions & 2 deletions src/util/Constants.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

// @param ETH_NODE The node hash of ".eth"
// @param ETH_NODE The node hash of "eth"
bytes32 constant ETH_NODE = 0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae;
// @param BASE_ETH_NODE The node hash of "base.eth"
bytes32 constant BASE_ETH_NODE = 0xff1e3c0eb00ec714e34b6114125fbde1dea2f24a72fbf672e7b7fd5690328e10;
// @param REVERSE_NODE The node hash of ".reverse"
// @param REVERSE_NODE The node hash of "reverse"
bytes32 constant REVERSE_NODE = 0xa097f6721ce401e757d1223a763fef49b8b5f90bb18567ddb86fd205dff71d34;
// @param ADDR_REVERSE_NODE The node hash of "addr.reverse"
bytes32 constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;
Expand Down