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

comment on down-cast, add validations #74

Merged
merged 3 commits into from
Mar 25, 2024
Merged

Conversation

dglowinski
Copy link
Collaborator

No description provided.

@@ -44,11 +44,14 @@ contract ESynth is ERC20Collateral, Ownable {
address sender = _msgSender();
MinterData storage minterCache = minters[sender];

if (minterCache.capacity < uint256(minterCache.minted) + amount) {
if (
amount > type(uint256).max - minterCache.minted
Copy link
Contributor

Choose a reason for hiding this comment

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

not amount > type(uint128).max - minterCache.minted as we agreed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh, I thought you meant to make the argument in the function to be 128. Cool pushing a fix

Copy link
Contributor

Choose a reason for hiding this comment

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

the arg type cannot change. it wouldn't be compatible with the CCIP anymore if it did

@dglowinski dglowinski merged commit 9220c3f into master Mar 25, 2024
4 checks passed
@dglowinski dglowinski deleted the validation-review branch March 25, 2024 12:15
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