Skip to content

Commit

Permalink
4337: Ignore UserOperations for v0.7.0 entrypoint
Browse files Browse the repository at this point in the history
- It changes a lot of logic and it's not fully supported in other networks but Sepolia
- We should wait to implement #2011
  • Loading branch information
Uxio0 committed May 8, 2024
1 parent c3569a8 commit 5a30fe6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ psycogreen==1.0.2
psycopg2==2.9.9
redis==5.0.4
requests==2.31.0
safe-eth-py[django]==6.0.0b27
safe-eth-py[django]==6.0.0b28
web3==6.17.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
BundlerClientException,
UserOperation,
UserOperationReceipt,
UserOperationV07,
)
from gnosis.eth.utils import fast_to_checksum_address
from gnosis.safe.account_abstraction import SafeOperation
Expand All @@ -36,6 +37,10 @@ class AaProcessorServiceException(Exception):
pass


class UserOperationNotSupportedException(Exception):
pass


class ExecutionFromSafeModuleNotDetected(AaProcessorServiceException):
pass

Expand Down Expand Up @@ -285,6 +290,10 @@ def index_user_operation(
raise BundlerClientException(
f"user-operation={user_operation_hash} returned `null`"
)
if isinstance(user_operation, UserOperationV07):
raise UserOperationNotSupportedException(
f"user-operation={user_operation_hash} for EntryPoint v0.7.0 is not supported"
)

try:
user_operation_model = UserOperationModel.objects.get(
Expand Down Expand Up @@ -355,6 +364,12 @@ def process_aa_transaction(
for log in aa_logs:
try:
self.index_user_operation(safe_address, log, ethereum_tx)
except UserOperationNotSupportedException as exc:
logger.error(
"[%s] Error processing user-operation: %s",
safe_address,
exc,
)
except BundlerClientException as exc:
logger.error(
"[%s] Error retrieving user-operation from bundler API: %s",
Expand Down

0 comments on commit 5a30fe6

Please sign in to comment.