ypricemagic 4.6.31.dev0__tar.gz → 4.7.2.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. {ypricemagic-4.6.31.dev0/ypricemagic.egg-info → ypricemagic-4.7.2.dev0}/PKG-INFO +1 -1
  2. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/uniswap/v3.py +21 -11
  3. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/stable_swap/curve.py +6 -3
  4. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0/ypricemagic.egg-info}/PKG-INFO +1 -1
  5. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/ypricemagic.egg-info/SOURCES.txt +0 -2
  6. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/ypricemagic.egg-info/top_level.txt +0 -1
  7. ypricemagic-4.6.31.dev0/ypricemagic/__init__.py +0 -12
  8. ypricemagic-4.6.31.dev0/ypricemagic/magic.py +0 -45
  9. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/.env.sample +0 -0
  10. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/.github/workflows/black.yaml +0 -0
  11. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/.github/workflows/codeql-analysis.yml +0 -0
  12. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/.github/workflows/compile.yaml +0 -0
  13. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/.github/workflows/deploy-docs.yml +0 -0
  14. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/.github/workflows/mypy.yaml +0 -0
  15. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/.github/workflows/pytest.yaml +0 -0
  16. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/.github/workflows/release.yaml +0 -0
  17. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/.gitignore +0 -0
  18. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/CONTRIBUTING.md +0 -0
  19. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/FUNDING.json +0 -0
  20. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/LICENSE.txt +0 -0
  21. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/Makefile +0 -0
  22. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/README.md +0 -0
  23. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/brownie-config.yaml +0 -0
  24. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/Makefile +0 -0
  25. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/alabaster.css +0 -0
  26. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/basic.css +0 -0
  27. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/custom.css +0 -0
  28. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/doctools.js +0 -0
  29. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/documentation_options.js +0 -0
  30. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/file.png +0 -0
  31. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/language_data.js +0 -0
  32. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/minus.png +0 -0
  33. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/plus.png +0 -0
  34. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/pygments.css +0 -0
  35. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/searchtools.js +0 -0
  36. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/_build/html/_static/sphinx_highlight.js +0 -0
  37. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/caching.rst +0 -0
  38. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/cli.rst +0 -0
  39. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/conf.py +0 -0
  40. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/environment.rst +0 -0
  41. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/index.rst +0 -0
  42. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/docs/make.bat +0 -0
  43. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/pyproject.toml +0 -0
  44. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/renovate.json +0 -0
  45. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/requirements-dev.txt +0 -0
  46. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/requirements.txt +0 -0
  47. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/scripts/debug-curve.py +0 -0
  48. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/scripts/debug-price.py +0 -0
  49. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/setup.cfg +0 -0
  50. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/setup.py +0 -0
  51. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/__init__.py +0 -0
  52. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/classes/test_erc20.py +0 -0
  53. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/classes/test_singleton.py +0 -0
  54. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/conftest.py +0 -0
  55. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/fixtures.py +0 -0
  56. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/__init__.py +0 -0
  57. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/dex/__init__.py +0 -0
  58. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/dex/test_balancer.py +0 -0
  59. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/dex/test_uniswap.py +0 -0
  60. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/dex/test_velodrome.py +0 -0
  61. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/lending/__init__.py +0 -0
  62. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/lending/test_aave.py +0 -0
  63. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/lending/test_compound.py +0 -0
  64. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/stable_swap/test_curve.py +0 -0
  65. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/test_chainlink.py +0 -0
  66. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/test_gearbox.py +0 -0
  67. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/test_magic.py +0 -0
  68. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/test_popsicle.py +0 -0
  69. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/test_synthetix.py +0 -0
  70. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/test_yearn.py +0 -0
  71. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/tokenized_fund/test_piedao.py +0 -0
  72. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/prices/utils/test_buckets.py +0 -0
  73. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/tests/test_constants.py +0 -0
  74. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/ENVIRONMENT_VARIABLES.py +0 -0
  75. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/__init__.py +0 -0
  76. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/__init__.py +0 -0
  77. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/brownie.py +0 -0
  78. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/common.py +0 -0
  79. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/config.py +0 -0
  80. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/decorators.py +0 -0
  81. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/entities.py +0 -0
  82. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/exceptions.py +0 -0
  83. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/log.py +0 -0
  84. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/structs.py +0 -0
  85. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/utils/__init__.py +0 -0
  86. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/utils/_ep.py +0 -0
  87. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/utils/bulk.py +0 -0
  88. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/utils/contract.py +0 -0
  89. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/utils/logs.py +0 -0
  90. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/utils/price.py +0 -0
  91. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/utils/stringify.py +0 -0
  92. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/utils/token.py +0 -0
  93. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/utils/traces.py +0 -0
  94. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_db/utils/utils.py +0 -0
  95. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/_decorators.py +0 -0
  96. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/classes/__init__.py +0 -0
  97. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/classes/_abc.py +0 -0
  98. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/classes/common.py +0 -0
  99. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/classes/singleton.py +0 -0
  100. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/cli.py +0 -0
  101. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/constants.py +0 -0
  102. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/contracts.py +0 -0
  103. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/convert.py +0 -0
  104. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/datatypes.py +0 -0
  105. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/exceptions.py +0 -0
  106. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/ERC20.py +0 -0
  107. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/__init__.py +0 -0
  108. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/balancer/WeightedPool.py +0 -0
  109. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/balancer/__init__.py +0 -0
  110. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/compound/__init__.py +0 -0
  111. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/compound/unitroller.py +0 -0
  112. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/curve/CurveRegistry.py +0 -0
  113. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/curve/__init__.py +0 -0
  114. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/multicall2.py +0 -0
  115. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/uniswap/__init__.py +0 -0
  116. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/uniswap/factoryv2.py +0 -0
  117. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/uniswap/quoterv3.py +0 -0
  118. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/interfaces/uniswap/velov2.py +0 -0
  119. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/monkey_patches.py +0 -0
  120. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/networks.py +0 -0
  121. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/__init__.py +0 -0
  122. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/band.py +0 -0
  123. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/chainlink.py +0 -0
  124. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/convex.py +0 -0
  125. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/__init__.py +0 -0
  126. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/balancer/__init__.py +0 -0
  127. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/balancer/_abc.py +0 -0
  128. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/balancer/balancer.py +0 -0
  129. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/balancer/v1.py +0 -0
  130. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/balancer/v2.py +0 -0
  131. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/genericamm.py +0 -0
  132. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/mooniswap.py +0 -0
  133. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/solidly.py +0 -0
  134. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/uniswap/__init__.py +0 -0
  135. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/uniswap/uniswap.py +0 -0
  136. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/uniswap/v1.py +0 -0
  137. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/uniswap/v2.py +0 -0
  138. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/uniswap/v2_forks.py +0 -0
  139. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/dex/velodrome.py +0 -0
  140. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/eth_derivs/__init__.py +0 -0
  141. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/eth_derivs/creth.py +0 -0
  142. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/eth_derivs/wsteth.py +0 -0
  143. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/gearbox.py +0 -0
  144. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/lending/__init__.py +0 -0
  145. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/lending/aave.py +0 -0
  146. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/lending/compound.py +0 -0
  147. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/lending/ib.py +0 -0
  148. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/magic.py +0 -0
  149. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/one_to_one.py +0 -0
  150. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/pendle.py +0 -0
  151. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/popsicle.py +0 -0
  152. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/rkp3r.py +0 -0
  153. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/solidex.py +0 -0
  154. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/stable_swap/__init__.py +0 -0
  155. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/stable_swap/belt.py +0 -0
  156. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/stable_swap/ellipsis.py +0 -0
  157. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/stable_swap/froyo.py +0 -0
  158. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/stable_swap/mstablefeederpool.py +0 -0
  159. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/stable_swap/saddle.py +0 -0
  160. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/synthetix.py +0 -0
  161. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/tokenized_fund/__init__.py +0 -0
  162. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/tokenized_fund/basketdao.py +0 -0
  163. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/tokenized_fund/gelato.py +0 -0
  164. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/tokenized_fund/piedao.py +0 -0
  165. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/tokenized_fund/reserve.py +0 -0
  166. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/tokenized_fund/tokensets.py +0 -0
  167. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/utils/__init__.py +0 -0
  168. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/utils/buckets.py +0 -0
  169. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/utils/debug.py +0 -0
  170. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/utils/sense_check.py +0 -0
  171. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/utils/ypriceapi.py +0 -0
  172. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/prices/yearn.py +0 -0
  173. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/py.typed +0 -0
  174. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/time.py +0 -0
  175. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/__init__.py +0 -0
  176. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/_erc20.py +0 -0
  177. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/cache.py +0 -0
  178. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/checks.py +0 -0
  179. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/client.py +0 -0
  180. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/dank_mids.py +0 -0
  181. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/events.py +0 -0
  182. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/fakes.py +0 -0
  183. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/gather.py +0 -0
  184. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/logging.py +0 -0
  185. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/middleware.py +0 -0
  186. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/multicall.py +0 -0
  187. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/y/utils/raw_calls.py +0 -0
  188. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/ypricemagic.egg-info/dependency_links.txt +0 -0
  189. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/ypricemagic.egg-info/entry_points.txt +0 -0
  190. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/ypricemagic.egg-info/not-zip-safe +0 -0
  191. {ypricemagic-4.6.31.dev0 → ypricemagic-4.7.2.dev0}/ypricemagic.egg-info/requires.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ypricemagic
