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

Only allow bigint NatValues #3960

Closed
katelynsills opened this issue Oct 13, 2021 · 0 comments · Fixed by #3892
Closed

Only allow bigint NatValues #3960

katelynsills opened this issue Oct 13, 2021 · 0 comments · Fixed by #3892
Assignees
Labels
ERTP package: ERTP

Comments

@katelynsills
Copy link
Contributor

What is the Problem Being Solved?

We currently allow number NatValues for backwards compatibility, but we should only allow bigint NatValues. Currently, any number NatValue is coerced to bigint, and AmountMath does not throw.

Description of the Design

AmountMath.coerce should throw when it encounters a number NatValue.

Security Considerations

It is easier to reason about fewer inputs.

Test Plan

Current agoric-sdk tests.
Potentially a test for the case in which a number throws.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ERTP package: ERTP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant