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: add strict/gatewayUrls param + getRecords tweaks #157

Merged
merged 11 commits into from
Jan 18, 2024
Merged

Conversation

TateB
Copy link
Collaborator

@TateB TateB commented Jan 4, 2024

changes:

  • added strict param to any function that interacts with resolver contracts
    • resolvers can return unexpected results. while for most use-cases if a result is malformed it makes sense to return null, if a developer explicitly wants the error data they can use this parameter.
    • by default, strict will be disabled
  • strict is false for all decodes in getRecords
  • added gatewayUrls param to any function that interacts with resolver contracts
    • used in UniversalResolver as the batch resolver for ccip-read requests
  • added basic tests for internal resolver getters
  • added stronger type picking for resolver getter parameters between encode/decode
  • added test for beam.eco name
  • added allowMismatch parameter to getName. default is false
  • added more comprehensive UniversalResolver error safety checking in checkSafeUniversalResolverData, which is used in getName, universalWrapper, and getRecords
  • added tests for universalWrapper
  • updated getRecords
    • removed records parameter, all record params are now at the top level of the object
    • updated types to be stricter
    • cleaned up code

in future i think adding a strict param to getRecords would be useful, but it requires support for an array of failures and isn't crucial right now

Fixes FET-1334

@TateB TateB changed the title feat: add strict param feat: add strict/gatewayUrls param + getRecords tweaks Jan 5, 2024
Copy link

sonarcloud bot commented Jan 18, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@TateB TateB merged commit ac29f8d into main Jan 18, 2024
3 checks passed
@LeonmanRolls LeonmanRolls deleted the feat/strict-param branch January 25, 2024 07:04
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