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

Use blockscout to find valid payouts #5690

Merged
merged 8 commits into from
Feb 27, 2020
Merged

Use blockscout to find valid payouts #5690

merged 8 commits into from
Feb 27, 2020

Conversation

danlipert
Copy link
Contributor

Description

This PR adds a utility function to check to see if a payout tx has been made for ETC using blockscout. It also adds a payout_tx_id to the bounty model to track previous payouts.

Refers/Fixes

#5561

Testing

untested

@codecov
Copy link

codecov bot commented Dec 27, 2019

Codecov Report

Merging #5690 into master will decrease coverage by 6.28%.
The diff coverage is 21.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5690      +/-   ##
==========================================
- Coverage   30.09%   23.81%   -6.29%     
==========================================
  Files         249      275      +26     
  Lines       21448    29680    +8232     
  Branches     3110     5199    +2089     
==========================================
+ Hits         6454     7067     +613     
- Misses      14718    22396    +7678     
+ Partials      276      217      -59
Impacted Files Coverage Δ
.../dashboard/management/commands/sync_etc_payouts.py 0% <0%> (ø)
app/dashboard/models.py 41.94% <100%> (-14.35%) ⬇️
app/dashboard/utils.py 18.96% <26.31%> (-23.35%) ⬇️
app/app/context.py 0.96% <0%> (-76.82%) ⬇️
app/marketing/management/commands/sync_keywords.py 29.16% <0%> (-66.67%) ⬇️
app/marketing/management/commands/expiration.py 33.33% <0%> (-57.15%) ⬇️
...eting/management/commands/expiration_start_work.py 23.17% <0%> (-47.57%) ⬇️
app/dashboard/tokens.py 23.07% <0%> (-46.16%) ⬇️
...pp/marketing/management/commands/expiration_tip.py 53.84% <0%> (-46.16%) ⬇️
...ands/sync_pull_request_with_bounty_fulfillments.py 27.9% <0%> (-44.19%) ⬇️
... and 94 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff1a890...c69d7a0. Read the comment docs.

funderAddress = bounty.bounty_owner_profile.etc_address
blockscout_url = f'https://blockscout.com/etc/mainnet/api?module=account&action=txlist&address={funderAddress}'
response = requests.get(blockscout_url).json()
didFindPayout = None
Copy link
Contributor

Choose a reason for hiding this comment

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

is this used? or what is this one for?

@thelostone-mc thelostone-mc merged commit 044ca51 into master Feb 27, 2020
@thelostone-mc thelostone-mc deleted the etc-payout-tx branch June 27, 2020 00:49
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