Skip to content

Conversation

yabirgb
Copy link
Member

@yabirgb yabirgb commented Nov 29, 2022

Closes #(issue_number)

Checklist

  • The PR modified the frontend, and updated the user guide to reflect the changes.

@nebolax nebolax force-pushed the balancer-subgraph-removal branch from a0657c4 to eef4867 Compare December 14, 2022 18:27
@nebolax nebolax temporarily deployed to test December 14, 2022 18:28 — with GitHub Actions Inactive
@nebolax nebolax marked this pull request as ready for review December 14, 2022 18:30
Copy link
Member Author

@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.

Thanks for rebasing it @nebolax ! It was really helpful. Just minor details and I noticed that is missing the accounting file. Can you also add it?

# otherwise this is the event that we have to edit
event.event_type = HistoryEventType.STAKING
event.event_subtype = HistoryEventSubType.RECEIVE_WRAPPED
event.counterparty = CPT_BALANCER_V2
Copy link
Member Author

Choose a reason for hiding this comment

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

In this method the counterparty is wrong, it should be balancer v1

@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Merging #5197 (ba42a4e) into develop (176b6d8) will decrease coverage by 0.01%.
The diff coverage is 84.09%.

@@             Coverage Diff             @@
##           develop    #5197      +/-   ##
===========================================
- Coverage    71.73%   71.72%   -0.02%     
===========================================
  Files          945      946       +1     
  Lines        71185    71255      +70     
  Branches      9009     9123     +114     
===========================================
+ Hits         51068    51107      +39     
- Misses       18559    18590      +31     
  Partials      1558     1558              
Flag Coverage Δ
frontend_integration 60.46% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
rotkehlchen/chain/aggregator.py 73.67% <ø> (ø)
...tkehlchen/chain/ethereum/modules/convex/decoder.py 77.10% <ø> (ø)
...otkehlchen/chain/ethereum/modules/curve/decoder.py 85.83% <ø> (ø)
...kehlchen/chain/ethereum/modules/gitcoin/decoder.py 80.55% <ø> (ø)
...n/chain/ethereum/modules/pickle_finance/decoder.py 78.57% <ø> (ø)
...hlchen/chain/ethereum/modules/sushiswap/decoder.py 84.00% <ø> (ø)
...lchen/chain/ethereum/modules/uniswap/v1/decoder.py 48.43% <ø> (ø)
...lchen/chain/ethereum/modules/uniswap/v2/decoder.py 84.61% <ø> (ø)
...lchen/chain/ethereum/modules/uniswap/v3/decoder.py 83.09% <ø> (ø)
rotkehlchen/chain/ethereum/decoding/decoder.py 72.60% <50.00%> (ø)
... and 53 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@nebolax nebolax force-pushed the balancer-subgraph-removal branch from eef4867 to c59c745 Compare December 15, 2022 12:27
@nebolax nebolax temporarily deployed to test December 15, 2022 12:27 — with GitHub Actions Inactive
Copy link
Member

@LefterisJP LefterisJP left a comment

Choose a reason for hiding this comment

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

Left some comments

@yabirgb yabirgb force-pushed the balancer-subgraph-removal branch from c2e1811 to 1748219 Compare December 16, 2022 19:46
@yabirgb yabirgb temporarily deployed to test December 16, 2022 19:47 — with GitHub Actions Inactive
Copy link
Member

@LefterisJP LefterisJP left a comment

Choose a reason for hiding this comment

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

Left more comments

extra_data={
'ds_address': ds_address,
'token_address': token_address,
'amount': amount,
Copy link
Member

Choose a reason for hiding this comment

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

why keep the amount here? The ActionItem has an amount field.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have moved it. Due to this change I had to add a new type in the action items

Copy link
Member

Choose a reason for hiding this comment

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

moved what? This is still here.

to_notes=None,
extra_data={
'ds_address': ds_address,
'token_address': token_address,
Copy link
Member

Choose a reason for hiding this comment

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

Why not keep it at the asset of the ActionItem? Do you specifically need an address or an asset?

Copy link
Member

Choose a reason for hiding this comment

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

you have not answered 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.

I have changed this function to return a dictionary instead. I was using actions before because of how I was working with the events but saw that it could be done easier just calling the logic in the _decode_v1_pool_event function. It doesn't need and it shouldn't be an action

@yabirgb yabirgb force-pushed the balancer-subgraph-removal branch from 1748219 to 605462b Compare December 20, 2022 16:05
Copy link
Member

@LefterisJP LefterisJP left a comment

Choose a reason for hiding this comment

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

comments

to_notes=None,
extra_data={
'ds_address': ds_address,
'token_address': token_address,
Copy link
Member

Choose a reason for hiding this comment

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

you have not answered this

extra_data={
'ds_address': ds_address,
'token_address': token_address,
'amount': amount,
Copy link
Member

Choose a reason for hiding this comment

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

moved what? This is still here.

event.event_type = HistoryEventType.TRADE
if asset == event.asset:
event.event_subtype = HistoryEventSubType.RECEIVE
event.notes = f'Receive {event.balance.amount} {asset.symbol} in Balancer v2 from {event.location_label}' # noqa: E501
Copy link
Member

Choose a reason for hiding this comment

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

This has remained unchanged and my question has not been answered. Please try to appreciate the time I am putting in the reviews and read them

#5197 (comment)

Comment on lines 212 to 203
self,
token: 'EvmToken',
tx_log: EvmTxReceiptLog, # pylint: disable=unused-argument
transaction: EvmTransaction, # pylint: disable=unused-argument
event: HistoryBaseEntry,
action_items: list[ActionItem], # pylint: disable=unused-argument
all_logs: list[EvmTxReceiptLog],
) -> bool:
Copy link
Member

Choose a reason for hiding this comment

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

This entire function declaration needs indentation

@yabirgb yabirgb force-pushed the balancer-subgraph-removal branch from 251b141 to ba42a4e Compare December 21, 2022 20:03
@yabirgb yabirgb temporarily deployed to test December 21, 2022 20:03 — with GitHub Actions Inactive
Copy link
Member

@LefterisJP LefterisJP left a comment

Choose a reason for hiding this comment

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

LGTM.

  1. The failed test is avalanche
  2. The single comment can be done whenever.

When you do the comment also please add a changelog entry for proper decoding of balancer transactions.

self.weth = A_WETH.resolve_to_evm_token()

def _decode_v1_pool_event(self, all_logs: list[EvmTxReceiptLog]) -> Optional[list[dict[str, Any]]]: # noqa: E501
"""Read the list of logs in search for a Balancer v1 event and return the information
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: sorry did not see that in the last run

Suggested change
"""Read the list of logs in search for a Balancer v1 event and return the information
"""Read the list of logs in search of a Balancer v1 event and return the information

@LefterisJP LefterisJP merged commit 466cb1d into rotki:develop Dec 21, 2022
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.

3 participants