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

Make ec_recover funcs return Results #1171

Merged
merged 14 commits into from
Apr 8, 2022
Merged

Conversation

nfurfaro
Copy link
Contributor

@nfurfaro nfurfaro commented Apr 6, 2022

Pretty straightforward.

This PR:

  • adds a new error type EcRecoverError
  • updates the return types in both ecr functions
  • updates the testing to handle the returned results
  • reactors ec_recover_address() to remove all asm

Notes:

  • As the SDK can't currently handle returned Results, the e2e harness is still the best place to test these functions.

sway-lib-std/src/ecr.sw Outdated Show resolved Hide resolved
@nfurfaro nfurfaro marked this pull request as draft April 6, 2022 18:21
@adlerjohn adlerjohn added the lib: std Standard library label Apr 6, 2022
@nfurfaro nfurfaro marked this pull request as ready for review April 6, 2022 20:18
@nfurfaro nfurfaro requested review from otrho and adlerjohn April 6, 2022 20:19
Copy link
Contributor

@otrho otrho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny change, otherwise I'm pleased to see another ASM block bite the dust. :)

sway-lib-std/src/ecr.sw Outdated Show resolved Hide resolved
sway-lib-std/src/ecr.sw Outdated Show resolved Hide resolved
sway-lib-std/src/ecr.sw Outdated Show resolved Hide resolved
@nfurfaro nfurfaro requested a review from adlerjohn April 8, 2022 02:51
Copy link
Contributor

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK. So much cleaner!

@nfurfaro nfurfaro merged commit d2d79c2 into master Apr 8, 2022
@nfurfaro nfurfaro deleted the furnic/better-ecr-return-types branch April 8, 2022 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality lib: std Standard library
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants