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

feat: universal resolver safe calls + success var return #292

Merged
merged 5 commits into from Dec 7, 2023

Conversation

TateB
Copy link
Contributor

@TateB TateB commented Nov 30, 2023

changes:

  • made UniversalResolver significantly more stable in it's return values
  • BatchGateway's errors are now documented within solidity. HTTP errors now use HttpError(tuple(uint16 status, string message)[]) to differentiate them from regular solidity errors.
  • single data resolve (resolve(bytes,bytes)/etc) calls will now revert if the call was unsuccessful, rather than just returning the error data.
    • errors from the name's resolver are propagated by being wrapped with ResolverError(bytes). this makes it easier to identify when an error is coming from the UniversalResolver itself, or an external resolver.
    • batchgateway HTTP errors are propagated directly via HttpError(tuple(uint16 status, string message)[])
  • batch data results from resolve are now tuple(bool success, bytes returnData), rather than just bytes
  • added ResolverNotContract error for if a name's resolver is not a contract
  • external resolver calls are now all checked for safety via ERC165's supportsInterface
    • this is to avoid situations where in older versions of solidity, reverts would use all the remaining gas for a call
    • this was already implemented for extended resolver capability, but now applies to all calls (excl. callbacks)
    • unsafe calls will still be attempted with a maximum of 50k gas

@ensdomains ensdomains deleted a comment from Mrt3383x38 Dec 6, 2023
@ensdomains ensdomains deleted a comment from Mrt3383x38 Dec 6, 2023
@TateB TateB merged commit 242c27e into staging Dec 7, 2023
2 checks passed
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.

None yet

2 participants