-
Notifications
You must be signed in to change notification settings - Fork 240
feat(ertp): ertp-only part of minimal want-patterns #11235
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
base: master
Are you sure you want to change the base?
Conversation
Deploying agoric-sdk with
|
Latest commit: |
979da2a
|
Status: | ✅ Deploy successful! |
Preview URL: | https://0caa23d4.agoric-sdk.pages.dev |
Branch Preview URL: | https://markm-want-patterns-only-ert.agoric-sdk.pages.dev |
ae6b40c
to
2e4d932
Compare
2e4d932
to
979da2a
Compare
@@ -116,7 +116,7 @@ export const makeRatioFromAmounts = (numeratorAmount, denominatorAmount) => { | |||
* @returns {Amount<'nat'>} | |||
*/ | |||
const multiplyHelper = (amount, ratio, divideOp) => { | |||
AmountMath.coerce(amount.brand, amount); | |||
amount = AmountMath.coerce(amount.brand, amount); |
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.
A drive-by. coerce
only produces a valid output from valid or almost-valid input. It does not validate or modify the input. So either we should use the result of coerce
or we should remove it. Not sure yet whether this coerce
is actually needed.
@@ -0,0 +1,60 @@ | |||
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js'; | |||
import { M, makeCopySet } from '@endo/patterns'; | |||
|
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.
TODO do we also need a copyBagBoundMathHelpers.test.js
?
closes: #XXXX
refs: endojs/endo#2710 #1905 #1913 #1915 #2155 #2156 #2230 #4212 #4217 #10951 #10952
Description
Implements the ERTP part of minimal want patterns, where the only supported pattern is
M.containerHas
. #10952 then implements the zoe portion.Security Considerations
none
Scaling Considerations
at the ERTP level, none.
Documentation Considerations
Need to update ERTP docs to explain the use of
M.has
patterns inAmountMath.isGTE
andAmountMath.subtract
.Testing Considerations
ERTP tests already added.
Upgrade Considerations
None