abstract-solana 0.0.0.94__py3-none-any.whl → 0.0.0.95__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/abstract_utils/__init__.py +0 -1
- abstract_solana/pump_functions/buy_sell_pump.py +2 -2
- abstract_solana/pump_functions/pump_fun_keys.py +3 -3
- abstract_solana/pump_functions/token_utils.py +2 -2
- {abstract_solana-0.0.0.94.dist-info → abstract_solana-0.0.0.95.dist-info}/METADATA +1 -1
- abstract_solana-0.0.0.95.dist-info/RECORD +22 -0
- abstract_solana/account_key_utils.py +0 -20
- abstract_solana/constants.py +0 -30
- abstract_solana/genesis_functions.py +0 -14
- abstract_solana/index_utils.py +0 -43
- abstract_solana/keypair_utils.py +0 -18
- abstract_solana/log_message_functions.py +0 -150
- abstract_solana/price_utils.py +0 -78
- abstract_solana/pubkey_utils.py +0 -72
- abstract_solana/pumpFun/__init__.py +0 -3
- abstract_solana/pumpFun/buy_sell_pump.py +0 -149
- abstract_solana/pumpFun/pumpFunKeys.py +0 -129
- abstract_solana/pumpFun/pump_fun_keys.py +0 -133
- abstract_solana/pumpFun/token_utils.py +0 -63
- abstract_solana/pumpFunKeys.py +0 -95
- abstract_solana/signature_data_parse.py +0 -57
- abstract_solana/utils.py +0 -16
- abstract_solana-0.0.0.94.dist-info/RECORD +0 -38
- {abstract_solana-0.0.0.94.dist-info → abstract_solana-0.0.0.95.dist-info}/WHEEL +0 -0
- {abstract_solana-0.0.0.94.dist-info → abstract_solana-0.0.0.95.dist-info}/top_level.txt +0 -0
|
@@ -7,9 +7,9 @@ from solana.rpc.types import TokenAccountOpts,TxOpts
|
|
|
7
7
|
from solana.transaction import Transaction
|
|
8
8
|
from abstract_solcatcher import getLatestBlockHash,sendTransaction,getTransaction
|
|
9
9
|
from abstract_utilities import get_any_value
|
|
10
|
-
from ..pubkey_utils import Pubkey,get_pubkey
|
|
10
|
+
from ..abstract_utils.pubkey_utils import Pubkey,get_pubkey
|
|
11
11
|
from spl.token.instructions import CloseAccountParams,close_account
|
|
12
|
-
from ..constants import TOKEN_PROGRAM_ID_PUBKEY,LAMPORTS_PER_SOL,UNIT_PRICE,UNIT_BUDGET
|
|
12
|
+
from ..abstract_utils.constants import TOKEN_PROGRAM_ID_PUBKEY,LAMPORTS_PER_SOL,UNIT_PRICE,UNIT_BUDGET
|
|
13
13
|
from solders.compute_budget import set_compute_unit_limit, set_compute_unit_price
|
|
14
14
|
from .token_utils import get_token_balance,check_existing_token_account,get_token_price
|
|
15
15
|
from .pump_fun_keys import getKeys
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
from ..pubkey_utils import Pubkey,get_pubkey,derive_bonding_curve,derive_associated_bonding_curve
|
|
2
|
-
from ..log_message_functions import get_for_program_ids_info
|
|
1
|
+
from ..abstract_utils.pubkey_utils import Pubkey,get_pubkey,derive_bonding_curve,derive_associated_bonding_curve
|
|
2
|
+
from ..abstract_utils.log_message_functions import get_for_program_ids_info
|
|
3
3
|
from spl.token.instructions import create_associated_token_account, get_associated_token_address
|
|
4
4
|
from abstract_solcatcher import getGenesisSignature,getTransaction,getAccountInfo
|
|
5
5
|
from construct import Padding, Struct, Int64ul, Flag
|
|
6
6
|
from solana.transaction import AccountMeta, Transaction
|
|
7
7
|
import base64
|
|
8
|
-
from ..constants import (PUMP_FUN_GLOBAL_PUBKEY,
|
|
8
|
+
from ..abstract_utils.constants import (PUMP_FUN_GLOBAL_PUBKEY,
|
|
9
9
|
PUMP_FUN_FEE_RECIPIENT_PUBKEY,
|
|
10
10
|
SYSTEM_PROGRAM_PUBKEY,
|
|
11
11
|
PUMP_FUN_EVENT_AUTHORITY_PUBKEY,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from ..constants import TOKEN_DECIMAL_EXP,SOL_DECIMAL_EXP
|
|
2
|
-
from ..pubkey_utils import Pubkey
|
|
1
|
+
from ..abstract_utils.constants import TOKEN_DECIMAL_EXP,SOL_DECIMAL_EXP
|
|
2
|
+
from ..abstract_utils.pubkey_utils import Pubkey
|
|
3
3
|
from .pump_fun_keys import get_pump_fun_data
|
|
4
4
|
from abstract_solcatcher import getTokenAccountBalance,getTokenAccountsByOwner
|
|
5
5
|
from spl.token.instructions import create_associated_token_account, get_associated_token_address
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
abstract_solana/__init__.py,sha256=rC-Z34toCxT80j45rwTgY5n59w-Z8tEAk9EOBi-aqso,94
|
|
2
|
+
abstract_solana/abstract_rpcs/__init__.py,sha256=AF2rqc1rC2g74TYW-BuGhDh5x5bpthoDS-J5_C1X35I,24
|
|
3
|
+
abstract_solana/abstract_rpcs/get_body.py,sha256=jrwh0uhy-yRhdLIlbgoYKtxYxZ0NqH8kuIkvYUZgIIU,51383
|
|
4
|
+
abstract_solana/abstract_utils/__init__.py,sha256=HCbBVQ5BIFCVkFqqTMHp1Y__YQAO4HTq_KHVdMCe89U,296
|
|
5
|
+
abstract_solana/abstract_utils/account_key_utils.py,sha256=VMJd4GOTK1vn8UZsfXDnjxDOGoQWGY6fvflJqPZ7Xvs,877
|
|
6
|
+
abstract_solana/abstract_utils/constants.py,sha256=cSmCKzQiNZocX1YkKYrdY-O449aYhi7BT_j-45HZN-E,1418
|
|
7
|
+
abstract_solana/abstract_utils/genesis_functions.py,sha256=2WRQUxN9j-dpLfYIBiX3URM-_uDGkh-eTy08Gi-qWgo,939
|
|
8
|
+
abstract_solana/abstract_utils/index_utils.py,sha256=Ed07BYTZWp-SVfpthAUqjRY00U3ZYldPCqd7LJy9AO8,1884
|
|
9
|
+
abstract_solana/abstract_utils/keypair_utils.py,sha256=YPiyjdh6F3JOmgcmXWR72EmSZKy0UF5AbYebeKSu86w,616
|
|
10
|
+
abstract_solana/abstract_utils/log_message_functions.py,sha256=-qGO4rJRHKVEV8eqs4OCe5Rx1osTlEoc07fUruMBFp8,8080
|
|
11
|
+
abstract_solana/abstract_utils/price_utils.py,sha256=BLkwFLhlsTHeW0NTdzCAUi2xhc2lX7SrHz5sslDbUrY,4288
|
|
12
|
+
abstract_solana/abstract_utils/pubkey_utils.py,sha256=TAYF74fKAuTBnqIP2SnA-BttO5uoHbxI9BRZRpGCMNY,2010
|
|
13
|
+
abstract_solana/abstract_utils/signature_data_parse.py,sha256=5AOMtJZADWcwR0JLDbd2kXZNzW129qeB0lvYUrE_tm0,1974
|
|
14
|
+
abstract_solana/abstract_utils/utils.py,sha256=RcnGEiZ0aJbcw8ObpjHU3WUFU4Tmy-exCs6qIbEu4_c,444
|
|
15
|
+
abstract_solana/pump_functions/__init__.py,sha256=BiRxwJd1JWwEft63zqYwZ_Xs6UDp4hjczjzvuwy3sHg,85
|
|
16
|
+
abstract_solana/pump_functions/buy_sell_pump.py,sha256=gjv_1et20s1Li0ygcURofO29VPkO1v-a5G5Bo_sZs_c,7860
|
|
17
|
+
abstract_solana/pump_functions/pump_fun_keys.py,sha256=BeWbV9_wd-c6ydF33drW-gZBDPWolbsMZL4cNhP3eOU,8537
|
|
18
|
+
abstract_solana/pump_functions/token_utils.py,sha256=O-Fgj3L1NhND-k4INa3WvLAEXg2N9u1fVqyLFzn1PwM,2714
|
|
19
|
+
abstract_solana-0.0.0.95.dist-info/METADATA,sha256=tdIUoioRdXugyjcJLWslL4yVIvrOz_GBCRSDnuHijH8,981
|
|
20
|
+
abstract_solana-0.0.0.95.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
21
|
+
abstract_solana-0.0.0.95.dist-info/top_level.txt,sha256=SsJYent8eZQ0FU2jmP8wTj7aFZFhNwxxP-5cCTQ2B-o,16
|
|
22
|
+
abstract_solana-0.0.0.95.dist-info/RECORD,,
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
from .signature_data_parse import get_account_keys_from_txn,get_read_only_addresses_from_txn,get_writable_addresses_from_txn
|
|
2
|
-
from .pubkey_utils import get_pubkey
|
|
3
|
-
from abstract_utilities import is_number
|
|
4
|
-
|
|
5
|
-
def get_all_account_keys(txnData):
|
|
6
|
-
accountKeys=[]
|
|
7
|
-
accountKeys += get_account_keys_from_txn(txnData)
|
|
8
|
-
accountKeys += get_read_only_addresses_from_txn(txnData)
|
|
9
|
-
accountKeys += get_writable_addresses_from_txn(txnData)
|
|
10
|
-
return accountKeys
|
|
11
|
-
|
|
12
|
-
def get_account_key(index,txnData):
|
|
13
|
-
accountKeys = get_all_account_keys(txnData)
|
|
14
|
-
if index is not None and accountKeys is not None and is_number(index) and len(accountKeys)>int(index):
|
|
15
|
-
return accountKeys[int(index)]
|
|
16
|
-
|
|
17
|
-
def get_account_index(accountIndex,txnData):
|
|
18
|
-
for i,account in enumerate(get_all_account_keys(txnData)):
|
|
19
|
-
if get_pubkey(str(account)) == get_pubkey(str(accountIndex)):
|
|
20
|
-
return i
|
abstract_solana/constants.py
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
from .pubkey_utils import get_pubkey
|
|
2
|
-
RENT = "SysvarRent111111111111111111111111111111111"
|
|
3
|
-
RENT_PUBKEY= get_pubkey(RENT)
|
|
4
|
-
TOKEN_PROGRAM_ID = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
5
|
-
TOKEN_PROGRAM_ID_PUBKEY = get_pubkey(TOKEN_PROGRAM_ID)
|
|
6
|
-
SYSTEM_PROGRAM = "11111111111111111111111111111111"
|
|
7
|
-
SYSTEM_PROGRAM_PUBKEY = get_pubkey(SYSTEM_PROGRAM)
|
|
8
|
-
SOL_MINT = "So11111111111111111111111111111111111111112"
|
|
9
|
-
SOL_MINT_PUBKEY=get_pubkey(SOL_MINT)
|
|
10
|
-
|
|
11
|
-
PUMP_FUN_GLOBAL = "4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf"
|
|
12
|
-
PUMP_FUN_GLOBAL_PUBKEY = get_pubkey(PUMP_FUN_GLOBAL)
|
|
13
|
-
PUMP_FUN_FEE_RECIPIENT = "CebN5WGQ4jvEPvsVU4EoHEpgzq1VV7AbicfhtW4xC9iM"
|
|
14
|
-
PUMP_FUN_FEE_RECIPIENT_PUBKEY = get_pubkey(PUMP_FUN_FEE_RECIPIENT)
|
|
15
|
-
PUMP_FUN_ASSOC_TOKEN_ACC_PROG = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
16
|
-
PUMP_FUN_ASSOC_TOKEN_ACC_PROG_PUBKEY = get_pubkey(PUMP_FUN_ASSOC_TOKEN_ACC_PROG)
|
|
17
|
-
PUMP_FUN_EVENT_AUTHORITY = "Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1"
|
|
18
|
-
PUMP_FUN_EVENT_AUTHORITY_PUBKEY = get_pubkey(PUMP_FUN_EVENT_AUTHORITY)
|
|
19
|
-
PUMP_FUN_PROGRAM = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
|
|
20
|
-
PUMP_FUN_PROGRAM_PUBKEY = get_pubkey(PUMP_FUN_PROGRAM)
|
|
21
|
-
|
|
22
|
-
RAYDIUM_POOL_V4_PROGRAM_ID = "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"
|
|
23
|
-
RAYDIUM_POOL_V4_PROGRAM_ID_PUBKEY=get_pubkey(RAYDIUM_POOL_V4_PROGRAM_ID)
|
|
24
|
-
|
|
25
|
-
LAMPORTS_PER_SOL = 1_000_000_000
|
|
26
|
-
UNIT_PRICE = 1_000_000
|
|
27
|
-
UNIT_BUDGET = 100_000
|
|
28
|
-
SOL_DECIMALS = 9
|
|
29
|
-
SOL_DECIMAL_EXP = 10**9
|
|
30
|
-
TOKEN_DECIMAL_EXP = 10**6
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
from .signature_data_parse import get_error_message_from_txn,get_block_time_from_txn
|
|
2
|
-
def get_errorless_txn_from_signature_array(signatureArray):
|
|
3
|
-
return [sig for sig in signatureArray if get_error_message_from_txn(sig) == None]
|
|
4
|
-
def return_oldest_from_signature_array(signatureArray,errorless=False):
|
|
5
|
-
if errorless:
|
|
6
|
-
signatureArray = get_errorless_txn_from_signature_array(signatureArray)
|
|
7
|
-
if signatureArray and isinstance(signatureArray,list):
|
|
8
|
-
if get_block_time_from_txn(signatureArray[0])<get_block_time_from_txn(signatureArray[-1]):
|
|
9
|
-
return signatureArray[0].get('signature')
|
|
10
|
-
return signatureArray[-1].get('signature')
|
|
11
|
-
def return_oldest_last_and_original_length_from_signature_array(signatureArray):
|
|
12
|
-
return {"oldest":return_oldest_from_signature_array(signatureArray),
|
|
13
|
-
"oldestValid":return_oldest_from_signature_array(signatureArray,errorless=True),
|
|
14
|
-
"length":len(signatureArray)}
|
abstract_solana/index_utils.py
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
from typing import List, Dict, Any, Optional, Union
|
|
2
|
-
from .pubkey_utils import try_pubkey
|
|
3
|
-
from .account_key_utils import get_all_account_keys
|
|
4
|
-
|
|
5
|
-
def search_for_index(data,index_number,key):
|
|
6
|
-
for index_data in data:
|
|
7
|
-
if str(index_data.get(key)) == str(index_number):
|
|
8
|
-
return index_data
|
|
9
|
-
|
|
10
|
-
def search_for_account_index(data,index_number):
|
|
11
|
-
return search_for_index(data,index_number,'accountIndex')
|
|
12
|
-
|
|
13
|
-
def find_log_entry(needle: str, log_entries: List[str]) -> Optional[str]:
|
|
14
|
-
for log_entry in log_entries:
|
|
15
|
-
if needle in log_entry:
|
|
16
|
-
return log_entry
|
|
17
|
-
return None
|
|
18
|
-
|
|
19
|
-
def extract_lp_initialization_log_entry_info_from_log_entry(lp_log_entry: str) -> Dict[str, Union[int, float]]:
|
|
20
|
-
lp_initialization_log_entry_info_start = lp_log_entry.find('{')
|
|
21
|
-
return json.loads(fix_relaxed_json_in_lp_log_entry(lp_log_entry[lp_initialization_log_entry_info_start:]))
|
|
22
|
-
|
|
23
|
-
def fix_relaxed_json_in_lp_log_entry(relaxed_json: str) -> str:
|
|
24
|
-
return relaxed_json.replace(r'([{,])\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*:', r'\1"\2":')
|
|
25
|
-
|
|
26
|
-
def get_associations(event, txnData):
|
|
27
|
-
accountKeys = get_all_account_keys(txnData)
|
|
28
|
-
key_properties = {'associatedAccounts': ['accountIndex', 'accounts'], 'programId': ['programIdIndex']}
|
|
29
|
-
new_accounts = {k: None for k in key_properties}
|
|
30
|
-
for key, values in key_properties.items():
|
|
31
|
-
for value in values:
|
|
32
|
-
subjects = event.get(value)
|
|
33
|
-
if value in event and subjects is not None:
|
|
34
|
-
subjects = event.get(value)
|
|
35
|
-
if isinstance(subjects, list):
|
|
36
|
-
event[key] = [convert_subject(sub, accountKeys) for sub in subjects]
|
|
37
|
-
else:
|
|
38
|
-
event[key] = convert_subject(subjects, accountKeys)
|
|
39
|
-
|
|
40
|
-
return event
|
|
41
|
-
|
|
42
|
-
def convert_subject(sub, accountKeys):
|
|
43
|
-
return sub if try_pubkey(sub) else accountKeys[int(sub)]
|
abstract_solana/keypair_utils.py
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
from abstract_security import *
|
|
2
|
-
from solders.keypair import Keypair
|
|
3
|
-
import base58
|
|
4
|
-
def load_from_private_key(env_key='AMM_P',path=None):
|
|
5
|
-
if path:
|
|
6
|
-
env_value = get_env_value(path=path,key=env_key)
|
|
7
|
-
else:
|
|
8
|
-
env_value = get_env_value(key=env_key)
|
|
9
|
-
if env_value:
|
|
10
|
-
return Keypair.from_base58_string(env_value)
|
|
11
|
-
|
|
12
|
-
def load_keypair_from_file(filename):
|
|
13
|
-
curr = os.path.join(sys.path[0], 'data', filename)
|
|
14
|
-
with open(curr, 'r') as file:
|
|
15
|
-
secret = json.load(file)
|
|
16
|
-
secret_key = bytes(secret)
|
|
17
|
-
print(base58.b58encode(secret_key))
|
|
18
|
-
return Keypair.from_bytete_key()
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
from abstract_utilities import make_list
|
|
2
|
-
import json,pprint
|
|
3
|
-
from .price_utils import *
|
|
4
|
-
from .signature_data_parse import get_log_messages_from_txn,get_instructions_from_txn,get_inner_instructions_from_txn
|
|
5
|
-
from .account_key_utils import get_all_account_keys
|
|
6
|
-
from .constants import TOKEN_PROGRAM_ID
|
|
7
|
-
def ifListGetSection(list_obj,i=0):
|
|
8
|
-
if list_obj and isinstance(list_obj,list) and len(list_obj)>i:
|
|
9
|
-
list_obj = list_obj[i]
|
|
10
|
-
return list_obj
|
|
11
|
-
def get_logs_from_index(txnData,index=None):
|
|
12
|
-
if index is not None:
|
|
13
|
-
allLogs = get_log_messages_from_txn(txnData)
|
|
14
|
-
endLog = get_end_log_index(txnData,index)
|
|
15
|
-
return allLogs[index:endLog]
|
|
16
|
-
def get_program_ids(txnData):
|
|
17
|
-
allLogs = get_log_messages_from_txn(txnData)
|
|
18
|
-
return [log.split(' ')[1] for log in allLogs if 'invoke' in log]
|
|
19
|
-
def get_program_id_from_log(logs):
|
|
20
|
-
for log in make_list(logs):
|
|
21
|
-
if 'invoke' in log.lower():
|
|
22
|
-
return log.split(' ')[1]
|
|
23
|
-
def get_stack_height_from_logs(logs):
|
|
24
|
-
for log in make_list(logs):
|
|
25
|
-
if 'invoke' in log.lower():
|
|
26
|
-
return int(log.split(' ')[-1][1:-1])
|
|
27
|
-
def get_end_log_index(txnData,index):
|
|
28
|
-
allLogs = get_log_messages_from_txn(txnData)
|
|
29
|
-
i=0
|
|
30
|
-
for i,log in enumerate(allLogs[index+1:]):
|
|
31
|
-
if 'invoke' in log.lower():
|
|
32
|
-
return index+1+i
|
|
33
|
-
return len(allLogs)
|
|
34
|
-
def get_stack_height_from_logs(logs):
|
|
35
|
-
for log in make_list(logs):
|
|
36
|
-
if 'invoke' in log.lower():
|
|
37
|
-
return int(log.split(' ')[-1][1:-1])
|
|
38
|
-
def get_program_id_from_log(logs):
|
|
39
|
-
for log in make_list(logs):
|
|
40
|
-
if 'invoke' in log.lower():
|
|
41
|
-
return log.split(' ')[1]
|
|
42
|
-
|
|
43
|
-
def get_all_logs(txnData):
|
|
44
|
-
logits = []
|
|
45
|
-
allLogs = get_log_messages_from_txn(txnData)
|
|
46
|
-
for i,log in enumerate(allLogs):
|
|
47
|
-
if 'invoke' in log.lower():
|
|
48
|
-
logits.append([])
|
|
49
|
-
logits[-1].append(log)
|
|
50
|
-
start = 0
|
|
51
|
-
for i,log in enumerate(logits):
|
|
52
|
-
length = len(log)
|
|
53
|
-
end = start+length
|
|
54
|
-
logits[i]={"programId":get_program_id_from_log(log[0]),
|
|
55
|
-
"start":start,
|
|
56
|
-
"end":end-1,
|
|
57
|
-
'stackHeight':get_stack_height_from_logs(log[0]) or 1,
|
|
58
|
-
'events':[event.split(':')[-1] or 'unknown' for event in get_log_events(log)],
|
|
59
|
-
'vars':[event.split(':')[1:] or 'unknown' for event in get_log_events(log)],
|
|
60
|
-
'logs':log}
|
|
61
|
-
start = end
|
|
62
|
-
return logits
|
|
63
|
-
def split_log_for_instruction(log):
|
|
64
|
-
return log.split('log:')[-1].split('Instruction:')[-1]
|
|
65
|
-
def clean_split_string(string,delim=' '):
|
|
66
|
-
return delim.join([spl for spl in string.split(' ') if spl])
|
|
67
|
-
def get_log_events(logs=None,index=None):
|
|
68
|
-
return [clean_split_string(split_log_for_instruction(log)) for log in logs if 'log:' in log.lower() or 'instruction:' in log.lower()]
|
|
69
|
-
def get_instruction_accounts(instruction,txnData):
|
|
70
|
-
accounts = get_all_account_keys(txnData)
|
|
71
|
-
return [accounts[index] for index in instruction.get('accounts',[]) if index < len(accounts)]
|
|
72
|
-
def get_instruction_info(instruction,txnData,instruction_index=0):
|
|
73
|
-
|
|
74
|
-
stack_height = instruction.get('stackHeight') or 1
|
|
75
|
-
accounts = instruction.get('accounts',[])
|
|
76
|
-
associatedAccounts = get_instruction_accounts(instruction,txnData)
|
|
77
|
-
instruction_info = {'instruction_index':instruction_index,'accounts':accounts,'associatedAccounts':associatedAccounts,'instructionStackHeight':stack_height}
|
|
78
|
-
|
|
79
|
-
instruction_info.update(get_for_program_ids_info(txnData)[instruction_index])
|
|
80
|
-
return instruction_info
|
|
81
|
-
def process_instructions(instructions,txnData,start_index=1):
|
|
82
|
-
catalog = []
|
|
83
|
-
for i, inst in enumerate(instructions):
|
|
84
|
-
instruction_index = start_index-1 + i
|
|
85
|
-
instruction_info = get_instruction_info(inst,txnData,instruction_index)
|
|
86
|
-
catalog.append(instruction_info)
|
|
87
|
-
return catalog
|
|
88
|
-
def get_instructions_catalog(txnData,printIt=False,saveIt=False):
|
|
89
|
-
instructions = get_instructions_from_txn(txnData)
|
|
90
|
-
outer_instructions_catalog = process_instructions(instructions,txnData)
|
|
91
|
-
inner_instructions = get_inner_instructions_from_txn(txnData)
|
|
92
|
-
if inner_instructions:
|
|
93
|
-
inner_instructions_catalog = process_instructions(inner_instructions,txnData,start_index=len(instructions))
|
|
94
|
-
complete_catalog = outer_instructions_catalog+inner_instructions_catalog
|
|
95
|
-
if printIt:
|
|
96
|
-
pprint.pprint(complete_catalog)
|
|
97
|
-
if saveIt:
|
|
98
|
-
with open(saveIt, 'w') as f:
|
|
99
|
-
json.dump(complete_catalog, f, indent=4)
|
|
100
|
-
return complete_catalog
|
|
101
|
-
|
|
102
|
-
def find_in_catalog(string,txnData,programId=None):
|
|
103
|
-
complete_catalog = get_instructions_catalog(txnData)
|
|
104
|
-
return [txn for txn in complete_catalog if [event for event in txn['events'] if string.lower() in event.lower()]]
|
|
105
|
-
def findKeyValueIdInCatalog(key,value,txnData,programId=None):
|
|
106
|
-
complete_catalog = get_instructions_catalog(txnData)
|
|
107
|
-
if programId:
|
|
108
|
-
complete_catalog = findKeyValueIdInCatalog('programId',programId,txnData)
|
|
109
|
-
return [txn for txn in make_list(complete_catalog) if txn.get(key) == value]
|
|
110
|
-
def find_account_in_catalog(account,catalog):
|
|
111
|
-
return ifListGetSection([txn for txn in make_list(catalog) if account in txn.get('associatedAccounts')])
|
|
112
|
-
def associate_logs_with_instructions(txnData):
|
|
113
|
-
accountKeys = get_all_account_keys(txnData)
|
|
114
|
-
instructions = txnData['transaction']['message']['instructions']
|
|
115
|
-
innerInstructions = txnData['meta']['innerInstructions'][0]['instructions']
|
|
116
|
-
allLogs = txnData['meta']['logMessages']
|
|
117
|
-
for logIndex,log in enumerate(allLogs):
|
|
118
|
-
log_programId = log['programId']
|
|
119
|
-
log_stackHeight = log.get('stackHeight') # Default to 0 if stackHeight is missing
|
|
120
|
-
# Search for matching instructions by programId and stackHeight
|
|
121
|
-
for instIndex,allInstruction in enumerate([instructions,innerInstructions]):
|
|
122
|
-
for i,instruction in enumerate(allInstruction):
|
|
123
|
-
program_id_index = instruction.get('programIdIndex')
|
|
124
|
-
if program_id_index is not None:
|
|
125
|
-
instruction_program_id = accountKeys[program_id_index]
|
|
126
|
-
instruction_stack_height = instruction.get('stackHeight', 1)
|
|
127
|
-
if instruction_program_id == log_programId and instruction_stack_height == log_stackHeight:
|
|
128
|
-
# Add log data to the matching instruction
|
|
129
|
-
instruction.update(log)
|
|
130
|
-
instruction['associatedAccounts'] = [accountKeys[index] for index in instruction['accounts']]
|
|
131
|
-
if instIndex == 0:
|
|
132
|
-
instructions[i] = instruction
|
|
133
|
-
else:
|
|
134
|
-
innerInstructions[i] = instruction
|
|
135
|
-
allLogs[logIndex].update(instruction)
|
|
136
|
-
txnData['transaction']['message']['instructions'] = instructions
|
|
137
|
-
txnData['meta']['innerInstructions'][0]['instructions'] = innerInstructions
|
|
138
|
-
txnData['meta']['logMessages'] = allLogs
|
|
139
|
-
return txnData
|
|
140
|
-
def update_initial_txnData(txnData):
|
|
141
|
-
accountKeys = get_all_account_keys(txnData)
|
|
142
|
-
txnData = update_balance_data(txnData)
|
|
143
|
-
txnData['transaction']['message']['instructions'] = [{**inst,"instructionIndex":instIndex,"programId":accountKeys[inst.get('programIdIndex')],"stackHeight":inst.get('stackHeight', 1),"associatedAccounts":[accountKeys[index] for index in inst['accounts']]} for instIndex,inst in enumerate(txnData['transaction']['message']['instructions'])]
|
|
144
|
-
txnData['meta']['innerInstructions'][0]['instructions'] = [{**inst,"instructionIndex":instIndex+len(txnData['transaction']['message']['instructions']),"programId":accountKeys[inst.get('programIdIndex')],"stackHeight":inst.get('stackHeight', 1),"associatedAccounts":[accountKeys[index] for index in inst['accounts']]} for instIndex,inst in enumerate(txnData['meta']['innerInstructions'][0]['instructions'])]
|
|
145
|
-
txnData['meta']['logMessages'] = get_all_logs(txnData)
|
|
146
|
-
return txnData
|
|
147
|
-
def get_for_program_ids_info(txnData):
|
|
148
|
-
txnData = update_initial_txnData(txnData)
|
|
149
|
-
txnData = associate_logs_with_instructions(txnData)
|
|
150
|
-
return txnData
|
abstract_solana/price_utils.py
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
from .signature_data_parse import get_account_keys_from_txn,get_post_balances_from_txn,get_pre_balances_from_txn,get_post_token_balances_from_txn,get_pre_token_balances_from_txn
|
|
2
|
-
from .account_key_utils import get_all_account_keys
|
|
3
|
-
from .index_utils import search_for_account_index
|
|
4
|
-
from abstract_utilities import exponential,get_any_value,update_dict_value,get_value_from_path,find_paths_to_key
|
|
5
|
-
|
|
6
|
-
def get_amount_dict(amount,decimals=9):
|
|
7
|
-
if amount!= None:
|
|
8
|
-
if isinstance(amount,dict):
|
|
9
|
-
amount_dict = get_any_value(amount,'uiTokenAmount')
|
|
10
|
-
amount = get_any_value(amount_dict,'amount')
|
|
11
|
-
decimals = get_any_value(amount_dict,'decimals')
|
|
12
|
-
return exponential(amount,decimals,-1)
|
|
13
|
-
def create_token_txns(txnData):
|
|
14
|
-
preTokenBalances = get_pre_token_balances_from_txn(txnData)
|
|
15
|
-
postTokenBalances = get_post_token_balances_from_txn(txnData)
|
|
16
|
-
account_keys = get_all_account_keys(txnData)
|
|
17
|
-
pre_post_balances = {"preTokenBalances":preTokenBalances,"postTokenBalances":postTokenBalances}
|
|
18
|
-
dont_use = []
|
|
19
|
-
all_txns = {"accounts":[],"owner":[],'Balance Before':[],"Balance After":[],"Change":[],"mint":[],"balanceIndexs":[]}
|
|
20
|
-
for key,tokenBalances in pre_post_balances.items():
|
|
21
|
-
for i,tokenBalance in enumerate(tokenBalances):
|
|
22
|
-
index = tokenBalance.get('accountIndex')
|
|
23
|
-
if index not in dont_use:
|
|
24
|
-
dont_use.append(index)
|
|
25
|
-
after = get_amount_dict(search_for_account_index(postTokenBalances,index))
|
|
26
|
-
change = get_amount_dict(tokenBalance)
|
|
27
|
-
if after!=None and change !=None:
|
|
28
|
-
before = after-change
|
|
29
|
-
if i == 0:
|
|
30
|
-
pre_change = change
|
|
31
|
-
change = before
|
|
32
|
-
before = pre_change
|
|
33
|
-
all_txns["accounts"].append(account_keys[index])
|
|
34
|
-
all_txns["owner"].append(tokenBalance.get('owner'))
|
|
35
|
-
all_txns['Balance Before'].append(before)
|
|
36
|
-
all_txns["Balance After"].append(after)
|
|
37
|
-
all_txns["Change"].append(change)
|
|
38
|
-
all_txns["mint"].append(tokenBalance.get('mint'))
|
|
39
|
-
all_txns["balanceIndexs"].append(find_paths_to_key(txnData, key)[0]+[i])
|
|
40
|
-
return all_txns
|
|
41
|
-
def get_solana_balances(txnData):
|
|
42
|
-
balance = []
|
|
43
|
-
preBalances = get_pre_balances_from_txn(txnData)
|
|
44
|
-
postBalances = get_post_balances_from_txn(txnData)
|
|
45
|
-
account_keys = get_all_account_keys(txnData)
|
|
46
|
-
all_txns = {"accounts":[],'Balance Before':[],"Balance After":[],"Change":[]}
|
|
47
|
-
for i, amt in enumerate(preBalances):
|
|
48
|
-
before = exponential(amt, 9,-1)
|
|
49
|
-
after = exponential(postBalances[i], 9,-1)
|
|
50
|
-
address = account_keys[i]
|
|
51
|
-
change = after - before
|
|
52
|
-
all_txns['accounts'].append(address)
|
|
53
|
-
all_txns['Balance Before'].append(before)
|
|
54
|
-
all_txns['Balance After'].append(after)
|
|
55
|
-
all_txns['Change'].append(change)
|
|
56
|
-
return all_txns
|
|
57
|
-
def get_balances(txnData):
|
|
58
|
-
balances = {"solana":{},"tokens":{}}
|
|
59
|
-
solanaTxns = get_solana_balances(txnData)
|
|
60
|
-
tokenTxns = create_token_txns(txnData)
|
|
61
|
-
for i,address in enumerate(solanaTxns["accounts"]):
|
|
62
|
-
balances["solana"][address]={"Balance Before":solanaTxns["Balance Before"][i],"Balance After":solanaTxns["Balance After"][i],"Change":solanaTxns["Change"][i]}
|
|
63
|
-
for i,address in enumerate(tokenTxns["accounts"]):
|
|
64
|
-
before = tokenTxns["Balance Before"][i]
|
|
65
|
-
after = tokenTxns["Balance After"][i]
|
|
66
|
-
change = after - before
|
|
67
|
-
balances["tokens"][address]={"Balance Before":before,"Balance After":after,"Change":change,"mint":tokenTxns["mint"][i],"owner":tokenTxns["owner"][i],"balanceIndex":tokenTxns["balanceIndexs"][i]}
|
|
68
|
-
return balances
|
|
69
|
-
def update_balance_data(txnData):
|
|
70
|
-
balances = get_balances(txnData)
|
|
71
|
-
all_txns = create_token_txns(txnData)
|
|
72
|
-
for key,values in balances["tokens"].items():
|
|
73
|
-
path =values.get("balanceIndex")
|
|
74
|
-
tokenBalance = get_value_from_path(txnData,path)
|
|
75
|
-
tokenBalance.update({key:values.get(key) for key in ["Balance Before","Balance After","Change"]})
|
|
76
|
-
signature_data = update_dict_value(txnData, path, tokenBalance)
|
|
77
|
-
txnData['meta']['balances']=balances
|
|
78
|
-
return txnData
|
abstract_solana/pubkey_utils.py
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
from solders.pubkey import Pubkey
|
|
2
|
-
from solders.signature import Signature
|
|
3
|
-
from spl.token.instructions import get_associated_token_address
|
|
4
|
-
TOKEN_PROGRAM_ID = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
|
|
5
|
-
|
|
6
|
-
def pubkey_find_program_address(string,address,programId):
|
|
7
|
-
return Pubkey.find_program_address([str(string).encode(), bytes(get_pubkey(address))],get_pubkey(programId))
|
|
8
|
-
|
|
9
|
-
def get_pubString(obj):
|
|
10
|
-
return Pubkey.from_string(str(obj))
|
|
11
|
-
|
|
12
|
-
def get_sigString(obj):
|
|
13
|
-
return Signature.from_string(str(obj))
|
|
14
|
-
|
|
15
|
-
def is_sigkey(obj):
|
|
16
|
-
return isinstance(obj,Signature)
|
|
17
|
-
|
|
18
|
-
def is_pubkey(obj):
|
|
19
|
-
return isinstance(obj,Pubkey)
|
|
20
|
-
|
|
21
|
-
def get_pubBytes(obj):
|
|
22
|
-
return Pubkey.from_bytes(obj)
|
|
23
|
-
|
|
24
|
-
def get_sigBytes(obj):
|
|
25
|
-
return Signature.from_bytes(obj)
|
|
26
|
-
|
|
27
|
-
def try_pubkey(obj):
|
|
28
|
-
return is_pubkey(get_pubkey(obj))
|
|
29
|
-
|
|
30
|
-
def try_sigkey(obj):
|
|
31
|
-
return is_sigkey(get_sigkey(obj))
|
|
32
|
-
|
|
33
|
-
def get_pubkey(obj):
|
|
34
|
-
if is_pubkey(obj):
|
|
35
|
-
return obj
|
|
36
|
-
address = obj
|
|
37
|
-
if isinstance(obj,bytes):
|
|
38
|
-
pubkey = get_pubBytes(address)
|
|
39
|
-
if is_pubkey(pubkey):
|
|
40
|
-
return pubkey
|
|
41
|
-
if isinstance(obj,str):
|
|
42
|
-
try:
|
|
43
|
-
pubkey= get_pubString(obj)
|
|
44
|
-
except:
|
|
45
|
-
pubkey = obj
|
|
46
|
-
if is_pubkey(pubkey):
|
|
47
|
-
return pubkey
|
|
48
|
-
return obj
|
|
49
|
-
|
|
50
|
-
def get_sigkey(obj):
|
|
51
|
-
if is_sigkey(obj):
|
|
52
|
-
return obj
|
|
53
|
-
signature = obj
|
|
54
|
-
if isinstance(signature,bytes):
|
|
55
|
-
sigKey = get_sigBytes(signature)
|
|
56
|
-
if is_sigkey(sigKey):
|
|
57
|
-
return sigKey
|
|
58
|
-
if isinstance(signature,str):
|
|
59
|
-
try:
|
|
60
|
-
sigKey= get_sigString(signature)
|
|
61
|
-
except:
|
|
62
|
-
sigKey = signature
|
|
63
|
-
if is_sigkey(sigKey):
|
|
64
|
-
return sigKey
|
|
65
|
-
return obj
|
|
66
|
-
|
|
67
|
-
def derive_associated_bonding_curve(mint,programId=None):
|
|
68
|
-
return get_associated_token_address(derive_bonding_curve(mint,programId)[0], get_pubkey(mint))
|
|
69
|
-
|
|
70
|
-
def derive_bonding_curve(mint,programId=None):
|
|
71
|
-
programId = programId or TOKEN_PROGRAM_ID
|
|
72
|
-
return pubkey_find_program_address("bonding-curve",mint,programId)
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import struct,base58,time,requests,asyncio,time
|
|
2
|
-
from typing import Optional,Union
|
|
3
|
-
from solders.hash import Hash
|
|
4
|
-
from solders.keypair import Keypair
|
|
5
|
-
from solders.instruction import Instruction
|
|
6
|
-
from solana.rpc.types import TokenAccountOpts,TxOpts
|
|
7
|
-
from solana.transaction import Transaction
|
|
8
|
-
from abstract_solcatcher import getLatestBlockHash,sendTransaction,getTransaction
|
|
9
|
-
from abstract_utilities import get_any_value
|
|
10
|
-
from ..pubkey_utils import Pubkey,get_pubkey
|
|
11
|
-
from spl.token.instructions import CloseAccountParams,close_account
|
|
12
|
-
from ..constants import TOKEN_PROGRAM_ID_PUBKEY,LAMPORTS_PER_SOL,UNIT_PRICE,UNIT_BUDGET
|
|
13
|
-
from solders.compute_budget import set_compute_unit_limit, set_compute_unit_price
|
|
14
|
-
from .token_utils import get_token_balance,check_existing_token_account,get_token_price
|
|
15
|
-
from .pump_fun_keys import getKeys
|
|
16
|
-
def buildTxn(mint,payer_pubkey, amount, slippage, token_account,sol_in=0,token_price=0,token_balance=0,token_account_instructions=None,close_token_account=False,buy=True):
|
|
17
|
-
# Get keys for the transaction, pass the token account's pubkey instead of the AccountMeta object
|
|
18
|
-
keys = getKeys(mint, token_account=token_account, payer_pubkey=payer_pubkey,buy=buy)
|
|
19
|
-
slippage_adjustment = 1 - (slippage / 100)
|
|
20
|
-
sol_change = sol_in if buy else float(token_balance) * float(token_price)
|
|
21
|
-
sol_change_with_slippage = sol_change * slippage_adjustment
|
|
22
|
-
limit_sol_change = int(sol_change_with_slippage * LAMPORTS_PER_SOL)
|
|
23
|
-
print(f"Max Sol {'Cost' if buy else 'Output'}:", sol_change_with_slippage)
|
|
24
|
-
hex_data = bytes.fromhex("66063d1201daebea" if buy else "33e685a4017f83ad")
|
|
25
|
-
data = bytearray()
|
|
26
|
-
data.extend(hex_data)
|
|
27
|
-
data.extend(struct.pack('<Q', amount))
|
|
28
|
-
data.extend(struct.pack('<Q', limit_sol_change))
|
|
29
|
-
swap_instruction = Instruction(PUMP_FUN_PROGRAM_PUBKEY, bytes(data), keys)
|
|
30
|
-
blockHash = getLatestBlockHash(commitment="processed")
|
|
31
|
-
recent_blockhash = get_any_value(blockHash,'blockhash')
|
|
32
|
-
recent_blockhash = Hash.from_string(recent_blockhash)
|
|
33
|
-
txn = Transaction(recent_blockhash=recent_blockhash, fee_payer=payer_pubkey)
|
|
34
|
-
txn.add(set_compute_unit_price(UNIT_PRICE))
|
|
35
|
-
txn.add(set_compute_unit_limit(UNIT_BUDGET))
|
|
36
|
-
if buy and token_account_instructions:
|
|
37
|
-
txn.add(token_account_instructions)
|
|
38
|
-
txn.add(swap_instruction)
|
|
39
|
-
if buy == False and close_token_account:
|
|
40
|
-
close_account_instructions = close_account(CloseAccountParams(PUMP_FUN_PROGRAM_PUBKEY, token_account_pubkey, payer_pubkey, payer_pubkey))
|
|
41
|
-
txn.add(close_account_instructions)
|
|
42
|
-
return txn
|
|
43
|
-
|
|
44
|
-
def get_all_buy_sell_info(mint,payer_pubkey,token_balance=None,sol_in=0,buy=True):
|
|
45
|
-
|
|
46
|
-
print("Owner Public Key:", payer_pubkey)
|
|
47
|
-
mint_str = str(mint)
|
|
48
|
-
if not get_pubkey(mint_str).is_on_curve():
|
|
49
|
-
print('Mint public key is not on curve')
|
|
50
|
-
return False,amount,token_balance,token_price,token_account,token_account_instructions
|
|
51
|
-
mint_pubkey = get_pubkey(mint_str)
|
|
52
|
-
token_account, token_account_instructions = check_existing_token_account(payer_pubkey, mint_pubkey)
|
|
53
|
-
token_account_pubkey = get_pubkey(token_account)
|
|
54
|
-
# Ensure the token_account is a valid Pubkey
|
|
55
|
-
if not isinstance(token_account_pubkey, Pubkey):
|
|
56
|
-
print("Failed to create or retrieve a valid token account Pubkey...")
|
|
57
|
-
return False,amount,token_balance,token_price,token_account,token_account_instructions
|
|
58
|
-
print("Token Account:", token_account)
|
|
59
|
-
if not token_account:
|
|
60
|
-
print("Failed to retrieve or create token account.")
|
|
61
|
-
return False,amount,token_balance,token_price,token_account,token_account_instructions
|
|
62
|
-
# Calculate token price
|
|
63
|
-
token_price = get_token_price(mint_str)
|
|
64
|
-
print(f"Token Price: {token_price:.20f} SOL")
|
|
65
|
-
amount = int(LAMPORTS_PER_SOL * token_price)
|
|
66
|
-
print("Calculated Amount:", amount)
|
|
67
|
-
if buy == False:
|
|
68
|
-
if token_balance == None:
|
|
69
|
-
token_balance = get_token_balance(token_account,mint_str)
|
|
70
|
-
print("Token Balance:", token_balance)
|
|
71
|
-
if token_balance == 0:
|
|
72
|
-
return False,amount,token_balance,token_price,token_account,token_account_instructions
|
|
73
|
-
return mint,amount,token_balance,token_price,token_account_pubkey,token_account_instructions
|
|
74
|
-
|
|
75
|
-
def pump_fun_sell(mint: str,payer_pubkey:Pubkey, token_balance: Optional[Union[int, float]] = None, slippage: int = 25, close_token_account: bool = True) -> bool:
|
|
76
|
-
mint,amount,token_balance,token_price,token_account,token_account_instructions = get_all_buy_sell_info(mint,payer_pubkey,token_balance=token_balance,buy=False)
|
|
77
|
-
if not mint:
|
|
78
|
-
return mint
|
|
79
|
-
return buildTxn(mint=mint,
|
|
80
|
-
payer_pubkey=payer_pubkey,
|
|
81
|
-
amount=amount,
|
|
82
|
-
slippage=slippage,
|
|
83
|
-
sol_in=0,
|
|
84
|
-
token_balance=token_balance,
|
|
85
|
-
token_price=token_price,
|
|
86
|
-
token_account=token_account,
|
|
87
|
-
token_account_instructions=token_account_instructions,
|
|
88
|
-
buy=False)
|
|
89
|
-
|
|
90
|
-
def pump_fun_buy(mint: str,payer_pubkey:Pubkey, sol_in: float = 0.001, slippage: int = 25) -> bool:
|
|
91
|
-
mint,amount,token_balance,token_price,token_account,token_account_instructions = get_all_buy_sell_info(mint,payer_pubkey,sol_in=sol_in,buy=True)
|
|
92
|
-
if not mint:
|
|
93
|
-
return mint
|
|
94
|
-
return buildTxn(mint=mint,
|
|
95
|
-
payer_pubkey=payer_pubkey,
|
|
96
|
-
amount=amount,
|
|
97
|
-
slippage=slippage,
|
|
98
|
-
sol_in=sol_in,
|
|
99
|
-
token_balance=0,
|
|
100
|
-
token_price=0,
|
|
101
|
-
token_account=token_account,
|
|
102
|
-
token_account_instructions=token_account_instructions,
|
|
103
|
-
buy=True)
|
|
104
|
-
return True
|
|
105
|
-
async def confirm_txn(txn_sig, max_retries=20, retry_interval=3):
|
|
106
|
-
retries = 0
|
|
107
|
-
while retries < max_retries:
|
|
108
|
-
txn_res = await getTransaction(signature=str(txn_sig))
|
|
109
|
-
if txn_res:
|
|
110
|
-
print(f"\n\nhttps://solscan.io/tx/{str(txn_sig)}")
|
|
111
|
-
return txn_res
|
|
112
|
-
retries += 1
|
|
113
|
-
print(f"Retrying... ({retries}/{max_retries})")
|
|
114
|
-
await asyncio.sleep(retry_interval)
|
|
115
|
-
print(f"Failed to confirm transaction after {max_retries} attempts.")
|
|
116
|
-
return txn_sig
|
|
117
|
-
|
|
118
|
-
async def complete_txn(txn, payer_keypair,confirm=False):
|
|
119
|
-
txn_sig = await sendTransaction(txn=txn, payer_keypair=payer_keypair, skip_preflight=True) # Await this async call
|
|
120
|
-
print("Transaction Signature", txn_sig)
|
|
121
|
-
if confirm == False:
|
|
122
|
-
return txn_sig
|
|
123
|
-
confirm = await confirm_txn(txn_sig) # Await confirmation
|
|
124
|
-
|
|
125
|
-
while not confirm:
|
|
126
|
-
print("Waiting for transaction confirmation...")
|
|
127
|
-
await asyncio.sleep(1) # Use asyncio.sleep instead of time.sleep to avoid blocking
|
|
128
|
-
confirm = await confirm_txn(txn_sig) # Await confirmation check again
|
|
129
|
-
|
|
130
|
-
print("Transaction confirmed:", confirm)
|
|
131
|
-
return confirm
|
|
132
|
-
def buy_pump(mint: str, payer_keypair: Pubkey, sol_in=None, slippage=None,confirm=False):
|
|
133
|
-
sol_in = sol_in or 0.001
|
|
134
|
-
slippage = slippage or 25
|
|
135
|
-
payer_pubkey = get_pubkey(payer_keypair.pubkey())
|
|
136
|
-
txn = pump_fun_buy(mint=mint, payer_pubkey=payer_pubkey, sol_in=sol_in, slippage=slippage)
|
|
137
|
-
completed = asyncio.run(complete_txn(txn, payer_keypair,confirm=confirm)) # Await here since `complete_txn` is async
|
|
138
|
-
if not completed:
|
|
139
|
-
print("Buy transaction failed")
|
|
140
|
-
return completed
|
|
141
|
-
|
|
142
|
-
def sell_pump(mint:str, payer_keypair:Pubkey, token_balance=None, slippage=None,confirm=False):
|
|
143
|
-
slippage = slippage or 25
|
|
144
|
-
payer_pubkey = get_pubkey(payer_keypair.pubkey())
|
|
145
|
-
txn = pump_fun_sell(mint=mint, payer_pubkey=payer_pubkey, token_balance=token_balance, slippage=slippage)
|
|
146
|
-
completed = asyncio.run(complete_txn(txn, payer_keypair,confirm=confirm))
|
|
147
|
-
if not completed:
|
|
148
|
-
print("sell transaction failed")
|
|
149
|
-
return completed
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
from .pubkey_utils import Pubkey,get_pubkey,derive_bonding_curve,derive_associated_bonding_curve
|
|
2
|
-
from .log_message_functions import get_for_program_ids_info
|
|
3
|
-
from spl.token.instructions import create_associated_token_account, get_associated_token_address
|
|
4
|
-
from abstract_solcatcher import getGenesisSignature,getTransaction,getAccountInfo
|
|
5
|
-
from construct import Padding, Struct, Int64ul, Flag
|
|
6
|
-
import base64
|
|
7
|
-
from ..constants import (PUMP_FUN_GLOBAL_PUBKEY,
|
|
8
|
-
PUMP_FUN_FEE_RECIPIENT_PUBKEY,
|
|
9
|
-
SYSTEM_PROGRAM_PUBKEY,
|
|
10
|
-
PUMP_FUN_EVENT_AUTHORITY_PUBKEY,
|
|
11
|
-
PUMP_FUN_PROGRAM_PUBKEY,
|
|
12
|
-
TOKEN_PROGRAM_ID_PUBKEY,
|
|
13
|
-
RENT_PUBKEY,
|
|
14
|
-
PUMP_FUN_ASSOC_TOKEN_ACC_PROG_PUBKEY)
|
|
15
|
-
|
|
16
|
-
# Change dictionary keys to lowercase and replace spaces with underscores
|
|
17
|
-
def change_keys_lower(dict_obj):
|
|
18
|
-
new_dict = {}
|
|
19
|
-
for key, value in dict_obj.items():
|
|
20
|
-
new_dict[key.lower().replace(' ', '_')] = value
|
|
21
|
-
return new_dict
|
|
22
|
-
|
|
23
|
-
# Predefined map for different transaction types
|
|
24
|
-
def get_create_map():
|
|
25
|
-
return [
|
|
26
|
-
{'instruction_number': '1', 'instruction_name': 'Mint', 'token_address': 'AkAUSJg1v9xYT3HUxdALH7NsrC6owmwoZuP9MLw8fxTL', 'token_name': '3CAT'},
|
|
27
|
-
{'instruction_number': '2', 'instruction_name': 'Mint Authority', 'token_address': 'TSLvdd1pWpHVjahSpsvCXUbgwsL3JAcvokwaKt1eokM', 'token_name': 'Pump.fun Token Mint Authority'},
|
|
28
|
-
{'instruction_number': '3', 'instruction_name': 'Bonding Curve', 'token_address': '9nhxvNxfSUaJddVco6oa6NodtsCscqCScp6UU1hZkfGm', 'token_name': 'Pump.fun (3CAT) Bonding Curve'},
|
|
29
|
-
{'instruction_number': '4', 'instruction_name': 'Associated Bonding Curve', 'token_address': '889XLp3qvVAHpTYQmhn6cBpYSppV8Gi8E2Rgp9RH2vRy', 'token_name': 'Pump.fun (3CAT) Vault'},
|
|
30
|
-
{'instruction_number': '5', 'instruction_name': 'Global', 'token_address': '4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf', 'token_name': '4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf'},
|
|
31
|
-
{'instruction_number': '6', 'instruction_name': 'Mpl Token Metadata', 'token_address': 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', 'token_name': 'Metaplex Token Metadata'},
|
|
32
|
-
{'instruction_number': '7', 'instruction_name': 'Metadata', 'token_address': 'CH41RxpjSXHqr1vfLTVYJMsfNs2fBCCWoAE13tPihXh7', 'token_name': 'CH41RxpjSXHqr1vfLTVYJMsfNs2fBCCWoAE13tPihXh7'},
|
|
33
|
-
{'instruction_number': '8', 'instruction_name': 'User', 'token_address': 'Fuy5MvbgzjSok1U8hH6mUY6WnLynzUextDxfEWMiTkn4', 'token_name': 'Fuy5MvbgzjSok1U8hH6mUY6WnLynzUextDxfEWMiTkn4'},
|
|
34
|
-
{'instruction_number': '9', 'instruction_name': 'System Program', 'token_address': '11111111111111111111111111111111', 'token_name': 'System Program'},
|
|
35
|
-
{'instruction_number': '10', 'instruction_name': 'Token Program', 'token_address': 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', 'token_name': 'Token Program'},
|
|
36
|
-
{'instruction_number': '11', 'instruction_name': 'Associated Token Program', 'token_address': 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', 'token_name': 'Associated Token Account Program'},
|
|
37
|
-
{'instruction_number': '12', 'instruction_name': 'Rent', 'token_address': 'SysvarRent111111111111111111111111111111111', 'token_name': 'Rent Program'},
|
|
38
|
-
{'instruction_number': '13', 'instruction_name': 'Event Authority', 'token_address': 'Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1', 'token_name': 'Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1'},
|
|
39
|
-
{'instruction_number': '14', 'instruction_name': 'Program', 'token_address': '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P', 'token_name': 'Pump.fun'}
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
# Fetches and organizes transaction types based on provided mint
|
|
43
|
-
def getTxnTypes(mint):
|
|
44
|
-
bonding_curve = str(derive_bonding_curve(mint)[0])
|
|
45
|
-
bonding_curve_signature = getGenesisSignature(address=bonding_curve)
|
|
46
|
-
txn_data = getTransaction(signature=bonding_curve_signature)
|
|
47
|
-
txn_data = get_for_program_ids_info(txn_data)
|
|
48
|
-
|
|
49
|
-
for new_map in get_create_map():
|
|
50
|
-
instructions = txn_data['transaction']['message']['instructions']
|
|
51
|
-
inner_instructions = txn_data['meta']['innerInstructions'][0]['instructions']
|
|
52
|
-
all_instructions = instructions + inner_instructions
|
|
53
|
-
|
|
54
|
-
instruction = [inst for inst in all_instructions if len(inst.get('associatedAccounts', [])) > 13]
|
|
55
|
-
|
|
56
|
-
txn_types = {create_index['instruction_name']: instruction[0]['associatedAccounts'][int(create_index['instruction_number']) - 1] for create_index in get_create_map()}
|
|
57
|
-
|
|
58
|
-
if txn_types:
|
|
59
|
-
txn_types['signature'] = bonding_curve_signature
|
|
60
|
-
break
|
|
61
|
-
return txn_types
|
|
62
|
-
|
|
63
|
-
# Retrieve virtual reserves for a bonding curve using a structured layout
|
|
64
|
-
def get_virtual_reserves(bonding_curve: Pubkey):
|
|
65
|
-
bonding_curve_struct = Struct(
|
|
66
|
-
Padding(8),
|
|
67
|
-
"virtualTokenReserves" / Int64ul,
|
|
68
|
-
"virtualSolReserves" / Int64ul,
|
|
69
|
-
"realTokenReserves" / Int64ul,
|
|
70
|
-
"realSolReserves" / Int64ul,
|
|
71
|
-
"tokenTotalSupply" / Int64ul,
|
|
72
|
-
"complete" / Flag
|
|
73
|
-
)
|
|
74
|
-
account_info = getAccountInfo(account=str(bonding_curve[0]))
|
|
75
|
-
|
|
76
|
-
if not account_info or 'value' not in account_info or 'data' not in account_info['value']:
|
|
77
|
-
print("Failed to retrieve account info.")
|
|
78
|
-
return None
|
|
79
|
-
|
|
80
|
-
data_base64 = account_info['value']['data'][0]
|
|
81
|
-
data = base64.b64decode(data_base64)
|
|
82
|
-
parsed_data = bonding_curve_struct.parse(data)
|
|
83
|
-
return parsed_data
|
|
84
|
-
|
|
85
|
-
# Retrieves comprehensive transaction and reserve data for the mint
|
|
86
|
-
def get_pump_fun_data(mint_str: str):
|
|
87
|
-
txn_types = change_keys_lower(getTxnTypes(mint_str))
|
|
88
|
-
bonding_curve = derive_bonding_curve(mint_str)
|
|
89
|
-
virtual_reserves = get_virtual_reserves(bonding_curve)
|
|
90
|
-
if virtual_reserves is None:
|
|
91
|
-
return None
|
|
92
|
-
|
|
93
|
-
txn_types.update({
|
|
94
|
-
"mint": mint_str,
|
|
95
|
-
"bonding_curve": str(bonding_curve[0]),
|
|
96
|
-
"associated_bonding_curve": str(derive_associated_bonding_curve(mint_str)),
|
|
97
|
-
"virtual_token_reserves": int(virtual_reserves.virtualTokenReserves),
|
|
98
|
-
"virtual_sol_reserves": int(virtual_reserves.virtualSolReserves),
|
|
99
|
-
"token_total_supply": int(virtual_reserves.tokenTotalSupply),
|
|
100
|
-
"complete": bool(virtual_reserves.complete)
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
return txn_types
|
|
104
|
-
|
|
105
|
-
def getKeys(mint_str,token_account,payer_pubkey,buy=True):
|
|
106
|
-
coin_data = get_pump_fun_data(str(mint_str))
|
|
107
|
-
MINT = get_pubkey(mint_str)
|
|
108
|
-
BONDING_CURVE = get_pubkey(coin_data['bonding_curve'])
|
|
109
|
-
ASSOCIATED_BONDING_CURVE = get_pubkey(coin_data['associated_bonding_curve'])
|
|
110
|
-
ASSOCIATED_USER = get_pubkey(token_account)
|
|
111
|
-
USER = get_pubkey(payer_pubkey)
|
|
112
|
-
PUMP_FUN_TOKEN_PROGRAM_SWITCH = TOKEN_PROGRAM_ID_PUBKEY if buy else PUMP_FUN_ASSOC_TOKEN_ACC_PROG_PUBKEY
|
|
113
|
-
PUMP_FUN_RENT_PROGRAM_SWITCH = RENT_PUBKEY if buy else TOKEN_PROGRAM_ID_PUBKEY
|
|
114
|
-
# Build account key list
|
|
115
|
-
keys = [
|
|
116
|
-
AccountMeta(pubkey=PUMP_FUN_GLOBAL_PUBKEY, is_signer=False, is_writable=False),
|
|
117
|
-
AccountMeta(pubkey=PUMP_FUN_FEE_RECIPIENT_PUBKEY, is_signer=False, is_writable=True),
|
|
118
|
-
AccountMeta(pubkey=MINT, is_signer=False, is_writable=False),
|
|
119
|
-
AccountMeta(pubkey=BONDING_CURVE, is_signer=False, is_writable=True),
|
|
120
|
-
AccountMeta(pubkey=ASSOCIATED_BONDING_CURVE, is_signer=False, is_writable=True),
|
|
121
|
-
AccountMeta(pubkey=ASSOCIATED_USER, is_signer=False, is_writable=True),
|
|
122
|
-
AccountMeta(pubkey=USER, is_signer=True, is_writable=True),
|
|
123
|
-
AccountMeta(pubkey=SYSTEM_PROGRAM_PUBKEY, is_signer=False, is_writable=False),
|
|
124
|
-
AccountMeta(pubkey=PUMP_FUN_TOKEN_PROGRAM_SWITCH, is_signer=False, is_writable=False),
|
|
125
|
-
AccountMeta(pubkey=PUMP_FUN_RENT_PROGRAM_SWITCH, is_signer=False, is_writable=False),
|
|
126
|
-
AccountMeta(pubkey=PUMP_FUN_EVENT_AUTHORITY_PUBKEY, is_signer=False, is_writable=False),
|
|
127
|
-
AccountMeta(pubkey=PUMP_FUN_PROGRAM_PUBKEY, is_signer=False, is_writable=False)
|
|
128
|
-
]
|
|
129
|
-
return keys
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
from ..pubkey_utils import Pubkey,get_pubkey,derive_bonding_curve,derive_associated_bonding_curve
|
|
2
|
-
from ..log_message_functions import get_for_program_ids_info
|
|
3
|
-
from spl.token.instructions import create_associated_token_account, get_associated_token_address
|
|
4
|
-
from abstract_solcatcher import getGenesisSignature,getTransaction,getAccountInfo
|
|
5
|
-
from construct import Padding, Struct, Int64ul, Flag
|
|
6
|
-
from solana.transaction import AccountMeta, Transaction
|
|
7
|
-
import base64
|
|
8
|
-
from ..constants import (PUMP_FUN_GLOBAL_PUBKEY,
|
|
9
|
-
PUMP_FUN_FEE_RECIPIENT_PUBKEY,
|
|
10
|
-
SYSTEM_PROGRAM_PUBKEY,
|
|
11
|
-
PUMP_FUN_EVENT_AUTHORITY_PUBKEY,
|
|
12
|
-
PUMP_FUN_PROGRAM_PUBKEY,
|
|
13
|
-
TOKEN_PROGRAM_ID_PUBKEY,
|
|
14
|
-
RENT_PUBKEY,
|
|
15
|
-
PUMP_FUN_ASSOC_TOKEN_ACC_PROG_PUBKEY)
|
|
16
|
-
|
|
17
|
-
# Change dictionary keys to lowercase and replace spaces with underscores
|
|
18
|
-
def change_keys_lower(dict_obj):
|
|
19
|
-
new_dict = {}
|
|
20
|
-
for key, value in dict_obj.items():
|
|
21
|
-
new_dict[key.lower().replace(' ', '_')] = value
|
|
22
|
-
return new_dict
|
|
23
|
-
|
|
24
|
-
# Predefined map for different transaction types
|
|
25
|
-
def get_create_map():
|
|
26
|
-
return [
|
|
27
|
-
{'instruction_number': '1', 'instruction_name': 'Mint', 'token_address': 'AkAUSJg1v9xYT3HUxdALH7NsrC6owmwoZuP9MLw8fxTL', 'token_name': '3CAT'},
|
|
28
|
-
{'instruction_number': '2', 'instruction_name': 'Mint Authority', 'token_address': 'TSLvdd1pWpHVjahSpsvCXUbgwsL3JAcvokwaKt1eokM', 'token_name': 'Pump.fun Token Mint Authority'},
|
|
29
|
-
{'instruction_number': '3', 'instruction_name': 'Bonding Curve', 'token_address': '9nhxvNxfSUaJddVco6oa6NodtsCscqCScp6UU1hZkfGm', 'token_name': 'Pump.fun (3CAT) Bonding Curve'},
|
|
30
|
-
{'instruction_number': '4', 'instruction_name': 'Associated Bonding Curve', 'token_address': '889XLp3qvVAHpTYQmhn6cBpYSppV8Gi8E2Rgp9RH2vRy', 'token_name': 'Pump.fun (3CAT) Vault'},
|
|
31
|
-
{'instruction_number': '5', 'instruction_name': 'Global', 'token_address': '4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf', 'token_name': '4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf'},
|
|
32
|
-
{'instruction_number': '6', 'instruction_name': 'Mpl Token Metadata', 'token_address': 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', 'token_name': 'Metaplex Token Metadata'},
|
|
33
|
-
{'instruction_number': '7', 'instruction_name': 'Metadata', 'token_address': 'CH41RxpjSXHqr1vfLTVYJMsfNs2fBCCWoAE13tPihXh7', 'token_name': 'CH41RxpjSXHqr1vfLTVYJMsfNs2fBCCWoAE13tPihXh7'},
|
|
34
|
-
{'instruction_number': '8', 'instruction_name': 'User', 'token_address': 'Fuy5MvbgzjSok1U8hH6mUY6WnLynzUextDxfEWMiTkn4', 'token_name': 'Fuy5MvbgzjSok1U8hH6mUY6WnLynzUextDxfEWMiTkn4'},
|
|
35
|
-
{'instruction_number': '9', 'instruction_name': 'System Program', 'token_address': '11111111111111111111111111111111', 'token_name': 'System Program'},
|
|
36
|
-
{'instruction_number': '10', 'instruction_name': 'Token Program', 'token_address': 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', 'token_name': 'Token Program'},
|
|
37
|
-
{'instruction_number': '11', 'instruction_name': 'Associated Token Program', 'token_address': 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', 'token_name': 'Associated Token Account Program'},
|
|
38
|
-
{'instruction_number': '12', 'instruction_name': 'Rent', 'token_address': 'SysvarRent111111111111111111111111111111111', 'token_name': 'Rent Program'},
|
|
39
|
-
{'instruction_number': '13', 'instruction_name': 'Event Authority', 'token_address': 'Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1', 'token_name': 'Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1'},
|
|
40
|
-
{'instruction_number': '14', 'instruction_name': 'Program', 'token_address': '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P', 'token_name': 'Pump.fun'}
|
|
41
|
-
]
|
|
42
|
-
|
|
43
|
-
def get_txnTypesFromGenesisSignature(genesisSignature,commitment="finalized"):
|
|
44
|
-
txn_data = getTransaction(genesisSignature,commitment=commitment)
|
|
45
|
-
txn_data = get_for_program_ids_info(txn_data)
|
|
46
|
-
for new_map in get_create_map():
|
|
47
|
-
instructions = txn_data['transaction']['message']['instructions']
|
|
48
|
-
inner_instructions = txn_data['meta']['innerInstructions'][0]['instructions']
|
|
49
|
-
all_instructions = instructions + inner_instructions
|
|
50
|
-
instruction = [inst for inst in all_instructions if len(inst.get('associatedAccounts', [])) > 13]
|
|
51
|
-
txn_types = {create_index['instruction_name']: instruction[0]['associatedAccounts'][int(create_index['instruction_number']) - 1] for create_index in get_create_map()}
|
|
52
|
-
if txn_types:
|
|
53
|
-
txn_types['signature'] = genesisSignature
|
|
54
|
-
break
|
|
55
|
-
return txn_types
|
|
56
|
-
|
|
57
|
-
# Fetches and organizes transaction types based on provided mint
|
|
58
|
-
def getTxnTypes(mint):
|
|
59
|
-
bonding_curve = str(derive_bonding_curve(mint)[0])
|
|
60
|
-
bonding_curve_signature = getGenesisSignature(address=bonding_curve)
|
|
61
|
-
return get_txnTypesFromGenesisSignature(bonding_curve_signature)
|
|
62
|
-
# Retrieve virtual reserves for a bonding curve using a structured layout
|
|
63
|
-
def get_virtual_reserves(bonding_curve: Pubkey):
|
|
64
|
-
bonding_curve_struct = Struct(
|
|
65
|
-
Padding(8),
|
|
66
|
-
"virtualTokenReserves" / Int64ul,
|
|
67
|
-
"virtualSolReserves" / Int64ul,
|
|
68
|
-
"realTokenReserves" / Int64ul,
|
|
69
|
-
"realSolReserves" / Int64ul,
|
|
70
|
-
"tokenTotalSupply" / Int64ul,
|
|
71
|
-
"complete" / Flag
|
|
72
|
-
)
|
|
73
|
-
account_info = getAccountInfo(account=str(bonding_curve[0]))
|
|
74
|
-
|
|
75
|
-
if not account_info or 'value' not in account_info or 'data' not in account_info['value']:
|
|
76
|
-
print("Failed to retrieve account info.")
|
|
77
|
-
return None
|
|
78
|
-
|
|
79
|
-
data_base64 = account_info['value']['data'][0]
|
|
80
|
-
data = base64.b64decode(data_base64)
|
|
81
|
-
parsed_data = bonding_curve_struct.parse(data)
|
|
82
|
-
return parsed_data
|
|
83
|
-
|
|
84
|
-
# Retrieves comprehensive transaction and reserve data for the mint
|
|
85
|
-
def get_pump_fun_data(mint_str: str=None,signature=None,commitment="finalized"):
|
|
86
|
-
if mint_str:
|
|
87
|
-
txn_types = change_keys_lower(getTxnTypes(mint_str))
|
|
88
|
-
if signature:
|
|
89
|
-
txn_types = change_keys_lower(get_txnTypesFromGenesisSignature(signature,commitment=commitment))
|
|
90
|
-
mint_str = mint_str or txn_types.get('mint')
|
|
91
|
-
bonding_curve = derive_bonding_curve(mint_str)
|
|
92
|
-
virtual_reserves = get_virtual_reserves(bonding_curve)
|
|
93
|
-
if virtual_reserves is None:
|
|
94
|
-
return None
|
|
95
|
-
|
|
96
|
-
txn_types.update({
|
|
97
|
-
"mint": mint_str,
|
|
98
|
-
"bonding_curve": str(bonding_curve[0]),
|
|
99
|
-
"associated_bonding_curve": str(derive_associated_bonding_curve(mint_str)),
|
|
100
|
-
"virtual_token_reserves": int(virtual_reserves.virtualTokenReserves),
|
|
101
|
-
"virtual_sol_reserves": int(virtual_reserves.virtualSolReserves),
|
|
102
|
-
"token_total_supply": int(virtual_reserves.tokenTotalSupply),
|
|
103
|
-
"complete": bool(virtual_reserves.complete)
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
return txn_types
|
|
107
|
-
|
|
108
|
-
def getKeys(mint_str,token_account,payer_pubkey,buy=True):
|
|
109
|
-
MINT = get_pubkey(str(mint_str))
|
|
110
|
-
bonding_curve = derive_bonding_curve(str(mint_str))
|
|
111
|
-
associated_bonding_curve = derive_associated_bonding_curve(str(mint_str))
|
|
112
|
-
BONDING_CURVE = get_pubkey(str(bonding_curve[0]))
|
|
113
|
-
ASSOCIATED_BONDING_CURVE = get_pubkey(str(associated_bonding_curve))
|
|
114
|
-
ASSOCIATED_USER = Pubkey.from_string(str(token_account))
|
|
115
|
-
USER = Pubkey.from_string(str(payer_pubkey))
|
|
116
|
-
PUMP_FUN_TOKEN_PROGRAM_SWITCH = TOKEN_PROGRAM_ID_PUBKEY if buy else PUMP_FUN_ASSOC_TOKEN_ACC_PROG_PUBKEY
|
|
117
|
-
PUMP_FUN_RENT_PROGRAM_SWITCH = RENT_PUBKEY if buy else TOKEN_PROGRAM_ID_PUBKEY
|
|
118
|
-
# Build account key list
|
|
119
|
-
keys = [
|
|
120
|
-
AccountMeta(pubkey=PUMP_FUN_GLOBAL_PUBKEY, is_signer=False, is_writable=False),
|
|
121
|
-
AccountMeta(pubkey=PUMP_FUN_FEE_RECIPIENT_PUBKEY, is_signer=False, is_writable=True),
|
|
122
|
-
AccountMeta(pubkey=MINT, is_signer=False, is_writable=False),
|
|
123
|
-
AccountMeta(pubkey=BONDING_CURVE, is_signer=False, is_writable=True),
|
|
124
|
-
AccountMeta(pubkey=ASSOCIATED_BONDING_CURVE, is_signer=False, is_writable=True),
|
|
125
|
-
AccountMeta(pubkey=ASSOCIATED_USER, is_signer=False, is_writable=True),
|
|
126
|
-
AccountMeta(pubkey=USER, is_signer=True, is_writable=True),
|
|
127
|
-
AccountMeta(pubkey=SYSTEM_PROGRAM_PUBKEY, is_signer=False, is_writable=False),
|
|
128
|
-
AccountMeta(pubkey=PUMP_FUN_TOKEN_PROGRAM_SWITCH, is_signer=False, is_writable=False),
|
|
129
|
-
AccountMeta(pubkey=PUMP_FUN_RENT_PROGRAM_SWITCH, is_signer=False, is_writable=False),
|
|
130
|
-
AccountMeta(pubkey=PUMP_FUN_EVENT_AUTHORITY_PUBKEY, is_signer=False, is_writable=False),
|
|
131
|
-
AccountMeta(pubkey=PUMP_FUN_PROGRAM_PUBKEY, is_signer=False, is_writable=False)
|
|
132
|
-
]
|
|
133
|
-
return keys
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
from ..constants import TOKEN_DECIMAL_EXP,SOL_DECIMAL_EXP
|
|
2
|
-
from ..pubkey_utils import Pubkey
|
|
3
|
-
from .pump_fun_keys import get_pump_fun_data
|
|
4
|
-
from abstract_solcatcher import getTokenAccountBalance,getTokenAccountsByOwner
|
|
5
|
-
from spl.token.instructions import create_associated_token_account, get_associated_token_address
|
|
6
|
-
from abstract_utilities import get_any_value
|
|
7
|
-
import requests
|
|
8
|
-
def get_token_balance(payer,mint: str):
|
|
9
|
-
response = getTokenAccountBalance(str(payer),str(mint))
|
|
10
|
-
response=response.get('value',response)
|
|
11
|
-
ui_amount = get_any_value(response, "uiAmount") or 0
|
|
12
|
-
return float(ui_amount)
|
|
13
|
-
def get_token_price(mint: str) -> float:
|
|
14
|
-
try:
|
|
15
|
-
# Get coin data
|
|
16
|
-
coin_data = get_pump_fun_data(str(mint))
|
|
17
|
-
if not coin_data:
|
|
18
|
-
print("Failed to retrieve coin data...")
|
|
19
|
-
return None
|
|
20
|
-
virtual_sol_reserves = coin_data['virtual_sol_reserves'] / SOL_DECIMAL_EXP
|
|
21
|
-
virtual_token_reserves = coin_data['virtual_token_reserves'] / TOKEN_DECIMAL_EXP
|
|
22
|
-
token_price = virtual_sol_reserves / virtual_token_reserves
|
|
23
|
-
print(f"Token Price: {token_price:.20f} SOL")
|
|
24
|
-
return token_price
|
|
25
|
-
except Exception as e:
|
|
26
|
-
print(f"Error calculating token price: {e}")
|
|
27
|
-
return None
|
|
28
|
-
def get_account_by_owner(payer, mint_str: str) -> dict:
|
|
29
|
-
payload = {
|
|
30
|
-
"jsonrpc": "2.0",
|
|
31
|
-
"id": 1,
|
|
32
|
-
"method": "getTokenAccountsByOwner",
|
|
33
|
-
"params": [payer, {"mint": mint_str}, {"encoding": "jsonParsed"}]
|
|
34
|
-
}
|
|
35
|
-
response = requests.post(
|
|
36
|
-
url="https://rpc.ankr.com/solana/c3b7fd92e298d5682b6ef095eaa4e92160989a713f5ee9ac2693b4da8ff5a370",
|
|
37
|
-
json=payload
|
|
38
|
-
)
|
|
39
|
-
response_json = response.json()
|
|
40
|
-
|
|
41
|
-
result = response_json.get('result')
|
|
42
|
-
if not result or 'value' not in result:
|
|
43
|
-
return None
|
|
44
|
-
|
|
45
|
-
accounts = result.get('value', [])
|
|
46
|
-
if accounts:
|
|
47
|
-
return accounts[0] # Return the first account found
|
|
48
|
-
return None
|
|
49
|
-
def check_existing_token_account(owner: Pubkey, mint: Pubkey):
|
|
50
|
-
try:
|
|
51
|
-
account_data = get_account_by_owner(str(owner), str(mint))
|
|
52
|
-
if account_data:
|
|
53
|
-
token_account = account_data['pubkey']
|
|
54
|
-
print(f"Existing token account found: {token_account}")
|
|
55
|
-
return token_account, None
|
|
56
|
-
else:
|
|
57
|
-
print("No existing token account found. Creating a new one...")
|
|
58
|
-
token_account = get_associated_token_address(owner, mint)
|
|
59
|
-
token_account_instructions = create_associated_token_account(owner, owner, mint)
|
|
60
|
-
return token_account, token_account_instructions
|
|
61
|
-
except Exception as e:
|
|
62
|
-
print(f"Error checking or creating token account: {e}")
|
|
63
|
-
return None, None
|
abstract_solana/pumpFunKeys.py
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
from .pubkey_utils import Pubkey,get_pubkey,derive_bonding_curve,derive_associated_bonding_curve
|
|
2
|
-
from .log_message_functions import get_for_program_ids_info
|
|
3
|
-
from spl.token.instructions import create_associated_token_account, get_associated_token_address
|
|
4
|
-
from abstract_solcatcher import getGenesisSignature,getTransaction,getAccountInfo
|
|
5
|
-
from construct import Padding, Struct, Int64ul, Flag
|
|
6
|
-
import base64
|
|
7
|
-
|
|
8
|
-
# Change dictionary keys to lowercase and replace spaces with underscores
|
|
9
|
-
def change_keys_lower(dict_obj):
|
|
10
|
-
new_dict = {}
|
|
11
|
-
for key, value in dict_obj.items():
|
|
12
|
-
new_dict[key.lower().replace(' ', '_')] = value
|
|
13
|
-
return new_dict
|
|
14
|
-
|
|
15
|
-
# Predefined map for different transaction types
|
|
16
|
-
def get_create_map():
|
|
17
|
-
return [
|
|
18
|
-
{'instruction_number': '1', 'instruction_name': 'Mint', 'token_address': 'AkAUSJg1v9xYT3HUxdALH7NsrC6owmwoZuP9MLw8fxTL', 'token_name': '3CAT'},
|
|
19
|
-
{'instruction_number': '2', 'instruction_name': 'Mint Authority', 'token_address': 'TSLvdd1pWpHVjahSpsvCXUbgwsL3JAcvokwaKt1eokM', 'token_name': 'Pump.fun Token Mint Authority'},
|
|
20
|
-
{'instruction_number': '3', 'instruction_name': 'Bonding Curve', 'token_address': '9nhxvNxfSUaJddVco6oa6NodtsCscqCScp6UU1hZkfGm', 'token_name': 'Pump.fun (3CAT) Bonding Curve'},
|
|
21
|
-
{'instruction_number': '4', 'instruction_name': 'Associated Bonding Curve', 'token_address': '889XLp3qvVAHpTYQmhn6cBpYSppV8Gi8E2Rgp9RH2vRy', 'token_name': 'Pump.fun (3CAT) Vault'},
|
|
22
|
-
{'instruction_number': '5', 'instruction_name': 'Global', 'token_address': '4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf', 'token_name': '4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf'},
|
|
23
|
-
{'instruction_number': '6', 'instruction_name': 'Mpl Token Metadata', 'token_address': 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', 'token_name': 'Metaplex Token Metadata'},
|
|
24
|
-
{'instruction_number': '7', 'instruction_name': 'Metadata', 'token_address': 'CH41RxpjSXHqr1vfLTVYJMsfNs2fBCCWoAE13tPihXh7', 'token_name': 'CH41RxpjSXHqr1vfLTVYJMsfNs2fBCCWoAE13tPihXh7'},
|
|
25
|
-
{'instruction_number': '8', 'instruction_name': 'User', 'token_address': 'Fuy5MvbgzjSok1U8hH6mUY6WnLynzUextDxfEWMiTkn4', 'token_name': 'Fuy5MvbgzjSok1U8hH6mUY6WnLynzUextDxfEWMiTkn4'},
|
|
26
|
-
{'instruction_number': '9', 'instruction_name': 'System Program', 'token_address': '11111111111111111111111111111111', 'token_name': 'System Program'},
|
|
27
|
-
{'instruction_number': '10', 'instruction_name': 'Token Program', 'token_address': 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', 'token_name': 'Token Program'},
|
|
28
|
-
{'instruction_number': '11', 'instruction_name': 'Associated Token Program', 'token_address': 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', 'token_name': 'Associated Token Account Program'},
|
|
29
|
-
{'instruction_number': '12', 'instruction_name': 'Rent', 'token_address': 'SysvarRent111111111111111111111111111111111', 'token_name': 'Rent Program'},
|
|
30
|
-
{'instruction_number': '13', 'instruction_name': 'Event Authority', 'token_address': 'Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1', 'token_name': 'Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1'},
|
|
31
|
-
{'instruction_number': '14', 'instruction_name': 'Program', 'token_address': '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P', 'token_name': 'Pump.fun'}
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
# Fetches and organizes transaction types based on provided mint
|
|
35
|
-
def getTxnTypes(mint):
|
|
36
|
-
bonding_curve = str(derive_bonding_curve(mint)[0])
|
|
37
|
-
bonding_curve_signature = getGenesisSignature(address=bonding_curve)
|
|
38
|
-
txn_data = getTransaction(signature=bonding_curve_signature)
|
|
39
|
-
txn_data = get_for_program_ids_info(txn_data)
|
|
40
|
-
|
|
41
|
-
for new_map in get_create_map():
|
|
42
|
-
instructions = txn_data['transaction']['message']['instructions']
|
|
43
|
-
inner_instructions = txn_data['meta']['innerInstructions'][0]['instructions']
|
|
44
|
-
all_instructions = instructions + inner_instructions
|
|
45
|
-
|
|
46
|
-
instruction = [inst for inst in all_instructions if len(inst.get('associatedAccounts', [])) > 13]
|
|
47
|
-
|
|
48
|
-
txn_types = {create_index['instruction_name']: instruction[0]['associatedAccounts'][int(create_index['instruction_number']) - 1] for create_index in get_create_map()}
|
|
49
|
-
|
|
50
|
-
if txn_types:
|
|
51
|
-
txn_types['signature'] = bonding_curve_signature
|
|
52
|
-
break
|
|
53
|
-
return txn_types
|
|
54
|
-
|
|
55
|
-
# Retrieve virtual reserves for a bonding curve using a structured layout
|
|
56
|
-
def get_virtual_reserves(bonding_curve: Pubkey):
|
|
57
|
-
bonding_curve_struct = Struct(
|
|
58
|
-
Padding(8),
|
|
59
|
-
"virtualTokenReserves" / Int64ul,
|
|
60
|
-
"virtualSolReserves" / Int64ul,
|
|
61
|
-
"realTokenReserves" / Int64ul,
|
|
62
|
-
"realSolReserves" / Int64ul,
|
|
63
|
-
"tokenTotalSupply" / Int64ul,
|
|
64
|
-
"complete" / Flag
|
|
65
|
-
)
|
|
66
|
-
account_info = getAccountInfo(account=str(bonding_curve[0]))
|
|
67
|
-
|
|
68
|
-
if not account_info or 'value' not in account_info or 'data' not in account_info['value']:
|
|
69
|
-
print("Failed to retrieve account info.")
|
|
70
|
-
return None
|
|
71
|
-
|
|
72
|
-
data_base64 = account_info['value']['data'][0]
|
|
73
|
-
data = base64.b64decode(data_base64)
|
|
74
|
-
parsed_data = bonding_curve_struct.parse(data)
|
|
75
|
-
return parsed_data
|
|
76
|
-
|
|
77
|
-
# Retrieves comprehensive transaction and reserve data for the mint
|
|
78
|
-
def get_pump_fun_data(mint_str: str):
|
|
79
|
-
txn_types = change_keys_lower(getTxnTypes(mint_str))
|
|
80
|
-
bonding_curve = derive_bonding_curve(mint_str)
|
|
81
|
-
virtual_reserves = get_virtual_reserves(bonding_curve)
|
|
82
|
-
if virtual_reserves is None:
|
|
83
|
-
return None
|
|
84
|
-
|
|
85
|
-
txn_types.update({
|
|
86
|
-
"mint": mint_str,
|
|
87
|
-
"bonding_curve": str(bonding_curve[0]),
|
|
88
|
-
"associated_bonding_curve": str(derive_associated_bonding_curve(mint_str)),
|
|
89
|
-
"virtual_token_reserves": int(virtual_reserves.virtualTokenReserves),
|
|
90
|
-
"virtual_sol_reserves": int(virtual_reserves.virtualSolReserves),
|
|
91
|
-
"token_total_supply": int(virtual_reserves.tokenTotalSupply),
|
|
92
|
-
"complete": bool(virtual_reserves.complete)
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
return txn_types
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
from abstract_utilities import make_list,get_any_value
|
|
2
|
-
def get_block_time_from_txn(txnData):
|
|
3
|
-
return int(get_any_value(txnData,'blockTime') or 0)
|
|
4
|
-
|
|
5
|
-
def get_meta_from_txn(txnData):
|
|
6
|
-
return txnData.get('meta',{})
|
|
7
|
-
|
|
8
|
-
def get_transaction_from_txn(txnData):
|
|
9
|
-
return txnData.get('transaction', {})
|
|
10
|
-
|
|
11
|
-
def get_message_from_txn(txnData):
|
|
12
|
-
return get_transaction_from_txn(txnData).get('message', {})
|
|
13
|
-
|
|
14
|
-
def get_addres_lookup_table_from_txn(txnData):
|
|
15
|
-
return get_message_from_txn(txnData).get('addressTableLookups', [])
|
|
16
|
-
|
|
17
|
-
def get_account_keys_from_txn(txnData):
|
|
18
|
-
return get_message_from_txn(txnData).get('accountKeys', [])
|
|
19
|
-
|
|
20
|
-
def get_loaded_addresses_from_txn(txnData):
|
|
21
|
-
return get_meta_from_txn(txnData).get('loadedAddresses',{})
|
|
22
|
-
|
|
23
|
-
def get_read_only_addresses_from_txn(txnData):
|
|
24
|
-
return get_any_value(txnData,'readonly') or []
|
|
25
|
-
|
|
26
|
-
def get_writable_addresses_from_txn(txnData):
|
|
27
|
-
return get_any_value(txnData,'writable') or []
|
|
28
|
-
|
|
29
|
-
def get_log_messages_from_txn(txnData):
|
|
30
|
-
return get_meta_from_txn(txnData).get('logMessages',[])
|
|
31
|
-
|
|
32
|
-
def get_error_message_from_txn(txnData):
|
|
33
|
-
return make_list(get_any_value(txnData,'err'))[0]
|
|
34
|
-
|
|
35
|
-
def get_instructions_from_txn(txnData):
|
|
36
|
-
return get_message_from_txn(txnData).get('instructions',[])
|
|
37
|
-
|
|
38
|
-
def get_inner_instructions_raw(txnData):
|
|
39
|
-
return get_meta_from_txn(txnData).get('innerInstructions',[{}])
|
|
40
|
-
|
|
41
|
-
def get_inner_instructions_from_txn(txnData):
|
|
42
|
-
return get_inner_instructions_raw(txnData)[0].get('instructions',[])
|
|
43
|
-
|
|
44
|
-
def get_post_token_balances_from_txn(txnData):
|
|
45
|
-
return get_meta_from_txn(txnData).get('postTokenBalances', [])
|
|
46
|
-
|
|
47
|
-
def get_pre_token_balances_from_txn(txnData):
|
|
48
|
-
return get_meta_from_txn(txnData).get('preTokenBalances', [])
|
|
49
|
-
|
|
50
|
-
def get_post_balances_from_txn(txnData):
|
|
51
|
-
return get_meta_from_txn(txnData).get('postBalances', [])
|
|
52
|
-
|
|
53
|
-
def get_pre_balances_from_txn(txnData):
|
|
54
|
-
return get_meta_from_txn(txnData).get('preBalances', [])
|
|
55
|
-
|
|
56
|
-
def get_signatures_from_txn(txnData):
|
|
57
|
-
return txnData.get('signatures',{})
|
abstract_solana/utils.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
def ifListGetSection(listObj,section=0):
|
|
2
|
-
if isinstance(listObj,list):
|
|
3
|
-
if len(listObj)>section:
|
|
4
|
-
return listObj[section]
|
|
5
|
-
return listObj
|
|
6
|
-
def if_list_get_Part(obj,i=0):
|
|
7
|
-
if obj and isinstance(obj,list) and len(obj)>i:
|
|
8
|
-
obj = obj[i]
|
|
9
|
-
return obj
|
|
10
|
-
def updateData(data,**kwargs):
|
|
11
|
-
data.update(kwargs)
|
|
12
|
-
return data
|
|
13
|
-
def isListZero(obj):
|
|
14
|
-
if obj and isinstance(obj, list):
|
|
15
|
-
return obj[0]
|
|
16
|
-
return obj
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
abstract_solana/__init__.py,sha256=rC-Z34toCxT80j45rwTgY5n59w-Z8tEAk9EOBi-aqso,94
|
|
2
|
-
abstract_solana/account_key_utils.py,sha256=VMJd4GOTK1vn8UZsfXDnjxDOGoQWGY6fvflJqPZ7Xvs,877
|
|
3
|
-
abstract_solana/constants.py,sha256=cSmCKzQiNZocX1YkKYrdY-O449aYhi7BT_j-45HZN-E,1418
|
|
4
|
-
abstract_solana/genesis_functions.py,sha256=2WRQUxN9j-dpLfYIBiX3URM-_uDGkh-eTy08Gi-qWgo,939
|
|
5
|
-
abstract_solana/index_utils.py,sha256=Ed07BYTZWp-SVfpthAUqjRY00U3ZYldPCqd7LJy9AO8,1884
|
|
6
|
-
abstract_solana/keypair_utils.py,sha256=YPiyjdh6F3JOmgcmXWR72EmSZKy0UF5AbYebeKSu86w,616
|
|
7
|
-
abstract_solana/log_message_functions.py,sha256=-qGO4rJRHKVEV8eqs4OCe5Rx1osTlEoc07fUruMBFp8,8080
|
|
8
|
-
abstract_solana/price_utils.py,sha256=BLkwFLhlsTHeW0NTdzCAUi2xhc2lX7SrHz5sslDbUrY,4288
|
|
9
|
-
abstract_solana/pubkey_utils.py,sha256=TAYF74fKAuTBnqIP2SnA-BttO5uoHbxI9BRZRpGCMNY,2010
|
|
10
|
-
abstract_solana/pumpFunKeys.py,sha256=KHZyQ_GFS9XzmNNMzEDQkAZsiM5Mpua6ZE1e3WebErc,5898
|
|
11
|
-
abstract_solana/signature_data_parse.py,sha256=5AOMtJZADWcwR0JLDbd2kXZNzW129qeB0lvYUrE_tm0,1974
|
|
12
|
-
abstract_solana/utils.py,sha256=RcnGEiZ0aJbcw8ObpjHU3WUFU4Tmy-exCs6qIbEu4_c,444
|
|
13
|
-
abstract_solana/abstract_rpcs/__init__.py,sha256=AF2rqc1rC2g74TYW-BuGhDh5x5bpthoDS-J5_C1X35I,24
|
|
14
|
-
abstract_solana/abstract_rpcs/get_body.py,sha256=jrwh0uhy-yRhdLIlbgoYKtxYxZ0NqH8kuIkvYUZgIIU,51383
|
|
15
|
-
abstract_solana/abstract_utils/__init__.py,sha256=INCZ3KOpc4o1MnK-0dIM9gldjyTF5JlsiOamMejV_bY,319
|
|
16
|
-
abstract_solana/abstract_utils/account_key_utils.py,sha256=VMJd4GOTK1vn8UZsfXDnjxDOGoQWGY6fvflJqPZ7Xvs,877
|
|
17
|
-
abstract_solana/abstract_utils/constants.py,sha256=cSmCKzQiNZocX1YkKYrdY-O449aYhi7BT_j-45HZN-E,1418
|
|
18
|
-
abstract_solana/abstract_utils/genesis_functions.py,sha256=2WRQUxN9j-dpLfYIBiX3URM-_uDGkh-eTy08Gi-qWgo,939
|
|
19
|
-
abstract_solana/abstract_utils/index_utils.py,sha256=Ed07BYTZWp-SVfpthAUqjRY00U3ZYldPCqd7LJy9AO8,1884
|
|
20
|
-
abstract_solana/abstract_utils/keypair_utils.py,sha256=YPiyjdh6F3JOmgcmXWR72EmSZKy0UF5AbYebeKSu86w,616
|
|
21
|
-
abstract_solana/abstract_utils/log_message_functions.py,sha256=-qGO4rJRHKVEV8eqs4OCe5Rx1osTlEoc07fUruMBFp8,8080
|
|
22
|
-
abstract_solana/abstract_utils/price_utils.py,sha256=BLkwFLhlsTHeW0NTdzCAUi2xhc2lX7SrHz5sslDbUrY,4288
|
|
23
|
-
abstract_solana/abstract_utils/pubkey_utils.py,sha256=TAYF74fKAuTBnqIP2SnA-BttO5uoHbxI9BRZRpGCMNY,2010
|
|
24
|
-
abstract_solana/abstract_utils/signature_data_parse.py,sha256=5AOMtJZADWcwR0JLDbd2kXZNzW129qeB0lvYUrE_tm0,1974
|
|
25
|
-
abstract_solana/abstract_utils/utils.py,sha256=RcnGEiZ0aJbcw8ObpjHU3WUFU4Tmy-exCs6qIbEu4_c,444
|
|
26
|
-
abstract_solana/pumpFun/__init__.py,sha256=BiRxwJd1JWwEft63zqYwZ_Xs6UDp4hjczjzvuwy3sHg,85
|
|
27
|
-
abstract_solana/pumpFun/buy_sell_pump.py,sha256=Nzs4G-Qednz5N6OKZq48ScqDdICXPapJTE7Df9OHwac,7830
|
|
28
|
-
abstract_solana/pumpFun/pumpFunKeys.py,sha256=yMS_fT-0ESndluVpZ17XdMhpXVtSfhtIG5njy7DJkfI,7961
|
|
29
|
-
abstract_solana/pumpFun/pump_fun_keys.py,sha256=jj_yLqXnVipuT9MalM7wp7x1LLmuE6c5mDQtRruxUTE,8492
|
|
30
|
-
abstract_solana/pumpFun/token_utils.py,sha256=NhMvpTnw3QZk8DmeKYFzuqEMEZEHUlrBKfFp7662ohw,2684
|
|
31
|
-
abstract_solana/pump_functions/__init__.py,sha256=BiRxwJd1JWwEft63zqYwZ_Xs6UDp4hjczjzvuwy3sHg,85
|
|
32
|
-
abstract_solana/pump_functions/buy_sell_pump.py,sha256=Nzs4G-Qednz5N6OKZq48ScqDdICXPapJTE7Df9OHwac,7830
|
|
33
|
-
abstract_solana/pump_functions/pump_fun_keys.py,sha256=jj_yLqXnVipuT9MalM7wp7x1LLmuE6c5mDQtRruxUTE,8492
|
|
34
|
-
abstract_solana/pump_functions/token_utils.py,sha256=NhMvpTnw3QZk8DmeKYFzuqEMEZEHUlrBKfFp7662ohw,2684
|
|
35
|
-
abstract_solana-0.0.0.94.dist-info/METADATA,sha256=RTc4l8DtImEH_iYQ4W29aWUCZiI-H3uDCd-_yubeXd4,981
|
|
36
|
-
abstract_solana-0.0.0.94.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
37
|
-
abstract_solana-0.0.0.94.dist-info/top_level.txt,sha256=SsJYent8eZQ0FU2jmP8wTj7aFZFhNwxxP-5cCTQ2B-o,16
|
|
38
|
-
abstract_solana-0.0.0.94.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|