-
Notifications
You must be signed in to change notification settings - Fork 215
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
chore(ERTP): additional input validation and clean up #3892
Conversation
4021a0b
to
faed256
Compare
09e64a4
to
364afca
Compare
30ed68a
to
facb255
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review so far. Not done yet.
Leaving aside test files, I only have 6 files to go. My plan is to not review the test files, since the point of my review is to catch input validation issues that the tests may have missed. (None so far! Only stylistic suggestions so far.)
If there is anything in the test files you'd like to call my attention to, please do. Or anywhere else for that matter, in case I miss it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's here LGTM. What I still need to do though, before approving, is start again from the external API surface and see if all paths in are covered to my satisfaction.
1570ed3
to
d4401f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
BREAKING CHANGE: NatValues now only accept bigints, lower-case amountMath is removed, and AmountMath methods always follow the order of: brand, value
d4401f2
to
5949f61
Compare
This PR is the result of doing an evaluation of ERTP for missing input validation. I also did some
smalllarge clean up to ensure that the input validation was easy to audit. Namely, NatValues now only accept bigints, lower-caseamountMath
is removed, and AmountMath methods always follow the order of:brand
,value
. I removed thelooksLike
usage to make it clearer when something was actually trying to validate inputs rather than sniff to see what kind of validation to do.@agoric/same-structure
is deprecated, so I changed to using@agoric/marshal
reallocate
function tomoveAssets
for claritycheckForDupes
toassertNoDuplicates
to fit the standard of usingassert
for a function that throwsCloses: #3202
Closes: #3867
Closes: #3885
Closes: #3960
Closes: #3089
Closes: #3045
#documentation-branch: 3885-ertp-input-validation
#dapp-card-store-branch: 3885-ertp-input-validation
#dapp-oracle-branch: 3885-ertp-input-validation
#dapp-otc-branch: 3885-ertp-input-validation