From e7e411ba0edaa342ad2dbc6618ed96ad6e78c309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Sun, 18 Sep 2022 12:50:52 -0300 Subject: [PATCH] Fix detector output Floats were being used by mistake, so the output ended up being in scientific notation. --- slither/core/expressions/literal.py | 2 +- slither/utils/arithmetic.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/slither/core/expressions/literal.py b/slither/core/expressions/literal.py index 26081c72c..289cb8958 100644 --- a/slither/core/expressions/literal.py +++ b/slither/core/expressions/literal.py @@ -1,7 +1,7 @@ from typing import Optional, Union, TYPE_CHECKING from slither.core.expressions.expression import Expression -from slither.core.solidity_types.elementary_type import Byte, Fixed, Int, Ufixed, Uint +from slither.core.solidity_types.elementary_type import Fixed, Int, Ufixed, Uint from slither.utils.arithmetic import convert_subdenomination from slither.utils.integer_conversion import convert_string_to_int diff --git a/slither/utils/arithmetic.py b/slither/utils/arithmetic.py index d14958541..cc88a5898 100644 --- a/slither/utils/arithmetic.py +++ b/slither/utils/arithmetic.py @@ -12,13 +12,13 @@ def convert_subdenomination( if sub == "wei": return decimal_value if sub == "gwei": - return decimal_value * 1e9 + return decimal_value * int(1e9) if sub == "szabo": - return decimal_value * 1e12 + return decimal_value * int(1e12) if sub == "finney": - return decimal_value * 1e15 + return decimal_value * int(1e15) if sub == "ether": - return decimal_value * 1e18 + return decimal_value * int(1e18) if sub == "seconds": return decimal_value if sub == "minutes":