abstract-solana 0.0.0.84__py3-none-any.whl → 0.0.0.86__py3-none-any.whl
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-solana might be problematic. Click here for more details.
- abstract_solana/pumpFun/pump_fun_keys.py +2 -2
- abstract_solana/pumpFun/token_utils.py +6 -4
- {abstract_solana-0.0.0.84.dist-info → abstract_solana-0.0.0.86.dist-info}/METADATA +1 -1
- {abstract_solana-0.0.0.84.dist-info → abstract_solana-0.0.0.86.dist-info}/RECORD +6 -6
- {abstract_solana-0.0.0.84.dist-info → abstract_solana-0.0.0.86.dist-info}/WHEEL +0 -0
- {abstract_solana-0.0.0.84.dist-info → abstract_solana-0.0.0.86.dist-info}/top_level.txt +0 -0
|
@@ -105,8 +105,8 @@ def get_pump_fun_data(mint_str: str=None,signature=None,commitment="finalized"):
|
|
|
105
105
|
|
|
106
106
|
def getKeys(mint_str,token_account,payer_pubkey,buy=True):
|
|
107
107
|
MINT = get_pubkey(str(mint_str))
|
|
108
|
-
BONDING_CURVE = get_pubkey(derive_bonding_curve(mint_str))
|
|
109
|
-
ASSOCIATED_BONDING_CURVE = get_pubkey(derive_associated_bonding_curve(mint_str))
|
|
108
|
+
BONDING_CURVE = get_pubkey(str(derive_bonding_curve(str(mint_str))[0]))
|
|
109
|
+
ASSOCIATED_BONDING_CURVE = get_pubkey(derive_associated_bonding_curve(str(mint_str)))
|
|
110
110
|
ASSOCIATED_USER = Pubkey.from_string(str(token_account))
|
|
111
111
|
USER = Pubkey.from_string(str(payer_pubkey))
|
|
112
112
|
PUMP_FUN_TOKEN_PROGRAM_SWITCH = TOKEN_PROGRAM_ID_PUBKEY if buy else PUMP_FUN_ASSOC_TOKEN_ACC_PROG_PUBKEY
|
|
@@ -10,13 +10,15 @@ def get_token_balance(payer,mint: str):
|
|
|
10
10
|
response=response.get('value',response)
|
|
11
11
|
ui_amount = get_any_value(response, "uiAmount") or 0
|
|
12
12
|
return float(ui_amount)
|
|
13
|
+
def calculate_token_price(virtual_sol_reserves,virtual_token_reserves):
|
|
14
|
+
virtual_sol_reserves = virtual_sol_reserves / SOL_DECIMAL_EXP
|
|
15
|
+
virtual_token_reserves = virtual_token_reserves / TOKEN_DECIMAL_EXP
|
|
16
|
+
return virtual_sol_reserves / virtual_token_reserves
|
|
13
17
|
def get_token_price(mint: str) -> float:
|
|
14
18
|
try:
|
|
15
|
-
bonding_curve = derive_bonding_curve(
|
|
19
|
+
bonding_curve = derive_bonding_curve(mint_str)
|
|
16
20
|
virtual_reserves = get_virtual_reserves(bonding_curve)
|
|
17
|
-
|
|
18
|
-
virtual_token_reserves = virtual_reserves.virtualTokenReserves / TOKEN_DECIMAL_EXP
|
|
19
|
-
token_price = virtual_sol_reserves / virtual_token_reserves
|
|
21
|
+
token_price = calculate_token_price(virtual_reserves.virtualSolReserves,virtual_reserves.virtualTokenReserves)
|
|
20
22
|
print(f"Token Price: {token_price:.20f} SOL")
|
|
21
23
|
return token_price
|
|
22
24
|
except Exception as e:
|
|
@@ -13,9 +13,9 @@ abstract_solana/utils.py,sha256=RcnGEiZ0aJbcw8ObpjHU3WUFU4Tmy-exCs6qIbEu4_c,444
|
|
|
13
13
|
abstract_solana/pumpFun/__init__.py,sha256=BiRxwJd1JWwEft63zqYwZ_Xs6UDp4hjczjzvuwy3sHg,85
|
|
14
14
|
abstract_solana/pumpFun/buy_sell_pump.py,sha256=3souQvQs3pEUpLxQ3GyZiTqJxOJhTcBQOj4bhzBOKxQ,7833
|
|
15
15
|
abstract_solana/pumpFun/pumpFunKeys.py,sha256=yMS_fT-0ESndluVpZ17XdMhpXVtSfhtIG5njy7DJkfI,7961
|
|
16
|
-
abstract_solana/pumpFun/pump_fun_keys.py,sha256=
|
|
17
|
-
abstract_solana/pumpFun/token_utils.py,sha256=
|
|
18
|
-
abstract_solana-0.0.0.
|
|
19
|
-
abstract_solana-0.0.0.
|
|
20
|
-
abstract_solana-0.0.0.
|
|
21
|
-
abstract_solana-0.0.0.
|
|
16
|
+
abstract_solana/pumpFun/pump_fun_keys.py,sha256=iuxTjIGcWuwM8ZvlERqJdKNCMLig2xmZKXuoI0uqNL0,8340
|
|
17
|
+
abstract_solana/pumpFun/token_utils.py,sha256=KeGGYDgG-Ebfr-M5PDUrPzFDrFe7TGFMP5R53VgnLq0,2814
|
|
18
|
+
abstract_solana-0.0.0.86.dist-info/METADATA,sha256=hdz24BdHe6m2ZPyqALjRRE9j_C2B_ptoeHBXZ6i549I,981
|
|
19
|
+
abstract_solana-0.0.0.86.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
|
20
|
+
abstract_solana-0.0.0.86.dist-info/top_level.txt,sha256=SsJYent8eZQ0FU2jmP8wTj7aFZFhNwxxP-5cCTQ2B-o,16
|
|
21
|
+
abstract_solana-0.0.0.86.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|