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

Procedural SafeCast.sol generation #3245

Merged
merged 23 commits into from
May 21, 2022
Merged

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Mar 7, 2022

Fixes #3159

PR Checklist

  • Tests
  • Documentation
  • Changelog entry

scripts/generate/templates/toIntDownCast.js Outdated Show resolved Hide resolved
scripts/generate/run.js Outdated Show resolved Hide resolved
scripts/generate/run.js Show resolved Hide resolved
scripts/generate/run.js Outdated Show resolved Hide resolved
@frangio frangio added this to the 4.7 milestone May 12, 2022
@frangio frangio self-requested a review May 16, 2022 15:19
@frangio
Copy link
Contributor

frangio commented May 16, 2022

Is this ready for review?

@frangio frangio marked this pull request as ready for review May 16, 2022 15:59
@frangio
Copy link
Contributor

frangio commented May 16, 2022

Pending:

  • Add a CI script to verify that the file committed to the repo is up to date with the generated file

scripts/generate/format-lines.js Show resolved Hide resolved
scripts/generate/templates/SafeCast.js Outdated Show resolved Hide resolved
scripts/generate/templates/SafeCast.js Outdated Show resolved Hide resolved
scripts/generate/run.js Outdated Show resolved Hide resolved
scripts/generate/templates/SafeCast.js Show resolved Hide resolved
scripts/generate/templates/SafeCast.js Outdated Show resolved Hide resolved
test/utils/math/SafeCast.test.js Outdated Show resolved Hide resolved
frangio
frangio previously approved these changes May 19, 2022
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

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

Looks good!

@Amxx Amxx enabled auto-merge (squash) May 20, 2022 13:23
@Amxx Amxx disabled auto-merge May 20, 2022 13:27
frangio
frangio previously approved these changes May 20, 2022
@Amxx Amxx merged commit b61faf8 into OpenZeppelin:master May 21, 2022
@Amxx Amxx deleted the codegen/safecast branch May 21, 2022 12:38
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.

Add SafeCast for all possible uintX types
2 participants