abstract-solana 0.0.0.21__tar.gz → 0.0.0.22__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-solana might be problematic. Click here for more details.

Files changed (22) hide show
  1. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/PKG-INFO +1 -1
  2. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/setup.py +1 -1
  3. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana/__init__.py +1 -0
  4. abstract_solana-0.0.0.22/src/abstract_solana/pumpFunKeys.py +94 -0
  5. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana.egg-info/PKG-INFO +1 -1
  6. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana.egg-info/SOURCES.txt +1 -0
  7. abstract_solana-0.0.0.22/test/test_abstract_solana.py +106 -0
  8. abstract_solana-0.0.0.21/test/test_abstract_solana.py +0 -54
  9. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/README.md +0 -0
  10. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/setup.cfg +0 -0
  11. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana/account_key_utils.py +0 -0
  12. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana/constants.py +0 -0
  13. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana/genesis_functions.py +0 -0
  14. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana/index_utils.py +0 -0
  15. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana/log_message_functions.py +0 -0
  16. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana/price_utils.py +0 -0
  17. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana/pubkey_utils.py +0 -0
  18. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana/signature_data_parse.py +0 -0
  19. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana/utils.py +0 -0
  20. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana.egg-info/dependency_links.txt +0 -0
  21. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana.egg-info/requires.txt +0 -0
  22. {abstract_solana-0.0.0.21 → abstract_solana-0.0.0.22}/src/abstract_solana.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: abstract_solana
3
- Version: 0.0.0.21
3
+ Version: 0.0.0.22
4
4
  Home-page: https://github.com/AbstractEndeavors/abstract_solana
5
5
  Author: putkoff
6
6
  Author-email: partners@abstractendeavors.com
@@ -4,7 +4,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
4
4
  long_description = fh.read()
