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

[EXP-16-218] Treasury and SMS on fantom #218

Merged
merged 84 commits into from
Feb 2, 2022

Conversation

BobTheBuidler
Copy link
Collaborator

@BobTheBuidler BobTheBuidler commented Feb 1, 2022

This PR includes the data export functionality for Fantom Treasury and SMS dashboards.
Dashboard files will be updated at a later time.

@yearn-linear-gh-sync yearn-linear-gh-sync bot changed the title Treasury and SMS on fantom [EXP-16-218] Treasury and SMS on fantom Feb 1, 2022
@linear
Copy link

linear bot commented Feb 1, 2022

EXP-16 [EXP-16-218] Treasury and SMS on fantom

This PR includes the data export functionality for Fantom Treasury and SMS dashboards.
Dashboard files will be updated at a later time.

scripts/historical_sms_exporter.py Outdated Show resolved Hide resolved
scripts/historical_sms_exporter.py Outdated Show resolved Hide resolved
from yearn.treasury.treasury import YearnTreasury
from yearn.utils import closest_block_after_timestamp

logger = logging.getLogger('yearn.historical_treasury_exporter')

def main():
start = datetime.now(tz=timezone.utc)
# end: 2020-07-21 first treasury tx
end = datetime(2020, 7, 21, 10, 1, tzinfo=timezone.utc)
if Network(chain.id) == Network.Fantom:
Copy link
Member

Choose a reason for hiding this comment

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

same two comments apply here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fix'd, commit pending

Copy link
Collaborator Author

@BobTheBuidler BobTheBuidler Feb 2, 2022

Choose a reason for hiding this comment

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

I used dict(details)[chain.id] syntax instead of dict(details).get(chain.id) syntax to show we require chainid to be supported, have no fallback

yearn/treasury/treasury.py Outdated Show resolved Hide resolved
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