-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index 4337 UserOperations #1884
Conversation
Uxio0
commented
Feb 21, 2024
•
edited
Loading
edited
- Closes 4337 - Index User Operations #1858
- Closes 4337 - Index Safe Operations #1859
- Closes 4337 - Add new endpoints to return indexed SafeOperations #1860
- Closes 4337 - Post endpoint to gather signatures for SafeOperations #1861
dc48bcc
to
a10d49f
Compare
5681f84
to
031a28f
Compare
868b15a
to
97497f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work :) 🚀
requirements.txt
Outdated
@@ -33,5 +33,5 @@ psycogreen==1.0.2 | |||
psycopg2==2.9.9 | |||
redis==5.0.3 | |||
requests==2.31.0 | |||
safe-eth-py[django]==6.0.0b22 | |||
safe-eth-py[django] @ git+https://github.com/safe-global/safe-eth-py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are waiting new safe-eth-py version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will update it before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exceptions is empty.
log | ||
for log in logs | ||
if ( | ||
len(log["topics"]) == 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you create a CONSTANT to add more information about what means this 4?
number_detected_user_operations = len(aa_logs) | ||
if not self.bundler_client: | ||
logger.debug( | ||
"Detected 4337 User Operation but bundler client was not configured" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that 4337 transaction won't be indexed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right
|
||
|
||
class TestModels(TestCase): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not including too much tests, I would agree if you create an issue to do it later in other PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, included more tests
|
||
|
||
# FIXME Refactor datetime_to_str | ||
def datetime_to_str(value: datetime.datetime) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe refactor in utils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
""" | ||
Create a new signed message for a Safe. Message can be: | ||
- A ``string``, so ``EIP191`` will be used to get the hash. | ||
- An ``EIP712`` ``object``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a copy paste documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
13e4bbd
to
97a9b27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 👌
config/settings/base.py
Outdated
@@ -400,6 +401,9 @@ | |||
"safe_transaction_service.history.services.balance_service": { | |||
"level": "DEBUG" if DEBUG else "WARNING", | |||
}, | |||
"safe_transaction_service.history.indexers.tx_processor": { | |||
"level": "DEBUG", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always debug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, I was using it to debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
- Closes #1858
Co-authored-by: Moisés <7888669+moisses89@users.noreply.github.com>
5066b98
to
7cffc0b
Compare
Co-authored-by: Moisés <7888669+moisses89@users.noreply.github.com>