5
5
  setuptools.setup(
6
6
  name='abstract_solana',
7
- version='0.0.0.21',
7
+ version='0.0.0.22',
8
8
  author='putkoff',
9
9
  author_email='partners@abstractendeavors.com',
10
10
  description="",
@@ -7,3 +7,4 @@ from .signature_data_parse import *
7
7
  from .utils import *
8
8
  from .log_message_functions import *
9
9
  from .constants import *
10
+ from .pumpFunKeys import *
@@ -0,0 +1,94 @@
1
+ from .pubkey_utils import 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
+ txn_types = {create_index['instruction_name']: instruction[0]['associatedAccounts'][int(create_index['instruction_number']) - 1] for create_index in get_create_map()}
48
+
49
+ if txn_types:
50
+ txn_types['signature'] = bonding_curve_signature
51
+ break
52
+ return txn_types
53
+
54
+ # Retrieve virtual reserves for a bonding curve using a structured layout
55
+ def get_virtual_reserves(bonding_curve: Pubkey):
56
+ bonding_curve_struct = Struct(
57
+ Padding(8),
58
+ "virtualTokenReserves" / Int64ul,
59
+ "virtualSolReserves" / Int64ul,
60
+ "realTokenReserves" / Int64ul,
61
+ "realSolReserves" / Int64ul,
62
+ "tokenTotalSupply" / Int64ul,
63
+ "complete" / Flag
64
+ )
65
+ account_info = getAccountInfo(account=str(bonding_curve[0]))
66
+
67
+ if not account_info or 'value' not in account_info or 'data' not in account_info['value']:
68
+ print("Failed to retrieve account info.")
69
+ return None
70
+
71
+ data_base64 = account_info['value']['data'][0]
72
+ data = base64.b64decode(data_base64)
73
+ parsed_data = bonding_curve_struct.parse(data)
74
+ return parsed_data
75
+
76
+ # Retrieves comprehensive transaction and reserve data for the mint
77
+ def get_pump_fun_data(mint_str: str):
78
+ txn_types = change_keys_lower(getTxnTypes(mint_str))
79
+ bonding_curve = derive_bonding_curve(mint_str)
80
+ virtual_reserves = get_virtual_reserves(bonding_curve)
81
+ if virtual_reserves is None:
82
+ return None
83
+
84
+ txn_types.update({
85
+ "mint": mint_str,
86
+ "bonding_curve": str(bonding_curve[0]),
87
+ "associated_bonding_curve": str(derive_associated_bonding_curve(mint_str)),
88
+ "virtual_token_reserves": int(virtual_reserves.virtualTokenReserves),
89
+ "virtual_sol_reserves": int(virtual_reserves.virtualSolReserves),
90
+ "token_total_supply": int(virtual_reserves.tokenTotalSupply),
91
+ "complete": bool(virtual_reserves.complete)
92
+ })
93
+
94
+ return txn_types
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: abstract_solana
3
- Version: 0.0.0.21
3
+ Version: 0.0.0.22
4
4
  Home-page: https://github.com/AbstractEndeavors/abstract_solana
5
5
  Author: putkoff
6
6
  Author-email: partners@abstractendeavors.com
@@ -8,6 +8,7 @@ src/abstract_solana/index_utils.py
8
8
  src/abstract_solana/log_message_functions.py
9
9
  src/abstract_solana/price_utils.py
10
10
  src/abstract_solana/pubkey_utils.py
11
+ src/abstract_solana/pumpFunKeys.py
11
12
  src/abstract_solana/signature_data_parse.py
12
13
  src/abstract_solana/utils.py
13
14
  src/abstract_solana.egg-info/PKG-INFO
@@ -0,0 +1,106 @@
1
+ from abstract_solana import *
2
+ from spl.token.instructions import create_associated_token_account, get_associated_token_address
3
+ from abstract_solcatcher import getGenesisSignature,getTransaction,getAccountInfo
4
+ from construct import Padding, Struct, Int64ul, Flag
5
+ import base64
6
+
7
+
8
+
9
+ # Change dictionary keys to lowercase and replace spaces with underscores
10
+ def change_keys_lower(dict_obj):
11
+ new_dict = {}
12
+ for key, value in dict_obj.items():
13
+ new_dict[key.lower().replace(' ', '_')] = value
14
+ return new_dict
15
+
16
+ # Predefined map for different transaction types
17
+ def get_create_map():
18
+ return [
19
+ {'instruction_number': '1', 'instruction_name': 'Mint', 'token_address': 'AkAUSJg1v9xYT3HUxdALH7NsrC6owmwoZuP9MLw8fxTL', 'token_name': '3CAT'},
20
+ {'instruction_number': '2', 'instruction_name': 'Mint Authority', 'token_address': 'TSLvdd1pWpHVjahSpsvCXUbgwsL3JAcvokwaKt1eokM', 'token_name': 'Pump.fun Token Mint Authority'},
21
+ {'instruction_number': '3', 'instruction_name': 'Bonding Curve', 'token_address': '9nhxvNxfSUaJddVco6oa6NodtsCscqCScp6UU1hZkfGm', 'token_name': 'Pump.fun (3CAT) Bonding Curve'},
22
+ {'instruction_number': '4', 'instruction_name': 'Associated Bonding Curve', 'token_address': '889XLp3qvVAHpTYQmhn6cBpYSppV8Gi8E2Rgp9RH2vRy', 'token_name': 'Pump.fun (3CAT) Vault'},
23
+ {'instruction_number': '5', 'instruction_name': 'Global', 'token_address': '4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf', 'token_name': '4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf'},
24
+ {'instruction_number': '6', 'instruction_name': 'Mpl Token Metadata', 'token_address': 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', 'token_name': 'Metaplex Token Metadata'},
25
+ {'instruction_number': '7', 'instruction_name': 'Metadata', 'token_address': 'CH41RxpjSXHqr1vfLTVYJMsfNs2fBCCWoAE13tPihXh7', 'token_name': 'CH41RxpjSXHqr1vfLTVYJMsfNs2fBCCWoAE13tPihXh7'},
26
+ {'instruction_number': '8', 'instruction_name': 'User', 'token_address': 'Fuy5MvbgzjSok1U8hH6mUY6WnLynzUextDxfEWMiTkn4', 'token_name': 'Fuy5MvbgzjSok1U8hH6mUY6WnLynzUextDxfEWMiTkn4'},
27
+ {'instruction_number': '9', 'instruction_name': 'System Program', 'token_address': '11111111111111111111111111111111', 'token_name': 'System Program'},
28
+ {'instruction_number': '10', 'instruction_name': 'Token Program', 'token_address': 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', 'token_name': 'Token Program'},
29
+ {'instruction_number': '11', 'instruction_name': 'Associated Token Program', 'token_address': 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', 'token_name': 'Associated Token Account Program'},
30
+ {'instruction_number': '12', 'instruction_name': 'Rent', 'token_address': 'SysvarRent111111111111111111111111111111111', 'token_name': 'Rent Program'},
31
+ {'instruction_number': '13', 'instruction_name': 'Event Authority', 'token_address': 'Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1', 'token_name': 'Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1'},
32
+ {'instruction_number': '14', 'instruction_name': 'Program', 'token_address': '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P', 'token_name': 'Pump.fun'}
33
+ ]
34
+
35
+ # Fetches and organizes transaction types based on provided mint
36
+ def getTxnTypes(mint):
37
+ bonding_curve = str(derive_bonding_curve(mint)[0])
38
+ bonding_curve_signature = getGenesisSignature(address=bonding_curve)
39
+ txn_data = getTransaction(signature=bonding_curve_signature)
40
+ txn_data = get_for_program_ids_info(txn_data)
41
+
42
+ for new_map in get_create_map():
43
+ instructions = txn_data['transaction']['message']['instructions']
44
+ inner_instructions = txn_data['meta']['innerInstructions'][0]['instructions']
45
+ all_instructions = instructions + inner_instructions
46
+
47
+ instruction = [inst for inst in all_instructions if len(inst.get('associatedAccounts', [])) > 13]
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
96
+
97
+ # Example usage
98
+ mint = "911eA3wRZ85ZiSTpmCH1hksPGLGgzyVpfMXtJ4zSzVJ5"
99
+ mint_pub_key = get_pubkey(mint)
100
+
101
+ if not mint_pub_key.is_on_curve():
102
+ print('Mint public key is not on curve')
103
+
104
+ txn_types = get_pump_fun_data(mint)
105
+
106
+ input(txn_types)
@@ -1,54 +0,0 @@
1
- from abstract_solana import *
2
- from spl.token.instructions import create_associated_token_account, get_associated_token_address
3
- from price_functions import *
4
- from abstract_solcatcher import *
5
- def get_solcatcher_api(endpoint,*args,**kwargs):
6
- return get_async_response(get_solcatcher_endpoint,endpoint=endpoint,*args,**kwargs)
7
- def get_create_map():
8
- return [{'instruction_number': '1', 'instruction_name': 'Mint', 'token_address': 'AkAUSJg1v9xYT3HUxdALH7NsrC6owmwoZuP9MLw8fxTL', 'token_name': '3CAT'},
9
- {'instruction_number': '2', 'instruction_name': 'Mint Authority', 'token_address': 'TSLvdd1pWpHVjahSpsvCXUbgwsL3JAcvokwaKt1eokM', 'token_name': 'Pump.fun Token Mint Authority'},
10
- {'instruction_number': '3', 'instruction_name': 'Bonding Curve', 'token_address': '9nhxvNxfSUaJddVco6oa6NodtsCscqCScp6UU1hZkfGm', 'token_name': 'Pump.fun (3CAT) Bonding Curve'},
11
- {'instruction_number': '4', 'instruction_name': 'Associated Bonding Curve', 'token_address': '889XLp3qvVAHpTYQmhn6cBpYSppV8Gi8E2Rgp9RH2vRy', 'token_name': 'Pump.fun (3CAT) Vault'},
12
- {'instruction_number': '5', 'instruction_name': 'Global', 'token_address': '4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf', 'token_name': '4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf'},
13
- {'instruction_number': '6', 'instruction_name': 'Mpl Token Metadata', 'token_address': 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', 'token_name': 'Metaplex Token Metadata'},
14
- {'instruction_number': '7', 'instruction_name': 'Metadata', 'token_address': 'CH41RxpjSXHqr1vfLTVYJMsfNs2fBCCWoAE13tPihXh7', 'token_name': 'CH41RxpjSXHqr1vfLTVYJMsfNs2fBCCWoAE13tPihXh7'},
15
- {'instruction_number': '8', 'instruction_name': 'User', 'token_address': 'Fuy5MvbgzjSok1U8hH6mUY6WnLynzUextDxfEWMiTkn4', 'token_name': 'Fuy5MvbgzjSok1U8hH6mUY6WnLynzUextDxfEWMiTkn4'},
16
- {'instruction_number': '9', 'instruction_name': 'System Program', 'token_address': '11111111111111111111111111111111', 'token_name': 'System Program'},
17
- {'instruction_number': '10', 'instruction_name': 'Token Program', 'token_address': 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', 'token_name': 'Token Program'},
18
- {'instruction_number': '11', 'instruction_name': 'Associated Token Program', 'token_address': 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', 'token_name': 'Associated Token Account Program'},
19
- {'instruction_number': '12', 'instruction_name': 'Rent', 'token_address': 'SysvarRent111111111111111111111111111111111', 'token_name': 'Rent Program'},
20
- {'instruction_number': '13', 'instruction_name': 'Event Authority', 'token_address': 'Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1', 'token_name': 'Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1'},
21
- {'instruction_number': '14', 'instruction_name': 'Program', 'token_address': '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P', 'token_name': 'Pump.fun'}]
22
-
23
- def getTxnTypes(signature,maps=None):
24
- maps = maps or get_create_pump_map()
25
- token_types = {}
26
- txnData = get_solcatcher_api('getTransaction',signature=signature)
27
- txnData = get_for_program_ids_info(txnData)
28
- for new_map in maps:
29
- instructions = txnData['transaction']['message']['instructions']
30
- innerInstructions = txnData['meta']['innerInstructions'][0]['instructions']
31
- allInstructions = instructions+innerInstructions
32
- for instruction in allInstructions:
33
- input(instruction.get('event'))
34
- if new_map.get('instruction_name') in instruction.get('events'):
35
- account = instruction.get('accounts')[new_map.get('account')]
36
- token_types[new_map.get('address_type')]=account
37
- break
38
- return token_types
39
- def getTxnTypesFromMint(mint):
40
- mintPubKey = get_pubkey(mint)
41
- if not mintPubKey.is_on_curve():
42
- print('not on curve')
43
- return
44
- bonding_curve = str(derive_bonding_curve(mint)[0])
45
- bonding_curve_signature = get_solcatcher_api("getGenesisSignature",account=str(bonding_curve))
46
- txnTypes = getTxnTypes(bonding_curve_signature,maps=get_create_map())
47
- txnTypes['signature']=bonding_curve_signature
48
- return txnTypes
49
- mint = "911eA3wRZ85ZiSTpmCH1hksPGLGgzyVpfMXtJ4zSzVJ5"
50
- input(getTxnTypesFromMint(mint))
51
-
52
-
53
-
54
-