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

feature(crosschain resolver): simplify reverse resolver #379

Open
wants to merge 17 commits into
base: feature/crosschain-resolver-with-reverse-registrar
Choose a base branch
from

Conversation

TateB
Copy link
Contributor

@TateB TateB commented Aug 6, 2024

changes:

  • SignatureReverseResolver
    • removed setText* functions
    • removed versionable records
      • no longer required without setText, since there is only one field set
    • removed clearRecords functions
      • no longer required without record versioning
    • optimisation: removed usage of authorisedSignature modifier and isAuthorisedWithSignature func, switched to inline
      • isAuthorisedWithSignature used in the authorisedSignature modifier required node for the address which was calculated within the function itself. node however was also used elsewhere in subsequent execution outside the modifier, and since modifiers can't return values it was unreachable. initially switched to just calling the isAuthorisedWithSignature function inline, but it's only used once now (from the removal of setText/clearRecords), so it's just inline.
    • optimisation: changed signature structure to remove the usage of the double-hashed function selector/name (i.e. bytes32 id replaced with bytes4, string)
      • not really sure why it was like this in the first place?
    • optimisation: inceptionDate now in seconds (to align with block timestamp) instead of milliseconds
      • previously afaik ms was a requirement because of multicalls and subsequent calls within the same block, but now that's no longer really useful
    • optimisation: name variable as calldata instead of memory
  • L2ReverseResolver
    • optimisation: removed use of ownerAndAuthorisedWithSignature modifier function, logic now inline
    • optimisation: name variable as calldata instead of memory
    • optimisation: inceptionDate now in seconds
  • ReverseRegistrar
    • removed relayer argument in setNameForAddrWithSignature and claimForAddrWithSignature
      • it was redundant since we check that the relayer is msg.sender anyway, and if msg.sender isn't the relayer variable the signed message won't be verified
    • optimisation: name variable as calldata instead of memory
  • added ts tests
  • added license to contracts
  • moved sha3HexAddress func from LowLevelCallUtils lib to standalone AddressUtils
    • there was no overlap in usage of that function and the rest of the library, and the function alone isn't really a low level call utility func

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.

2 participants