From 6bf53372c1e5cf0a069da85fbde154305e071386 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 25 May 2022 22:25:07 +0800 Subject: [PATCH] bugfix-avoid "OverflowError: integer division result too large for a float" fix overflow error in ethtx/decoders/abi/calls.py L194 --- ethtx/decoders/abi/calls.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ethtx/decoders/abi/calls.py b/ethtx/decoders/abi/calls.py index 9c50e623..8d3bb6d2 100644 --- a/ethtx/decoders/abi/calls.py +++ b/ethtx/decoders/abi/calls.py @@ -21,6 +21,7 @@ from .abc import ABISubmoduleAbc from .helpers.utils import decode_function_abi_with_external_source from ..decoders.parameters import decode_function_parameters, decode_graffiti_parameters +from decimal import Decimal log = logging.getLogger(__name__) @@ -191,7 +192,7 @@ def decode_call( call_type=call.call_type, from_address=AddressInfo(address=call.from_address, name=from_name), to_address=AddressInfo(address=call.to_address, name=to_name), - value=call.call_value / 10**18, + value=Decimal(call.call_value) / 10**18, function_signature=function_signature, function_name=function_name, arguments=function_input,