3
- Version: 4.6.31.dev0
3
+ Version: 4.7.2.dev0
4
4
  Summary: Use this tool to extract historical on-chain price data from an archive node. Shoutout to @bantg and @nymmrx for their awesome work on yearn-exporter that made this library possible.
5
5
  Home-page: https://github.com/BobTheBuidler/ypricemagic
6
6
  Author: BobTheBuidler
@@ -22,7 +22,7 @@ import eth_retry
22
22
  from a_sync import igather
23
23
  from a_sync.a_sync import HiddenMethodDescriptor
24
24
  from brownie.network.event import _EventItem
25
- from eth_typing import ChecksumAddress, HexAddress
25
+ from eth_typing import BlockNumber, ChecksumAddress, HexAddress
26
26
  from faster_eth_abi.packed import encode_packed
27
27
  from typing_extensions import Self
28
28
 
@@ -115,7 +115,7 @@ class UniswapV3Pool(ContractBase):
115
115
  token1: Address,
116
116
  tick_spacing: int,
117
117
  fee: int,
118
- deploy_block: int,
118
+ deploy_block: BlockNumber,
119
119
  asynchronous: bool = False,
120
120
  ) -> None:
121
121
  """
@@ -666,7 +666,9 @@ class UniswapV3(a_sync.ASyncGenericBase):
666
666
 
667
667
  @stuck_coro_debugger
668
668
  @eth_retry.auto_retry
669
- async def _quote_exact_input(self, path: Path, amount_in: int, block: int) -> Optional[Decimal]:
669
+ async def _quote_exact_input(
670
+ self, path: Path, amount_in: int, block: BlockNumber
671
+ ) -> Optional[Decimal]:
670
672
  """
