We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
UFix64 works like this:
In [7]: cadence.UFix64(1).encode() Out[7]: {'type': 'UFix64', 'value': '0.00000001'}
This is binding library API to details of Flow (that UFix64 uses 8 decimals ) and is error-prone (thats why JSON-Cadence stores UFix64 as strings: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers).
If propose this API:
In [17]: UFix64(Decimal('123.4')).encode() Out[17]: {'type': 'UFix64', 'value': '123.4'}```
If that change is okay, I can make a PR.
The text was updated successfully, but these errors were encountered:
That is a good point. I did not notice.
A PR would be wonderful, thank you very much!
Sorry, something went wrong.
No branches or pull requests
UFix64 works like this:
This is binding library API to details of Flow (that UFix64 uses 8 decimals ) and is error-prone (thats why JSON-Cadence stores UFix64 as strings: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers).
If propose this API:
If that change is okay, I can make a PR.
The text was updated successfully, but these errors were encountered: