Enable caching to reduce RPC calls by PawlowskiAdrian · Pull Request #276 · uniswap-python/uniswap-python · GitHub
Skip to content

Enable caching to reduce RPC calls#276

Merged
ErikBjare merged 4 commits into
uniswap-python:masterfrom
PawlowskiAdrian:patch-1
Oct 12, 2022
Merged

Enable caching to reduce RPC calls#276
ErikBjare merged 4 commits into
uniswap-python:masterfrom
PawlowskiAdrian:patch-1

Conversation

@PawlowskiAdrian

Copy link
Copy Markdown
Contributor

enable caching, will reduce RPC calls for method chainID

enable caching, will reduce RPC calls for method chainID
@ErikBjare

ErikBjare commented Sep 28, 2022

Copy link
Copy Markdown
Member

@PawlowskiAdrian

Copy link
Copy Markdown
Contributor Author

good call @ErikBjare , adding changes

- custom eth caching middleware creation
- custom SIMPLE_CACHE_RPC_WHITELIST
- flag to enable/disable caching for class Uniswap
@PawlowskiAdrian

Copy link
Copy Markdown
Contributor Author

added changes, looking for any commentary

@ErikBjare ErikBjare left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! Going to let CI run now and will merge if it works :)

Comment thread uniswap/uniswap.py Outdated
Comment thread uniswap/uniswap.py
@codecov

codecov Bot commented Oct 12, 2022

Copy link
Copy Markdown

Codecov Report

Base: 84.56% // Head: 84.13% // Decreases project coverage by -0.42% ⚠️

Coverage data is based on head (bd1f168) compared to base (ff26afb).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #276      +/-   ##
==========================================
- Coverage   84.56%   84.13%   -0.43%     
==========================================
  Files          10       10              
  Lines        1030     1040      +10     
==========================================
+ Hits          871      875       +4     
- Misses        159      165       +6     
Impacted Files Coverage Δ
uniswap/uniswap.py 82.38% <50.00%> (-0.21%) ⬇️
uniswap/util.py 86.48% <85.71%> (-0.48%) ⬇️
uniswap/constants.py 100.00% <100.00%> (ø)
uniswap/tokens.py 64.28% <0.00%> (-21.43%) ⬇️

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ErikBjare ErikBjare merged commit 0b42700 into uniswap-python:master Oct 12, 2022
@ErikBjare

Copy link
Copy Markdown
Member

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