671
673
  Quote the exact input for a given path and amount.
672
674
 
@@ -690,15 +692,23 @@ class UniswapV3(a_sync.ASyncGenericBase):
690
692
  amount = await quoter.quoteExactInput.coroutine(
691
693
  _encode_path(path), amount_in, block_identifier=block
692
694
  )
693
- return (
694
- # Quoter v2 uses this weird return struct, we must unpack it to get amount out.
695
- (amount if isinstance(amount, int) else amount[0])
696
- / _undo_fees(path)
697
- / _FEE_DENOMINATOR
698
- )
699
695
  except Exception as e:
700
- if not call_reverted(e):
701
- raise
696
+ if call_reverted(e):
697
+ return None
698
+ raise
699
+
700
+ scaled = (
701
+ # Quoter v2 uses this weird return struct, we must unpack it to get amount out.
702
+ (amount if isinstance(amount, int) else amount[0])
703
+ / _undo_fees(path)
704
+ / _FEE_DENOMINATOR
705
+ )
706
+ if scaled > 100_000_000:
707
+ # this is a totally arbitrary value used as a sense check,
708
+ # we were getting crazy prices from some pools on occasion
709
+ # but not sure why
710
+ return None
711
+ return round(scaled, 18)
702
712
 
703
713
 
704
714
  def _encode_path(path: Path) -> bytes:
@@ -14,7 +14,7 @@ from brownie import ZERO_ADDRESS
14
14
  from brownie.convert.datatypes import EthAddress
15
15
  from brownie.exceptions import ContractNotFound, EventLookupError
16
16
  from brownie.network.event import _EventItem
17
- from faster_eth_abi.exceptions import InvalidPointer
17
+ from faster_eth_abi.exceptions import InsufficientDataBytes, InvalidPointer
18
18
  from typing_extensions import Self
