Skip to content
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

feat: standardize event data for mint and burn none-interest #305

Closed

Conversation

Tzienom
Copy link
Contributor

@Tzienom Tzienom commented Nov 24, 2024

No description provided.

@djeck1432 djeck1432 self-requested a review November 24, 2024 11:12
"""
sender: str
recipient: str
raw_amount: str
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raw_amount Should be Decimal

face_amount (str): The face amount being burned
"""
user: str
face_amount: str
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add spacing between class variable and method

face_amount (str): The face amount being burned
"""
user: str
face_amount: str
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Face_amount should be decimal

else:
raise ValueError("Event = {} has an unexpected structure.".format(event))
if self.ZERO_ADDRESS in {sender, recipient}:
if self.ZERO_ADDRESS in {sender, recipient} | self.ZERO_ADDRESS in {parsed_event.sender, parsed_event.recipient}:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why diid you change this code?

@@ -398,6 +399,26 @@ def process_non_interest_bearing_collateral_mint_event(self, event: pd.Series) -
)
)

if parsed_event.sender != self.DEFERRED_BATCH_CALL_ADAPTER_ADDRESS:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have duplicated code, please remove it

@djeck1432
Copy link
Collaborator

@Tzienom I'm not sure that you can manage with this task, so easy task and so many issues

@Tzienom
Copy link
Contributor Author

Tzienom commented Nov 24, 2024

i will fix it before end of day

Copy link
Collaborator

@djeck1432 djeck1432 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, last attempt, please, do not override main logic, you just need to substitute parsing event["data"] with your parser and use these fields

@@ -372,6 +372,7 @@ def process_non_interest_bearing_collateral_mint_event(self, event: pd.Series) -
sender = add_leading_zeros(event["data"][0])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you didn't remove these fields?

@@ -500,26 +502,40 @@ def process_non_interest_bearing_collateral_burn_event(self, event: pd.Series) -
# Example:
# https://starkscan.co/event/0x00744177ee88dd3d96dda1784e2dff50f0c989b7fd48755bc42972af2e951dd6_1.
user = event["data"][0]
if user == self.IGNORE_USER:
parsed_event = NostraDataParser.parse_non_interest_bearing_collateral_burn_event(event["data"])
if user == self.IGNORE_USER | parsed_event == self.IGNORE_USER:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you change this code?
and why parsed event return only user data here if it should return more values?

)
for token in NOSTRA_ALPHA_SPECIFIC_TOKEN_SETTINGS
}
if user == self.verbose_user | parsed_event.user == self.verbose_user:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you change it

@djeck1432
Copy link
Collaborator

@Tzienom Please fix your comments within next hours, otherwise you will be unassigned, this task blocking us to go further

@Tzienom
Copy link
Contributor Author

Tzienom commented Nov 25, 2024

completing shortly

Copy link
Collaborator

@djeck1432 djeck1432 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, sync with master

@Tzienom
Copy link
Contributor Author

Tzienom commented Nov 25, 2024

@djeck1432 my branch is currently uptodate with master already

@Tzienom Tzienom closed this by deleting the head repository Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants