@@ -414,12 +414,7 @@ contract NameRegistry is
414414 * @param secret The secret value in the commitment
415415 * @param recovery The address which can recovery the fname if the custody address is lost
416416 */
417- function register (
418- bytes16 fname ,
419- address to ,
420- bytes32 secret ,
421- address recovery
422- ) external payable {
417+ function register (bytes16 fname , address to , bytes32 secret , address recovery ) external payable {
423418 bytes32 commit = generateCommit (fname, to, secret, recovery);
424419
425420 uint256 _fee = fee;
@@ -463,7 +458,7 @@ contract NameRegistry is
463458 if (overpayment > 0 ) {
464459 // Perf: Call msg.sender instead of _msgSender() to save ~100 gas b/c we don't need meta-tx
465460 // solhint-disable-next-line avoid-low-level-calls
466- (bool success , ) = msg .sender .call {value: overpayment}("" );
461+ (bool success ,) = msg .sender .call {value: overpayment}("" );
467462 if (! success) revert CallFailed ();
468463 }
469464 }
@@ -548,7 +543,7 @@ contract NameRegistry is
548543 if (overpayment > 0 ) {
549544 // Perf: Call msg.sender instead of _msgSender() to save ~100 gas b/c we don't need meta-tx
550545 // solhint-disable-next-line avoid-low-level-calls
551- (bool success , ) = msg .sender .call {value: overpayment}("" );
546+ (bool success ,) = msg .sender .call {value: overpayment}("" );
552547 if (! success) revert CallFailed ();
553548 }
554549 }
@@ -562,11 +557,7 @@ contract NameRegistry is
562557 * @param tokenId The uint256 representation of the fname to bid on
563558 * @param recovery The address which can recovery the fname if the custody address is lost
564559 */
565- function bid (
566- address to ,
567- uint256 tokenId ,
568- address recovery
569- ) external payable {
560+ function bid (address to , uint256 tokenId , address recovery ) external payable {
570561 // Check that the tokenID was previously registered
571562 uint256 expiryTs = expiryOf[tokenId];
572563 if (expiryTs == 0 ) revert Registrable ();
@@ -627,11 +618,9 @@ contract NameRegistry is
627618
628619 // Safety/Audit: the below cannot intuitively underflow or overflow given the ranges,
629620 // but needs proof
630- price =
631- BID_START_PRICE.mulWadDown (
632- uint256 (FixedPointMathLib.powWad (int256 (BID_PERIOD_DECREASE_UD60X18), periodsSD59x18))
633- ) +
634- fee;
621+ price = BID_START_PRICE.mulWadDown (
622+ uint256 (FixedPointMathLib.powWad (int256 (BID_PERIOD_DECREASE_UD60X18), periodsSD59x18))
623+ ) + fee;
635624 }
636625
637626 if (msg .value < price) revert InsufficientFunds ();
@@ -656,7 +645,7 @@ contract NameRegistry is
656645 if (overpayment > 0 ) {
657646 // Perf: Call msg.sender instead of _msgSender() to save ~100 gas b/c we don't need meta-tx
658647 // solhint-disable-next-line avoid-low-level-calls
659- (bool success , ) = msg .sender .call {value: overpayment}("" );
648+ (bool success ,) = msg .sender .call {value: overpayment}("" );
660649 if (! success) revert CallFailed ();
661650 }
662651 }
@@ -690,11 +679,7 @@ contract NameRegistry is
690679 * @param to The address to transfer the fname to
691680 * @param tokenId The uint256 representation of the fname to transfer
692681 */
693- function transferFrom (
694- address from ,
695- address to ,
696- uint256 tokenId
697- ) public override {
682+ function transferFrom (address from , address to , uint256 tokenId ) public override {
698683 uint256 expiryTs = expiryOf[tokenId];
699684
700685 // Expired names should not be transferrable by the previous owner
@@ -711,12 +696,7 @@ contract NameRegistry is
711696 * @param tokenId The uint256 representation of the fname to transfer
712697 * @param data Additional data with no specified format, sent in call to `to`
713698 */
714- function safeTransferFrom (
715- address from ,
716- address to ,
717- uint256 tokenId ,
718- bytes memory data
719- ) public override {
699+ function safeTransferFrom (address from , address to , uint256 tokenId , bytes memory data ) public override {
720700 uint256 expiryTs = expiryOf[tokenId];
721701
722702 // Expired names should not be transferrable by the previous owner
@@ -740,7 +720,7 @@ contract NameRegistry is
740720 _validateName (fname);
741721
742722 // Step back from the last byte to find the first non-zero byte
743- for (uint256 i = 15 ; ; ) {
723+ for (uint256 i = 15 ;; ) {
744724 if (uint8 (fname[i]) != 0 ) {
745725 lastCharIdx = i;
746726 break ;
@@ -758,7 +738,7 @@ contract NameRegistry is
758738 // Construct a new bytes[] with the valid fname characters.
759739 bytes memory fnameBytes = new bytes (lastCharIdx + 1 );
760740
761- for (uint256 j = 0 ; j <= lastCharIdx; ) {
741+ for (uint256 j = 0 ; j <= lastCharIdx;) {
762742 fnameBytes[j] = fname[j];
763743
764744 unchecked {
@@ -773,22 +753,14 @@ contract NameRegistry is
773753 /**
774754 * @dev Hook that ensures that token transfers cannot occur when the contract is paused.
775755 */
776- function _beforeTokenTransfer (
777- address from ,
778- address to ,
779- uint256 tokenId
780- ) internal override whenNotPaused {
756+ function _beforeTokenTransfer (address from , address to , uint256 tokenId ) internal override whenNotPaused {
781757 super ._beforeTokenTransfer (from, to, tokenId);
782758 }
783759
784760 /**
785761 * @dev Hook that ensures that recovery address is reset whenever a transfer occurs.
786762 */
787- function _afterTokenTransfer (
788- address from ,
789- address to ,
790- uint256 tokenId
791- ) internal override {
763+ function _afterTokenTransfer (address from , address to , uint256 tokenId ) internal override {
792764 super ._afterTokenTransfer (from, to, tokenId);
793765
794766 // Checking state before clearing is more gas-efficient than always clearing
@@ -1018,7 +990,7 @@ contract NameRegistry is
1018990 if (address (this ).balance < amount) revert InsufficientFunds ();
1019991
1020992 // solhint-disable-next-line avoid-low-level-calls
1021- (bool success , ) = vault.call {value: amount}("" );
993+ (bool success ,) = vault.call {value: amount}("" );
1022994 if (! success) revert CallFailed ();
1023995 }
1024996
@@ -1051,20 +1023,25 @@ contract NameRegistry is
10511023 function _msgSender ()
10521024 internal
10531025 view
1054- override (ContextUpgradeable, ERC2771ContextUpgradeable )
1026+ override (ContextUpgradeable, ERC2771ContextUpgradeable )
10551027 returns (address sender )
10561028 {
10571029 sender = ERC2771ContextUpgradeable ._msgSender ();
10581030 }
10591031
1060- function _msgData () internal view override (ContextUpgradeable, ERC2771ContextUpgradeable ) returns (bytes calldata ) {
1032+ function _msgData ()
1033+ internal
1034+ view
1035+ override (ContextUpgradeable, ERC2771ContextUpgradeable )
1036+ returns (bytes calldata )
1037+ {
10611038 return ERC2771ContextUpgradeable ._msgData ();
10621039 }
10631040
10641041 function supportsInterface (bytes4 interfaceId )
10651042 public
10661043 view
1067- override (AccessControlUpgradeable, ERC721Upgradeable )
1044+ override (AccessControlUpgradeable, ERC721Upgradeable )
10681045 returns (bool )
10691046 {
10701047 return ERC721Upgradeable .supportsInterface (interfaceId);
@@ -1097,7 +1074,7 @@ contract NameRegistry is
10971074 // If the name begins with a hyphen, reject it
10981075 if (uint8 (fname[0 ]) == 45 ) revert InvalidName ();
10991076
1100- for (uint256 i = 0 ; i < length; ) {
1077+ for (uint256 i = 0 ; i < length;) {
11011078 uint8 charInt = uint8 (fname[i]);
11021079
11031080 unchecked {
0 commit comments