19
19
  from web3.exceptions import ContractLogicError
20
20
 
@@ -457,8 +457,11 @@ class CurvePool(ERC20):
457
457
  factory = await self.__factory__
458
458
  source = factory or await curve.__registry__
459
459
  balances = await source.get_balances.coroutine(self.address, block_identifier=block)
460
- except (ContractLogicError, ValueError):
461
- # ContractLogicError in web3>=6.0, ValueError in <6.0
460
+ except (ContractLogicError, ValueError, InsufficientDataBytes):
461
+ # ContractLogicError in web3>=6.0, ValueError in <6.0,
462
+ # InsufficientDataBytes sometimes too, not sure why.
463
+ # Potentially related to https://github.com/ethereum/eth-abi/pull/247
464
+
462
465
  # fallback for historical queries where registry was not yet deployed
463
466
  balances = await a_sync.map(self._get_balance, range(len(coins)), block=block).values(
464
467
  pop=True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ypricemagic
3
- Version: 4.6.31.dev0
3
+ Version: 4.7.2.dev0
4
4
  Summary: Use this tool to extract historical on-chain price data from an archive node. Shoutout to @bantg and @nymmrx for their awesome work on yearn-exporter that made this library possible.
5
5
  Home-page: https://github.com/BobTheBuidler/ypricemagic
6
6
  Author: BobTheBuidler
@@ -179,8 +179,6 @@ y/utils/logging.py
179
179
  y/utils/middleware.py
180
180
  y/utils/multicall.py
181
181
  y/utils/raw_calls.py
182
- ypricemagic/__init__.py
183
- ypricemagic/magic.py
184
182
  ypricemagic.egg-info/PKG-INFO
185
183
  ypricemagic.egg-info/SOURCES.txt
186
184
  ypricemagic.egg-info/dependency_links.txt
@@ -1,3 +1,2 @@
1
1
  839fc216801717d47e67__mypyc
2
2
  y
3
- ypricemagic
@@ -1,12 +0,0 @@
1
- import os
2
-
3
- from brownie import network
4
-
5
- if not network.is_connected():
6
- try:
7
- network_name = os.environ["BROWNIE_NETWORK_ID"]
8
- except KeyError:
9
- raise KeyError(
10
- "In order to use pricemagic outside of a brownie project directory, you will need to set $BROWNIE_NETWORK_ID environment variable with the id of your preferred brownie network connection."
11
- )
12
- network.connect(network_name)
@@ -1,45 +0,0 @@
1
- import logging
2
- from typing import Optional
3
-
4
- from y import magic
5
- from y.datatypes import AnyAddressType, Block, UsdPrice
6
-
7
- logger = logging.getLogger(__name__)
8
-
9
-
10
- def get_price(token: AnyAddressType, block: Optional[Block] = None) -> UsdPrice:
11
- """
12
- Retrieve the USD price of a given token at a specific block.
13
-
14
- This function serves as a wrapper around `y.magic.get_price` and provides a warning
15
- about the migration from `ypricemagic` to `y`. The `y` module offers the same functionality
16
- with additional features.
17
-
18
- .. warning::
19
- `ypricemagic` is in the process of being migrated to `y`.
20
- `y` can do all of the same old stuff you expect, plus some new stuff you may or may not need.
21
- This method still works for now, but will be removed soon.
22
- Please update your scripts to use `y.magic.get_price(token, block)`.
23
-
24
- Args:
25
- token: The address of the token to get the price for.
26
- block: The block number to get the price at. If not provided, the latest block is used.
27
-
28
- Examples:
29
- >>> from ypricemagic.magic import get_price
30
- >>> price = get_price("0x6B175474E89094C44Da98b954EedeAC495271d0F")
31
- >>> print(price)
32
-
33
- >>> price_at_block = get_price("0x6B175474E89094C44Da98b954EedeAC495271d0F", block=12345678)
34
- >>> print(price_at_block)
35
-
36
- See Also:
37
- - :func:`y.magic.get_price` for the recommended function to use.
38
- """
39
- logger.warning(
40
- "ypricemagic is in the process of being migrated to y."
41
- "y can do all of the same old stuff you expect, plus some new stuff you may or may not need."
42
- "This method still works for now, but will be removed soon."
43
- "Please update your scripts to use `y.magic.get_price(token, block)`."
44
- )
45
- return magic.get_price(token, block)