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(hop): implement Hop staking and rewards tracking #7972

Merged
merged 1 commit into from
May 27, 2024

Conversation

moxw
Copy link
Contributor

@moxw moxw commented May 23, 2024

Closes #7202

sqldiff rotkehlchen/data/develop.db rotkehlchen/data/global.db

INSERT INTO contract_abi(id,value,name) VALUES(91,'[{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]','HOP_STAKING');

@moxw moxw added the ready for peer review Backend PR ready to be reviewed by colleagues label May 23, 2024
Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 77.47748% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 80.69%. Comparing base (7a6c1ba) to head (ac0b9ba).
Report is 5 commits behind head on develop.

Files Patch % Lines
rotkehlchen/chain/evm/decoding/hop/balances.py 71.23% 16 Missing and 5 partials ⚠️
rotkehlchen/chain/evm/decoding/hop/decoder.py 86.95% 1 Missing and 2 partials ⚠️
rotkehlchen/chain/optimism/types.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7972      +/-   ##
===========================================
+ Coverage    80.54%   80.69%   +0.14%     
===========================================
  Files         1198     1198              
  Lines       108675   108718      +43     
  Branches     13012    13020       +8     
===========================================
+ Hits         87537    87731     +194     
+ Misses       18875    18694     -181     
- Partials      2263     2293      +30     
Flag Coverage Δ
backend 80.90% <77.47%> (+0.29%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@moxw moxw force-pushed the decode-hop-staking branch 3 times, most recently from 350b4e4 to 21035ab Compare May 23, 2024 18:53
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.

This is the final step right? Docstring if it is

rotkehlchen/chain/arbitrum_one/modules/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/base/modules/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/decoder.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/decoder.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/decoder.py Outdated Show resolved Hide resolved
rotkehlchen/tests/unit/test_protocol_balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/optimism/modules/hop/balances.py Outdated Show resolved Hide resolved
@moxw moxw force-pushed the decode-hop-staking branch 4 times, most recently from 08c179c to e46fce0 Compare May 24, 2024 17:09
@yabirgb yabirgb added ready for final review Backend PR ready to be reviewed by great Lefteris and removed ready for peer review Backend PR ready to be reviewed by colleagues labels May 24, 2024
docs/changelog.rst Outdated Show resolved Hide resolved
rotkehlchen/chain/base/modules/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/tests/unit/decoders/test_hop.py Outdated Show resolved Hide resolved
rotkehlchen/tests/unit/decoders/test_hop.py Show resolved Hide resolved
@LefterisJP LefterisJP added PR review work work on PR review comments and removed ready for final review Backend PR ready to be reviewed by great Lefteris labels May 25, 2024
@moxw moxw force-pushed the decode-hop-staking branch 2 times, most recently from 1d976b2 to 6e031ac Compare May 27, 2024 07:50
@moxw moxw added ready for final review Backend PR ready to be reviewed by great Lefteris and removed PR review work work on PR review comments labels May 27, 2024
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
rotkehlchen/chain/evm/decoding/hop/balances.py Outdated Show resolved Hide resolved
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

@LefterisJP LefterisJP merged commit 254a1f1 into rotki:develop May 27, 2024
13 checks passed
@rotkibot
Copy link

rotki/test-caching/tree/decode-hop-staking was successfully merged

@moxw moxw deleted the decode-hop-staking branch May 27, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for final review Backend PR ready to be reviewed by great Lefteris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HOP bridge decoding support for all evm chains
4 participants