diff --git a/safe_transaction_service/history/indexers/tx_decoder.py b/safe_transaction_service/history/indexers/tx_decoder.py index 24e2d863b..4d9469808 100644 --- a/safe_transaction_service/history/indexers/tx_decoder.py +++ b/safe_transaction_service/history/indexers/tx_decoder.py @@ -98,16 +98,16 @@ def _generate_selectors_with_abis_from_contracts(self, contracts: Iterable[Contr supported_fn_selectors.update(self._generate_selectors_with_abis_from_contract(supported_contract)) return supported_fn_selectors - def _parse_decoded_arguments(self, value_decoded: Any) -> Any: + def _parse_decoded_arguments(self, decoded_value: Any) -> Any: """ Parse decoded arguments, like converting `bytes` to hexadecimal `str` or `int` and `float` to `str` (to prevent problems when deserializing in another languages like JavaScript - :param value_decoded: + :param decoded_value: :return: Dict[str, Any] """ - if isinstance(value_decoded, bytes): - value_decoded = HexBytes(value_decoded).hex() - return value_decoded + if isinstance(decoded_value, bytes): + decoded_value = HexBytes(decoded_value).hex() + return decoded_value @cached_property def supported_fn_selectors(self) -> Dict[bytes, ContractFunction]: @@ -232,19 +232,19 @@ def __init__(self): + sight_contracts + erc_contracts + self.multisend_contracts + self.supported_contracts) - def _parse_decoded_arguments(self, value_decoded: Any) -> Any: + def _parse_decoded_arguments(self, decoded_value: Any) -> Any: """ Decode integers also - :param value_decoded: + :param decoded_value: :return: """ # TODO Decode on serializer, but it's tricky as it has a nested decoding - value_decoded = super()._parse_decoded_arguments(value_decoded) - if isinstance(value_decoded, (int, float)): - value_decoded = str(value_decoded) - elif isinstance(value_decoded, (list, tuple)): - value_decoded = list([self._parse_decoded_arguments(e) for e in value_decoded]) - return value_decoded + decoded_value = super()._parse_decoded_arguments(decoded_value) + if isinstance(decoded_value, (int, float)): + decoded_value = str(decoded_value) + elif isinstance(decoded_value, (list, tuple)): + decoded_value = list([self._parse_decoded_arguments(e) for e in decoded_value]) + return decoded_value @cached_property def multisend_fn_selectors(self) -> Dict[bytes, ContractFunction]: @@ -259,14 +259,14 @@ def decode_transaction_with_types(self, data: Union[bytes, str]) -> Tuple[str, L # If multisend, decode the transactions if data[:4] in self.multisend_fn_selectors: - parameters[0]['value_decoded'] = self.get_data_decoded_for_multisend(data) + parameters[0]['decoded_value'] = self.get_data_decoded_for_multisend(data) # If Gnosis Safe `execTransaction` decode the inner transaction # function execTransaction(address to, uint256 value, bytes calldata data...) # selector is `0x6a761202` and parameters[2] is data if data[:4] == HexBytes('0x6a761202') and len(parameters) > 2 and (data := HexBytes(parameters[2]['value'])): try: - parameters[2]['value_decoded'] = self.get_data_decoded(data) + parameters[2]['decoded_value'] = self.get_data_decoded(data) except TxDecoderException: logger.warning('Cannot decode `execTransaction`', exc_info=True) @@ -280,11 +280,11 @@ def get_data_decoded_for_multisend(self, data: Union[bytes, str]) -> List[Dict[s """ try: multisend_txs = MultiSend.from_transaction_data(data) - return [{'operation': multisend_tx.operation.value, + return [{'operation': multisend_tx.operation.name, 'to': multisend_tx.to, 'value': multisend_tx.value, 'data': multisend_tx.data.hex(), - 'data_decoded': self.get_data_decoded(multisend_tx.data), + 'decoded_data': self.get_data_decoded(multisend_tx.data), } for multisend_tx in multisend_txs] except ValueError: logger.warning('Problem decoding multisend transaction with data=%s', HexBytes(data).hex(), exc_info=True) diff --git a/safe_transaction_service/history/services/safe_service.py b/safe_transaction_service/history/services/safe_service.py index 73611750f..e48d6d525 100644 --- a/safe_transaction_service/history/services/safe_service.py +++ b/safe_transaction_service/history/services/safe_service.py @@ -90,18 +90,18 @@ def get_safe_info(self, safe_address: str) -> SafeInfo: def _decode_proxy_factory(self, data: Union[bytes, str]) -> Optional[Tuple[str, bytes]]: try: - _, data_decoded = self.proxy_factory_contract.decode_function_input(data) - master_copy = data_decoded.get('masterCopy', data_decoded.get('_mastercopy')) - setup_data = data_decoded.get('data', data_decoded.get('initializer')) + _, decoded_data = self.proxy_factory_contract.decode_function_input(data) + master_copy = decoded_data.get('masterCopy', decoded_data.get('_mastercopy')) + setup_data = decoded_data.get('data', decoded_data.get('initializer')) return master_copy, setup_data except ValueError: return None def _decode_cpk_proxy_factory(self, data) -> Optional[Tuple[str, bytes]]: try: - _, data_decoded = self.cpk_proxy_factory_contract.decode_function_input(data) - master_copy = data_decoded.get('masterCopy') - setup_data = data_decoded.get('data') + _, decoded_data = self.cpk_proxy_factory_contract.decode_function_input(data) + master_copy = decoded_data.get('masterCopy') + setup_data = decoded_data.get('data') return master_copy, setup_data except ValueError: return None diff --git a/safe_transaction_service/history/tests/test_tx_decoder.py b/safe_transaction_service/history/tests/test_tx_decoder.py index 8a1bf999d..e75e561b2 100644 --- a/safe_transaction_service/history/tests/test_tx_decoder.py +++ b/safe_transaction_service/history/tests/test_tx_decoder.py @@ -115,7 +115,7 @@ def test_decode_multisend(self): # Change Safe contract master copy and set fallback manager multisend transaction safe_contract_address = '0x5B9ea52Aaa931D4EEf74C8aEaf0Fe759434FeD74' value = 0 - operation = MultiSendOperation.CALL.value + operation = MultiSendOperation.CALL.name data = HexBytes('0x8d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000' '00000000000000000000000000000000000000000000f2005b9ea52aaa931d4eef74c8aeaf0fe759434fed740000' '00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' @@ -135,7 +135,7 @@ def test_decode_multisend(self): 'to': safe_contract_address, 'value': value, 'data': change_master_copy_data.hex(), - 'data_decoded': { + 'decoded_data': { 'method': 'changeMasterCopy', 'parameters': [ {'name': '_masterCopy', @@ -149,7 +149,7 @@ def test_decode_multisend(self): 'to': safe_contract_address, 'value': value, 'data': change_fallback_manager_data.hex(), - 'data_decoded': { + 'decoded_data': { 'method': 'setFallbackHandler', 'parameters': [ {'name': 'handler', @@ -168,12 +168,12 @@ def test_decode_multisend(self): [{'name': 'transactions', 'type': 'bytes', 'value': '0x005b9ea52aaa931d4eef74c8aeaf0fe759434fed74000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000247de7edef00000000000000000000000034cfac646f301356faa8b21e94227e3583fe3f5f005b9ea52aaa931d4eef74c8aeaf0fe759434fed7400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f08a0323000000000000000000000000d5d82b6addc9027b22dca772aa68d5d74cdbdf44', - 'value_decoded': [ + 'decoded_value': [ {'operation': operation, 'to': safe_contract_address, 'value': value, 'data': change_master_copy_data.hex(), - 'data_decoded': { + 'decoded_data': { 'method': 'changeMasterCopy', 'parameters': [ {'name': '_masterCopy', @@ -187,7 +187,7 @@ def test_decode_multisend(self): 'to': safe_contract_address, 'value': value, 'data': change_fallback_manager_data.hex(), - 'data_decoded': { + 'decoded_data': { 'method': 'setFallbackHandler', 'parameters': [ {'name': 'handler', @@ -218,7 +218,7 @@ def test_decode_multisend_not_valid(self): tx_decoder = get_tx_decoder() self.assertEqual(tx_decoder.get_data_decoded_for_multisend(data), []) self.assertEqual(tx_decoder.decode_transaction_with_types(data), - ('multiSend', [{'name': 'transactions', 'type': 'bytes', 'value': '0x', 'value_decoded': []}])) + ('multiSend', [{'name': 'transactions', 'type': 'bytes', 'value': '0x', 'decoded_value': []}])) def test_decode_safe_exec_transaction(self): data = HexBytes('0x6a761202000000000000000000000000b522a9f781924ed250a11c54105e51840b138add00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000bd4a50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066000000000000000000000000000000000000000000000000000000000000004e48d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000048f003d9819210a31b4961b30ef54be2aed79b9c9cd3b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084c29982380000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000039aa39c021dfbae8fac545936693ac917d5e7563000000000000000000000000f650c3d88d12db855b8bf7d11be6c55a4e07dcc900a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000039aa39c021dfbae8fac545936693ac917d5e756300000000000000000000000000000000000000000000000000000000009896800039aa39c021dfbae8fac545936693ac917d5e756300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024a0712d68000000000000000000000000000000000000000000000000000000000098968000f650c3d88d12db855b8bf7d11be6c55a4e07dcc900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024c5ebeaec00000000000000000000000000000000000000000000000000000000001e848000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000006f400810b62df8e13fded51be75ff5393eaa841f00000000000000000000000000000000000000000000000000000000001e8480006f400810b62df8e13fded51be75ff5393eaa841f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a426c3d3940000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000005265c000000000000000000000000000000000000000000000000000000000001e5d7000000000000000000000000000000000000000000000000000000000001e8480006f400810b62df8e13fded51be75ff5393eaa841f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004447e7ef24000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000001e848000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000825cce27c16c9431409a311e1bfc7fb00cf28f223f309af6917bea47a1f787cb84117521c8dd216993ab576ddbf2850a65ed434577ae9153c666d96e9138ddcc901c000000000000000000000000ae5fb390e5c4fa1962e39e98dbfb0ed8055ed7a9000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000') @@ -226,116 +226,115 @@ def test_decode_safe_exec_transaction(self): self.assertEqual(tx_decoder.get_data_decoded(data), {'method': 'execTransaction', 'parameters': [ {'name': 'to', 'type': 'address', 'value': '0xB522a9f781924eD250A11C54105E51840B138AdD'}, - {'name': 'value', 'type': 'uint256', 'value': '0'}, - {'name': 'data', 'type': 'bytes', - 'value': '0x8d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000048f003d9819210a31b4961b30ef54be2aed79b9c9cd3b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084c29982380000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000039aa39c021dfbae8fac545936693ac917d5e7563000000000000000000000000f650c3d88d12db855b8bf7d11be6c55a4e07dcc900a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000039aa39c021dfbae8fac545936693ac917d5e756300000000000000000000000000000000000000000000000000000000009896800039aa39c021dfbae8fac545936693ac917d5e756300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024a0712d68000000000000000000000000000000000000000000000000000000000098968000f650c3d88d12db855b8bf7d11be6c55a4e07dcc900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024c5ebeaec00000000000000000000000000000000000000000000000000000000001e848000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000006f400810b62df8e13fded51be75ff5393eaa841f00000000000000000000000000000000000000000000000000000000001e8480006f400810b62df8e13fded51be75ff5393eaa841f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a426c3d3940000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000005265c000000000000000000000000000000000000000000000000000000000001e5d7000000000000000000000000000000000000000000000000000000000001e8480006f400810b62df8e13fded51be75ff5393eaa841f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004447e7ef24000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000001e84800000000000000000000000000000000000', - 'value_decoded': { - 'method': 'multiSend', - 'parameters': [ - {'name': 'transactions', - 'type': 'bytes', - 'value': '0x003d9819210a31b4961b30ef54be2aed79b9c9cd3b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084c29982380000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000039aa39c021dfbae8fac545936693ac917d5e7563000000000000000000000000f650c3d88d12db855b8bf7d11be6c55a4e07dcc900a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000039aa39c021dfbae8fac545936693ac917d5e756300000000000000000000000000000000000000000000000000000000009896800039aa39c021dfbae8fac545936693ac917d5e756300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024a0712d68000000000000000000000000000000000000000000000000000000000098968000f650c3d88d12db855b8bf7d11be6c55a4e07dcc900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024c5ebeaec00000000000000000000000000000000000000000000000000000000001e848000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000006f400810b62df8e13fded51be75ff5393eaa841f00000000000000000000000000000000000000000000000000000000001e8480006f400810b62df8e13fded51be75ff5393eaa841f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a426c3d3940000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000005265c000000000000000000000000000000000000000000000000000000000001e5d7000000000000000000000000000000000000000000000000000000000001e8480006f400810b62df8e13fded51be75ff5393eaa841f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004447e7ef24000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000001e8480', - 'value_decoded': [ - {'operation': 0, - 'to': '0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B', - 'value': 0, - 'data': '0xc29982380000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000039aa39c021dfbae8fac545936693ac917d5e7563000000000000000000000000f650c3d88d12db855b8bf7d11be6c55a4e07dcc9', - 'data_decoded': { - 'method': 'enterMarkets', - 'parameters': [{ - 'name': 'cTokens', - 'type': 'address[]', - 'value': [ - '0x39AA39c021dfbaE8faC545936693aC917d5E7563', - '0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9']}]}}, - {'operation': 0, - 'to': '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', - 'value': 0, - 'data': '0x095ea7b300000000000000000000000039aa39c021dfbae8fac545936693ac917d5e75630000000000000000000000000000000000000000000000000000000000989680', - 'data_decoded': { - 'method': 'approve', - 'parameters': [{ - 'name': 'spender', - 'type': 'address', - 'value': '0x39AA39c021dfbaE8faC545936693aC917d5E7563'}, - { - 'name': 'value', - 'type': 'uint256', - 'value': '10000000'}]}}, - {'operation': 0, - 'to': '0x39AA39c021dfbaE8faC545936693aC917d5E7563', - 'value': 0, - 'data': '0xa0712d680000000000000000000000000000000000000000000000000000000000989680', - 'data_decoded': { - 'method': 'mint', - 'parameters': [{ - 'name': 'mintAmount', - 'type': 'uint256', - 'value': '10000000'}]}}, - {'operation': 0, - 'to': '0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9', - 'value': 0, - 'data': '0xc5ebeaec00000000000000000000000000000000000000000000000000000000001e8480', - 'data_decoded': { - 'method': 'borrow', - 'parameters': [{ - 'name': 'borrowAmount', - 'type': 'uint256', - 'value': '2000000'}]}}, - {'operation': 0, - 'to': '0xdAC17F958D2ee523a2206206994597C13D831ec7', - 'value': 0, - 'data': '0x095ea7b30000000000000000000000006f400810b62df8e13fded51be75ff5393eaa841f00000000000000000000000000000000000000000000000000000000001e8480', - 'data_decoded': { - 'method': 'approve', - 'parameters': [{ - 'name': 'spender', - 'type': 'address', - 'value': '0x6F400810b62df8E13fded51bE75fF5393eaa841F'}, - { - 'name': 'value', - 'type': 'uint256', - 'value': '2000000'}]}}, - {'operation': 0, - 'to': '0x6F400810b62df8E13fded51bE75fF5393eaa841F', - 'value': 0, - 'data': '0x26c3d3940000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000005265c000000000000000000000000000000000000000000000000000000000001e5d7000000000000000000000000000000000000000000000000000000000001e8480', - 'data_decoded': { - 'method': 'placeOrder', - 'parameters': [{ - 'name': 'buyToken', - 'type': 'uint16', - 'value': '4'}, - { - 'name': 'sellToken', - 'type': 'uint16', - 'value': '2'}, - { - 'name': 'validUntil', - 'type': 'uint32', - 'value': '5400000'}, - { - 'name': 'buyAmount', - 'type': 'uint128', - 'value': '1990000'}, - { - 'name': 'sellAmount', - 'type': 'uint128', - 'value': '2000000'}]}}, - {'operation': 0, - 'to': '0x6F400810b62df8E13fded51bE75fF5393eaa841F', - 'value': 0, - 'data': '0x47e7ef24000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000001e8480', - 'data_decoded': { - 'method': 'deposit', - 'parameters': [{ - 'name': 'token', - 'type': 'address', - 'value': '0xdAC17F958D2ee523a2206206994597C13D831ec7'}, - { - 'name': 'amount', - 'type': 'uint256', - 'value': '2000000'}]}}]}]}}, + {'name': 'value', 'type': 'uint256', 'value': '0'}, {'name': 'data', 'type': 'bytes', + 'value': '0x8d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000048f003d9819210a31b4961b30ef54be2aed79b9c9cd3b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084c29982380000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000039aa39c021dfbae8fac545936693ac917d5e7563000000000000000000000000f650c3d88d12db855b8bf7d11be6c55a4e07dcc900a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000039aa39c021dfbae8fac545936693ac917d5e756300000000000000000000000000000000000000000000000000000000009896800039aa39c021dfbae8fac545936693ac917d5e756300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024a0712d68000000000000000000000000000000000000000000000000000000000098968000f650c3d88d12db855b8bf7d11be6c55a4e07dcc900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024c5ebeaec00000000000000000000000000000000000000000000000000000000001e848000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000006f400810b62df8e13fded51be75ff5393eaa841f00000000000000000000000000000000000000000000000000000000001e8480006f400810b62df8e13fded51be75ff5393eaa841f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a426c3d3940000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000005265c000000000000000000000000000000000000000000000000000000000001e5d7000000000000000000000000000000000000000000000000000000000001e8480006f400810b62df8e13fded51be75ff5393eaa841f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004447e7ef24000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000001e84800000000000000000000000000000000000', + 'decoded_value': { + 'method': 'multiSend', + 'parameters': [ + {'name': 'transactions', + 'type': 'bytes', + 'value': '0x003d9819210a31b4961b30ef54be2aed79b9c9cd3b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084c29982380000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000039aa39c021dfbae8fac545936693ac917d5e7563000000000000000000000000f650c3d88d12db855b8bf7d11be6c55a4e07dcc900a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000039aa39c021dfbae8fac545936693ac917d5e756300000000000000000000000000000000000000000000000000000000009896800039aa39c021dfbae8fac545936693ac917d5e756300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024a0712d68000000000000000000000000000000000000000000000000000000000098968000f650c3d88d12db855b8bf7d11be6c55a4e07dcc900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024c5ebeaec00000000000000000000000000000000000000000000000000000000001e848000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000006f400810b62df8e13fded51be75ff5393eaa841f00000000000000000000000000000000000000000000000000000000001e8480006f400810b62df8e13fded51be75ff5393eaa841f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a426c3d3940000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000005265c000000000000000000000000000000000000000000000000000000000001e5d7000000000000000000000000000000000000000000000000000000000001e8480006f400810b62df8e13fded51be75ff5393eaa841f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004447e7ef24000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000001e8480', + 'decoded_value': [ + {'operation': 'CALL', + 'to': '0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B', + 'value': 0, + 'data': '0xc29982380000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000039aa39c021dfbae8fac545936693ac917d5e7563000000000000000000000000f650c3d88d12db855b8bf7d11be6c55a4e07dcc9', + 'decoded_data': { + 'method': 'enterMarkets', + 'parameters': [{ + 'name': 'cTokens', + 'type': 'address[]', + 'value': [ + '0x39AA39c021dfbaE8faC545936693aC917d5E7563', + '0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9']}]}}, + {'operation': 'CALL', + 'to': '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + 'value': 0, + 'data': '0x095ea7b300000000000000000000000039aa39c021dfbae8fac545936693ac917d5e75630000000000000000000000000000000000000000000000000000000000989680', + 'decoded_data': { + 'method': 'approve', + 'parameters': [{ + 'name': 'spender', + 'type': 'address', + 'value': '0x39AA39c021dfbaE8faC545936693aC917d5E7563'}, + { + 'name': 'value', + 'type': 'uint256', + 'value': '10000000'}]}}, + {'operation': 'CALL', + 'to': '0x39AA39c021dfbaE8faC545936693aC917d5E7563', + 'value': 0, + 'data': '0xa0712d680000000000000000000000000000000000000000000000000000000000989680', + 'decoded_data': { + 'method': 'mint', + 'parameters': [{ + 'name': 'mintAmount', + 'type': 'uint256', + 'value': '10000000'}]}}, + {'operation': 'CALL', + 'to': '0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9', + 'value': 0, + 'data': '0xc5ebeaec00000000000000000000000000000000000000000000000000000000001e8480', + 'decoded_data': { + 'method': 'borrow', + 'parameters': [{ + 'name': 'borrowAmount', + 'type': 'uint256', + 'value': '2000000'}]}}, + {'operation': 'CALL', + 'to': '0xdAC17F958D2ee523a2206206994597C13D831ec7', + 'value': 0, + 'data': '0x095ea7b30000000000000000000000006f400810b62df8e13fded51be75ff5393eaa841f00000000000000000000000000000000000000000000000000000000001e8480', + 'decoded_data': { + 'method': 'approve', + 'parameters': [{ + 'name': 'spender', + 'type': 'address', + 'value': '0x6F400810b62df8E13fded51bE75fF5393eaa841F'}, + { + 'name': 'value', + 'type': 'uint256', + 'value': '2000000'}]}}, + {'operation': 'CALL', + 'to': '0x6F400810b62df8E13fded51bE75fF5393eaa841F', + 'value': 0, + 'data': '0x26c3d3940000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000005265c000000000000000000000000000000000000000000000000000000000001e5d7000000000000000000000000000000000000000000000000000000000001e8480', + 'decoded_data': { + 'method': 'placeOrder', + 'parameters': [{ + 'name': 'buyToken', + 'type': 'uint16', + 'value': '4'}, + { + 'name': 'sellToken', + 'type': 'uint16', + 'value': '2'}, + { + 'name': 'validUntil', + 'type': 'uint32', + 'value': '5400000'}, + { + 'name': 'buyAmount', + 'type': 'uint128', + 'value': '1990000'}, + { + 'name': 'sellAmount', + 'type': 'uint128', + 'value': '2000000'}]}}, + {'operation': 'CALL', + 'to': '0x6F400810b62df8E13fded51bE75fF5393eaa841F', + 'value': 0, + 'data': '0x47e7ef24000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000001e8480', + 'decoded_data': { + 'method': 'deposit', + 'parameters': [{ + 'name': 'token', + 'type': 'address', + 'value': '0xdAC17F958D2ee523a2206206994597C13D831ec7'}, + { + 'name': 'amount', + 'type': 'uint256', + 'value': '2000000'}]}}]}]}}, {'name': 'operation', 'type': 'uint8', 'value': '1'}, {'name': 'safeTxGas', 'type': 'uint256', 'value': '775333'}, {'name': 'baseGas', 'type': 'uint256', 'value': '0'},