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

[REG-1430] RegistrarCustody contract #368

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nickshatilo
Copy link
Member

@nickshatilo nickshatilo commented Oct 2, 2024

PR Checklist

1. Contracts versioning

  • Make sure that the patch version of the contracts is increased if changes have been made to the UNSRegistry, MintingManager, ProxyReader, ENSCustody contracts.
  • Make sure that the minor version of the contracts is increased if breaking changes have been made to the UNSRegistry, MintingManager, ProxyReader, ENSCustody contracts. It includes changes of interfaces.

2. Contracts licensing

  • Make sure that no SPDX-License-Identifier defined in contracts.
  • Make sure that the header is added to the new contract files.
    // @author Unstoppable Domains, Inc.
    // @date {Month} {Day}(ordinal), {Year}
    

3. Coverage

  • Make sure that the coverage of contracts has not decreased and strive 100%

4. Configs versioning

  • Make sure that the version of uns-config.json is increased if changes have been made to the config.
  • Make sure that the version of ens-config.json is increased if changes have been made to the config.
  • Make sure that the version of resolver-keys.json is increased if changes have been made to the config.
  • Make sure that the version of ens-resolver-keys.json is increased if changes have been made to the config.

5. Package versioning

  • Make sure that the patch version of package is increased if valuable changes have been made to the package. It includes contracts update, configs update, etc.
  • Make sure that the major.minor version of package is synced with version of UNSRegistry contract.
  • Make sure that the CHANGELOG is updated with short description for the new version.

6. Code review

  • resolver-keys.json code review is required from DevTools team
  • ens-resolver-keys.json code review is required from DevTools team
  • For all other changes code review is required from Registry team

@nickshatilo nickshatilo force-pushed the nickshatilo/REG-1430/registrar-custody-contract branch from 0c9418e to ac62b75 Compare October 2, 2024 18:22
@nickshatilo nickshatilo requested a review from a team October 2, 2024 18:23
@nickshatilo nickshatilo self-assigned this Oct 2, 2024
@nickshatilo nickshatilo force-pushed the nickshatilo/REG-1430/registrar-custody-contract branch from ac62b75 to 457aece Compare October 2, 2024 18:24
_disableInitializers();
}

function initialize(address _unsRegistry, address _mintingManager) public initializer {

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning

_disableInitializers();
}

function initialize(address _unsRegistry, address _mintingManager) public initializer {

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning

contracts/RegistrarCustody.sol Fixed Show fixed Hide fixed
Comment on lines +116 to +97
function _msgData() internal view override(ContextUpgradeable, ERC2771RegistryContext) returns (bytes calldata) {
return ERC2771RegistryContext._msgData();
}

Check warning

Code scanning / Slither

Dead-code Warning

RegistrarCustody._msgData() is never used and should be removed
contracts/RegistrarCustody.sol Dismissed Show dismissed Hide dismissed
contracts/RegistrarCustody.sol Dismissed Show dismissed Hide dismissed
@nickshatilo nickshatilo force-pushed the nickshatilo/REG-1430/registrar-custody-contract branch from 457aece to 821990b Compare October 2, 2024 18:37
@nickshatilo nickshatilo marked this pull request as ready for review October 2, 2024 18:40
@nickshatilo nickshatilo force-pushed the nickshatilo/REG-1430/registrar-custody-contract branch from 821990b to 6b6a567 Compare October 4, 2024 13:23
Copy link

github-actions bot commented Oct 4, 2024

Contracts size report

Contract name Size (KiB) Delta (KiB)
ENSCustody 13.063 0
MintingManager 18.92 0
ProxyReader 15.176 0
RegistrarCustody 9.573 0
UNSRegistry 20.725 0

Comment on lines +73 to +79
function safeTransfer(address to, uint256 tokenId) external onlyMinter nonReentrant {
_protectTokenOperation(tokenId);

unsRegistry.setOwner(to, tokenId);

delete virtualOwners[tokenId];
}

Check notice

Code scanning / Slither

Reentrancy vulnerabilities Low

Reentrancy in RegistrarCustody.safeTransfer(address,uint256):
External calls:
- unsRegistry.setOwner(to,tokenId)
State variables written after the call(s):
- delete virtualOwners[tokenId]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant