abstract-math 0.0.0.13__tar.gz → 0.0.0.14__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.
Potentially problematic release.
This version of abstract-math might be problematic. Click here for more details.
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/PKG-INFO +1 -1
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/setup.py +1 -1
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/src/abstract_math/derive_tokens.py +0 -13
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/src/abstract_math.egg-info/PKG-INFO +1 -1
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/README.md +0 -0
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/pyproject.toml +0 -0
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/setup.cfg +0 -0
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/src/abstract_math/__init__.py +0 -0
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/src/abstract_math/safe_math.py +0 -0
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/src/abstract_math.egg-info/SOURCES.txt +0 -0
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/src/abstract_math.egg-info/dependency_links.txt +0 -0
- {abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/src/abstract_math.egg-info/top_level.txt +0 -0
|
@@ -94,16 +94,3 @@ def update_token_variables(variables):
|
|
|
94
94
|
variables = derive_token_decimals_from_token_variables(**variables)
|
|
95
95
|
variables['tokenAmountUi'] = get_token_amount_ui(**variables)
|
|
96
96
|
return variables
|
|
97
|
-
def get_liq():
|
|
98
|
-
# get the liquidity and sqrt of price
|
|
99
|
-
pool_contract = web3.eth.contract(address=pool_address, abi=v3_pool_abi)
|
|
100
|
-
slot0 = pool_contract.functions.slot0().call()
|
|
101
|
-
sqrt_price_x96 = slot0[0]
|
|
102
|
-
liquidity = pool_contract.functions.liquidity().call()
|
|
103
|
-
|
|
104
|
-
# compute the virtual reserves
|
|
105
|
-
Q96 = 2 ** 96
|
|
106
|
-
Q192 = 2 ** 192
|
|
107
|
-
reserve0_x96 = liquidity * Q192 / sqrt_price_x96
|
|
108
|
-
reserve1_x96 = liquidity * sqrt_price_x96
|
|
109
|
-
token_decimals = math.log10((int(data['virtualTokenReserves']["data"]) * (10**int(9) / (int(data['virtualSolReserves']["data"])) * (int(data['tokenAmount']["data"]) / int(data['solAmount']["data"])))))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{abstract_math-0.0.0.13 → abstract_math-0.0.0.14}/src/abstract_math.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|