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

[audit2] #2 Typos and Documentation #72

Merged
merged 5 commits into from
Jul 22, 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
6 changes: 3 additions & 3 deletions src/L2/EARegistrarController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ contract EARegistrarController is Ownable {
/// @notice Emitted when the payment receiver is updated.
///
/// @param newPaymentReceiver The address of the new payment receiver.
event PayemntReceiverUpdated(address newPaymentReceiver);
event PaymentReceiverUpdated(address newPaymentReceiver);

/// @notice Emitted when the price oracle is updated.
///
Expand Down Expand Up @@ -323,13 +323,13 @@ contract EARegistrarController is Ownable {

/// @notice Allows the `owner` to set the reverse registrar contract.
///
/// @dev Emits `ReverseRegistrarUpdated` after setting the `paymentReceiver` address.
/// @dev Emits `PaymentReceiverUpdated` after setting the `paymentReceiver` address.
///
/// @param paymentReceiver_ The new payment receiver address.
function setPaymentReceiver(address paymentReceiver_) external onlyOwner {
if (paymentReceiver_ == address(0)) revert InvalidPaymentReceiver();
paymentReceiver = paymentReceiver_;
emit PayemntReceiverUpdated(paymentReceiver_);
emit PaymentReceiverUpdated(paymentReceiver_);
}

/// @notice Checks whether any of the provided addresses have registered with a discount.
Expand Down
4 changes: 2 additions & 2 deletions src/L2/L2Resolver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ contract L2Resolver is
/// @notice The reverse registrar contract.
address public reverseRegistrar;

/// @notice A mapping of operators per owner address. An operator is authroized to make changes to
/// @notice A mapping of operators per owner address. An operator is authorized to make changes to
/// all names owned by the `owner`.
mapping(address owner => mapping(address operator => bool isApproved)) private _operatorApprovals;

Expand Down Expand Up @@ -173,7 +173,7 @@ contract L2Resolver is
return _tokenApprovals[owner][node][delegate];
}

/// @notice Check to see whether `msg.sender` is authroized to modify records for the specified `node`.
/// @notice Check to see whether `msg.sender` is authorized to modify records for the specified `node`.
///
/// @dev Override for `ResolverBase:isAuthorised()`. Used in the context of each inherited resolver "profile".
/// Validates that `msg.sender` is one of:
Expand Down
6 changes: 3 additions & 3 deletions src/L2/RegistrarController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ contract RegistrarController is Ownable {
/// @notice Emitted when the payment receiver is updated.
///
/// @param newPaymentReceiver The address of the new payment receiver.
event PayemntReceiverUpdated(address newPaymentReceiver);
event PaymentReceiverUpdated(address newPaymentReceiver);

/// @notice Emitted when the price oracle is updated.
///
Expand Down Expand Up @@ -333,13 +333,13 @@ contract RegistrarController is Ownable {

/// @notice Allows the `owner` to set the reverse registrar contract.
///
/// @dev Emits `ReverseRegistrarUpdated` after setting the `paymentReceiver` address.
/// @dev Emits `PaymentReceiverUpdated` after setting the `paymentReceiver` address.
///
/// @param paymentReceiver_ The new payment receiver address.
function setPaymentReceiver(address paymentReceiver_) external onlyOwner {
if (paymentReceiver_ == address(0)) revert InvalidPaymentReceiver();
paymentReceiver = paymentReceiver_;
emit PayemntReceiverUpdated(paymentReceiver_);
emit PaymentReceiverUpdated(paymentReceiver_);
}

/// @notice Checks whether any of the provided addresses have registered with a discount.
Expand Down
4 changes: 2 additions & 2 deletions src/L2/ReverseRegistrar.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ contract ReverseRegistrar is Ownable {
/* ERRORS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

/// @notice Thrown when `sender` is not authrorized to modify records for `addr`.
/// @notice Thrown when `sender` is not authorized to modify records for `addr`.
///
/// @param addr The `addr` that was being modified.
/// @param sender The unauthorized sender.
Expand Down Expand Up @@ -201,7 +201,7 @@ contract ReverseRegistrar is Ownable {

/// @notice Sets the `name()` record for the reverse ENS records associated with the `addr` provided.
///
/// @dev Updates the resolver to a designated resolver. Only callable by `addr`'s `authroized` addresses.
/// @dev Updates the resolver to a designated resolver. Only callable by `addr`'s `authorized` addresses.
/// Establishes both a vestigial `addr.reverse` node and an ENSIP-19 compliant chain-specific `chain.reverse` node.
///
/// @param addr The reverse record to set.
Expand Down
2 changes: 1 addition & 1 deletion src/L2/interface/IPriceOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface IPriceOracle {
/**
* @dev Returns the price to register or renew a name.
* @param name The name being registered or renewed.
* @param expires When the name presently expires (0 if this is a new registration).
* @param expires When the name presently expires (`launchTime` if this is a new registration).
* @param duration How long the name is being registered or extended for, in seconds.
* @return price Price struct containing base price and premium price
*/
Expand Down
2 changes: 1 addition & 1 deletion test/EARegistrarController/SetPaymentReceiver.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ contract SetPaymentReceiver is EARegistrarControllerBase {
function test_allowsTheOwner_toSetThePaymentReceiver(address newReceiver) public {
vm.assume(newReceiver != address(0));
vm.expectEmit(address(controller));
emit EARegistrarController.PayemntReceiverUpdated(newReceiver);
emit EARegistrarController.PaymentReceiverUpdated(newReceiver);
vm.prank(owner);
controller.setPaymentReceiver(newReceiver);
assertEq(newReceiver, controller.paymentReceiver());
Expand Down
2 changes: 1 addition & 1 deletion test/RegistrarController/SetPaymentReceiver.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ contract SetPaymentReceiver is RegistrarControllerBase {
function test_allowsTheOwner_toSetThePaymentReceiver(address newReceiver) public {
vm.assume(newReceiver != address(0));
vm.expectEmit(address(controller));
emit RegistrarController.PayemntReceiverUpdated(newReceiver);
emit RegistrarController.PaymentReceiverUpdated(newReceiver);
vm.prank(owner);
controller.setPaymentReceiver(newReceiver);
assertEq(newReceiver, controller.paymentReceiver());
Expand Down