From c801f784219d718b2381d531345ecc50474cca81 Mon Sep 17 00:00:00 2001 From: Huy Ngo Date: Tue, 18 Jul 2023 15:14:56 +0700 Subject: [PATCH 1/2] Update the master copies version for pointing to prod --- .../history/management/commands/setup_service.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/safe_transaction_service/history/management/commands/setup_service.py b/safe_transaction_service/history/management/commands/setup_service.py index c966ab448..2ed6656f8 100644 --- a/safe_transaction_service/history/management/commands/setup_service.py +++ b/safe_transaction_service/history/management/commands/setup_service.py @@ -14,13 +14,14 @@ # Overwrite Keys for Master Copies and Proxy Factories for Ronin Testnet and Mainnet. +# Tuple should be address, block number, and version. MASTER_COPIES[EthereumNetwork.PUBLICMINT_MAINNET] = [ - ("0x3E5c63644E683549055b9Be8653de26E0B4CD36E", 7938928, "1.3.0"), + ("0x3E5c63644E683549055b9Be8653de26E0B4CD36E", 7938928, "1.3.0+L2"), ("0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552", 7938928, "1.3.0"), ] MASTER_COPIES[EthereumNetwork.EDGEWARE_MAINNET] = [ - ("0x3E5c63644E683549055b9Be8653de26E0B4CD36E", 807_225, "1.3.0"), + ("0x3E5c63644E683549055b9Be8653de26E0B4CD36E", 807_225, "1.3.0+L2"), ("0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552", 807_225, "1.3.0"), ] From bba5c67b603f222654421858fba79f583fd84935 Mon Sep 17 00:00:00 2001 From: Huy Ngo Date: Tue, 18 Jul 2023 17:21:44 +0700 Subject: [PATCH 2/2] Remove filter erc20 for celo indexing --- .../history/indexers/erc20_events_indexer.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/safe_transaction_service/history/indexers/erc20_events_indexer.py b/safe_transaction_service/history/indexers/erc20_events_indexer.py index be6606b98..e046ff35e 100644 --- a/safe_transaction_service/history/indexers/erc20_events_indexer.py +++ b/safe_transaction_service/history/indexers/erc20_events_indexer.py @@ -102,24 +102,14 @@ def _do_node_query( ) if parameter_addresses: - return [ - transfer_event - for transfer_event in transfer_events - if transfer_event["blockHash"] - != transfer_event["transactionHash"] # CELO ERC20 indexing - ] + return transfer_events # Every ERC20/721 event is returned, we need to filter ourselves addresses_set = set(addresses) return [ transfer_event for transfer_event in transfer_events - if transfer_event["blockHash"] - != transfer_event["transactionHash"] # CELO ERC20 indexing - and ( - transfer_event["args"]["to"] in addresses_set - or transfer_event["args"]["from"] in addresses_set - ) + if transfer_event["args"]["to"] in addresses_set or transfer_event["args"]["from"] in addresses_set ] def _process_decoded_element(self, decoded_element: EventData) -> None: