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

Add the EVM tokens for 1.33.0 that are in zksync lite bridge #133

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

LefterisJP
Copy link
Member

Added in the global DB itself here: rotki/rotki#3985

"assets_re": re.compile(r'.*INSERT +INTO +assets\( *identifier *, *type *, *name *, *symbol *, *started *, *swapped_for *, *coingecko *, *cryptocompare *, *details_reference *\) +VALUES\((.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?)\).*?'),
"ethereum_tokens_re": re.compile(r'.*INSERT +INTO +ethereum_tokens\( *address *, *decimals *, *protocol *\) +VALUES\((.*?),(.*?),(.*?)\).*'),
"common_asset_details_re": re.compile(r'.*INSERT +INTO +common_asset_details\( *asset_id *, *forked *\) +VALUES\((.*?),(.*?)\).*')
"assets_re": re.compile(r'.*INSERT +INTO +assets\( *identifier *, *type *, *name *, *symbol *, *started *, *swapped_for *, *coingecko *, *cryptocompare *, *details_reference *\) *VALUES\((.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?)\).*?'),
Copy link
Member Author

Choose a reason for hiding this comment

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

All these *\) *VA are since ) and VALUES can be without a space.

Copy link
Member

Choose a reason for hiding this comment

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

Does this match what we have in the main repo? Regarding the spaces and if the query is the same

"assets_re": re.compile(r'.*INSERT +INTO +assets\( *identifier *, *name *, *type *\) *VALUES\(([^,]*?),([^,]*?),([^,]*?)\).*?'),
Copy link
Member Author

Choose a reason for hiding this comment

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

Group is everything but comma now since before it was failing for strings that had parentheses in them. Like what this PR adds for a name of a token: 'Diversified Staked ETH Index (dsETH)'

Copy link
Member

Choose a reason for hiding this comment

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

Have you tested if the parser in the repo handles this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Which parser? There is a CI test that failed in this repo. This is why I adjusted this.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Added it here: rotki/rotki#7549

LefterisJP added a commit to LefterisJP/rotkehlchen that referenced this pull request Feb 27, 2024
To be able to work with the changes here:
rotki/assets#133

Essentially to:

1. Handle "(" inside a string
2. Handle no space between ) and VALUES

Signed-off-by: Lefteris Karapetsas <[email protected]>
@LefterisJP
Copy link
Member Author

I also added tests for the collections and the collection mappings regexes in this repo

Copy link
Member

@yabirgb yabirgb left a comment

Choose a reason for hiding this comment

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

lgtm

@LefterisJP LefterisJP merged commit e1e103f into rotki:develop Feb 27, 2024
2 checks passed
@LefterisJP LefterisJP deleted the 1_33_zksync_lite_bridge_assets branch February 27, 2024 11:27
LefterisJP added a commit to rotki/rotki that referenced this pull request Feb 27, 2024
To be able to work with the changes here:
rotki/assets#133

Essentially to:

1. Handle "(" inside a string
2. Handle no space between ) and VALUES

Signed-off-by: Lefteris Karapetsas <[email protected]>
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