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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix lint
  • Loading branch information
Amxx committed May 12, 2022
commit 9cd95c44db1acccc8b881845cda59c56335b25b2
2 changes: 2 additions & 0 deletions scripts/generate/templates/SafeCast.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function toUint${length}(int${length} value) internal pure returns (uint${length
}
`;

/* eslint-disable max-len */
const toIntDownCast = length => `\
/**
* @dev Returns the downcasted int${length} from int256, reverting on
Expand All @@ -70,6 +71,7 @@ function toInt${length}(int256 value) internal pure returns (int${length}) {
return int${length}(value);
}
`;
/* eslint-enable max-len */

const toUintDownCast = length => `\
/**
Expand Down