EthTx / ethtx

Python package with core transaction decoding functions.
https://www.ethtx.info
Apache License 2.0
454 stars 73 forks source link

Fix loss of precision decimal numbers #179

Closed dudzicz closed 1 year ago

dudzicz commented 1 year ago

Fixed the issue of loss of precision in the decimal representation of large floats. Converted float to Decimals and changed the precision of the context to 256 i.e. getcontext().prec = 256. Eventually returns the string representation of the Decimal object.

This fixes the issue of scientific notation representation of floats both in Argument value field and also other fields in models from decoded_model.py

kchojn commented 1 year ago

review done at the meeting

kchojn commented 1 year ago

LGTM!