abstract-solana 0.0.2.99__tar.gz → 0.0.2.101__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 (31) hide show
  1. {abstract_solana-0.0.2.99 → abstract_solana-0.0.2.101}/PKG-INFO +1 -1
  2. {abstract_solana-0.0.2.99 → abstract_solana-0.0.2.101}/setup.py +1 -1
  3. abstract_solana-0.0.2.101/src/abstract_solana/abstract_utils/__init__.py +2 -0
  4. abstract_solana-0.0.2.101/src/abstract_solana/abstract_utils/genesis_functions.py +96 -0
  5. abstract_solana-0.0.2.99/src/abstract_solana/abstract_utils/pubkey_utils.py → abstract_solana-0.0.2.101/src/abstract_solana/abstract_utils/pubKeyUtils.py +5 -0
  6. {abstract_solana-0.0.2.99 → abstract_solana-0.0.2.101}/src/abstract_solana.egg-info/PKG-INFO +1 -1
  7. abstract_solana-0.0.2.101/src/abstract_solana.egg-info/SOURCES.txt +12 -0
  8. abstract_solana-0.0.2.99/src/abstract_solana/abstract_rpcs/__init__.py +0 -4
  9. abstract_solana-0.0.2.99/src/abstract_solana/abstract_rpcs/db_templates.py +0 -215
  10. abstract_solana-0.0.2.99/src/abstract_solana/abstract_rpcs/get_api_gui.py +0 -211
  11. abstract_solana-0.0.2.99/src/abstract_solana/abstract_rpcs/get_body.py +0 -1178
  12. abstract_solana-0.0.2.99/src/abstract_solana/abstract_rpcs/rate_limiter.py +0 -177
  13. abstract_solana-0.0.2.99/src/abstract_solana/abstract_rpcs/solana_rpc_client.py +0 -101
  14. abstract_solana-0.0.2.99/src/abstract_solana/abstract_utils/__init__.py +0 -10
  15. abstract_solana-0.0.2.99/src/abstract_solana/abstract_utils/account_key_utils.py +0 -20
  16. abstract_solana-0.0.2.99/src/abstract_solana/abstract_utils/constants.py +0 -30
  17. abstract_solana-0.0.2.99/src/abstract_solana/abstract_utils/genesis_functions.py +0 -35
  18. abstract_solana-0.0.2.99/src/abstract_solana/abstract_utils/index_utils.py +0 -43
  19. abstract_solana-0.0.2.99/src/abstract_solana/abstract_utils/keypair_utils.py +0 -17
  20. abstract_solana-0.0.2.99/src/abstract_solana/abstract_utils/log_message_functions.py +0 -151
  21. abstract_solana-0.0.2.99/src/abstract_solana/abstract_utils/price_utils.py +0 -78
  22. abstract_solana-0.0.2.99/src/abstract_solana/abstract_utils/signature_data_parse.py +0 -57
  23. abstract_solana-0.0.2.99/src/abstract_solana/abstract_utils/utils.py +0 -16
  24. abstract_solana-0.0.2.99/src/abstract_solana.egg-info/SOURCES.txt +0 -26
  25. {abstract_solana-0.0.2.99 → abstract_solana-0.0.2.101}/README.md +0 -0
  26. {abstract_solana-0.0.2.99 → abstract_solana-0.0.2.101}/pyproject.toml +0 -0
  27. {abstract_solana-0.0.2.99 → abstract_solana-0.0.2.101}/setup.cfg +0 -0
  28. {abstract_solana-0.0.2.99 → abstract_solana-0.0.2.101}/src/abstract_solana/__init__.py +0 -0
  29. {abstract_solana-0.0.2.99 → abstract_solana-0.0.2.101}/src/abstract_solana.egg-info/dependency_links.txt +0 -0
  30. {abstract_solana-0.0.2.99 → abstract_solana-0.0.2.101}/src/abstract_solana.egg-info/requires.txt +0 -0
  31. {abstract_solana-0.0.2.99 → abstract_solana-0.0.2.101}/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.2.99
3
+ Version: 0.0.2.101
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.2.99',
7
+ version='0.0.2.101',
8
8
  author='putkoff',
9
9
  author_email='partners@abstractendeavors.com',
10
10
  description="",
@@ -0,0 +1,2 @@
1
+ from .pubKeyUtils import *
2
+ from .genesis_functions import *
@@ -0,0 +1,96 @@
1
+
2
+ from abstract_solcatcher import call_solcatcher_db
3
+ import asyncio
4
+ def get_block_time_from_txn(txnData):
5
+ return int(get_any_value('txnDatablockTime') or 0)
6
+ def get_error_message_from_txn(txnData):
7
+ return make_list(get_any_value(txnData,'err'))[0]
8
+ def get_errorless_txn_from_signature_array(signatureArray):
9
+ return [sig for sig in signatureArray if get_error_message_from_txn(sig) == None]
10
+ def return_oldest_from_signature_array(signatureArray,errorless=False):
11
+ if errorless:
12
+ signatureArray = get_errorless_txn_from_signature_array(signatureArray)
13
+ if signatureArray and isinstance(signatureArray,list):
14
+ if get_block_time_from_txn(signatureArray[0])<get_block_time_from_txn(signatureArray[-1]):
15
+ return signatureArray[0].get('signature')
16
+ return signatureArray[-1].get('signature')
17
+ def return_oldest_last_and_original_length_from_signature_array(signatureArray):
18
+ return {"oldest":return_oldest_from_signature_array(signatureArray),
19
+ "oldestValid":return_oldest_from_signature_array(signatureArray,errorless=True),
20
+ "length":len(signatureArray)}
21
+ async def getGenesisSignature(address, limit=1000, before=None,encoding='jsonParsed',commitment=0,errorProof=True):
22
+ method = "getGenesisSignature"
23
+ validBefore=None
24
+ while True:
25
+ signatureArray = await async_call_solcatcher_py('make_limited_rpc_call',method ="getSignaturesForAddress",params=[address, {"limit":limit, "until":before}],solcatcherSettings={"getResult":None})
26
+ original_length = len(signatureArray)
27
+ signature_array_data = return_oldest_last_and_original_length_from_signature_array(signatureArray)
28
+ oldest = signature_array_data.get('oldest')
29
+ validOldest = signature_array_data.get('oldestValid')
30
+ if original_length < limit or original_length == 0 or (original_length>0 and (oldest == validOldest or oldest == before) and last_sig != None):
31
+ return validOldest
32
+
33
+ lists = '''Program ComputeBudget111111111111111111111111111111 invoke [1]
34
+ Program ComputeBudget111111111111111111111111111111 success
35
+ Program ComputeBudget111111111111111111111111111111 invoke [1]
36
+ Program ComputeBudget111111111111111111111111111111 success
37
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [1]
38
+ Program log: Instruction: Sell
39
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]
40
+ Program log: Instruction: Transfer
41
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4645 of 29252 compute units
42
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success
43
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [2]
44
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 2003 of 21122 compute units
45
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P success
46
+ Program data: vdt/007mYe7hydhVZy9afs2/QfziCS/MrFj152topCJjfR7YM8aivxTx6gcAAAAAX49jwEQEAAAAAE1fUFYqygvqkDKl7FUkwNxeF9euI5ug0JB1dpP38A9l63xnAAAAAEzOKgMHAAAA7tKJPBHMAwBMIgcHAAAAAO46d/B/zQIA
47
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 33418 of 50811 compute units
48
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P success
49
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]
50
+ Program log: Instruction: CloseAccount
51
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 3016 of 17393 compute units
52
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success
53
+ 📤 Forwarded log entry: 551pXbYqVEc47hFMFgpN56cfRWve9yNds3q1Ti9hRgu4XxnNyhsB9Kz6D3vHmDX1quzFjNDQFGVrq1ZQ2rJBjzVU
54
+ Program ComputeBudget111111111111111111111111111111 invoke [1]
55
+ Program ComputeBudget111111111111111111111111111111 success
56
+ Program ComputeBudget111111111111111111111111111111 invoke [1]
57
+ Program ComputeBudget111111111111111111111111111111 success
58
+ Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL invoke [1]
59
+ Program log: CreateIdempotent
60
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]
61
+ Program log: Instruction: GetAccountDataSize
62
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1569 of 63182 compute units
63
+ Program return: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA pQAAAAAAAAA=
64
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success
65
+ Program 11111111111111111111111111111111 invoke [2]
66
+ Program 11111111111111111111111111111111 success
67
+ Program log: Initialize the associated token account
68
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]
69
+ Program log: Instruction: InitializeImmutableOwner
70
+ Program log: Please upgrade to SPL Token 2022 for immutable owner support
71
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1405 of 56595 compute units
72
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success
73
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]
74
+ Program log: Instruction: InitializeAccount3
75
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4188 of 52713 compute units
76
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success
77
+ Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL consumed 20345 of 68587 compute units
78
+ Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL success
79
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [1]
80
+ Program log: Instruction: Buy
81
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]
82
+ Program log: Instruction: Transfer
83
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4645 of 19096 compute units
84
+ Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success
85
+ Program 11111111111111111111111111111111 invoke [2]
86
+ Program 11111111111111111111111111111111 success
87
+ Program 11111111111111111111111111111111 invoke [2]
88
+ Program 11111111111111111111111111111111 success
89
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [2]
90
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 2003 of 7008 compute units
91
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P success
92
+ Program data: vdt/007mYe4WEtxPSnW1nnQKhtXv8Q/3z275Mq87n+/LYvxY+U26T1BXdwQAAAAAW9rioWECAAABlxKWPWPg7ZGIU4dtIRBuJKKq0ryvtI+TAkryVtuBSz9l63xnAAAAAG8JTRMHAAAAJ8MKrWjDAwBvXSkXAAAAACcr+GDXxAIA
93
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 44962 of 48242 compute units
94
+ Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P success'''
95
+
96
+ input(lists.split('\n'))
@@ -64,6 +64,11 @@ def get_sigkey(obj):
64
64
  return sigKey
65
65
  return obj
66
66
 
67
+ def isOnCurve(obj):
68
+ pubkey = get_pubkey(obj)
69
+ is_on_curve = pubkey.is_on_curve()
70
+ return is_on_curve
71
+
67
72
  def derive_associated_bonding_curve(mint,programId=None):
68
73
  return get_associated_token_address(derive_bonding_curve(mint,programId)[0], get_pubkey(mint))
69
74
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: abstract_solana
3
- Version: 0.0.2.99
3
+ Version: 0.0.2.101
4
4
  Home-page: https://github.com/AbstractEndeavors/abstract_solana
5
5
  Author: putkoff
6
6
  Author-email: partners@abstractendeavors.com
@@ -0,0 +1,12 @@
1
+ README.md
2
+ pyproject.toml
3
+ setup.py
4
+ src/abstract_solana/__init__.py
5
+ src/abstract_solana.egg-info/PKG-INFO
6
+ src/abstract_solana.egg-info/SOURCES.txt
7
+ src/abstract_solana.egg-info/dependency_links.txt
8
+ src/abstract_solana.egg-info/requires.txt
9
+ src/abstract_solana.egg-info/top_level.txt
10
+ src/abstract_solana/abstract_utils/__init__.py
11
+ src/abstract_solana/abstract_utils/genesis_functions.py
12
+ src/abstract_solana/abstract_utils/pubKeyUtils.py
@@ -1,4 +0,0 @@
1
- from .get_body import *
2
- from .db_templates import *
3
- from .solana_rpc_client import get_rpc_dict,abstract_solana_rate_limited_call,make_call
4
- from .rate_limiter import *
@@ -1,215 +0,0 @@
1
- # Predefined table configurations
2
- def get_insert_list():
3
- return [{'fresh_call':True,'tableName': 'isconnected', 'columnSearch': None, 'insertName': 'connected', 'type': 'bool',
4
- 'searchQuery': 'SELECT connected FROM isconnected WHERE None = %s;',
5
- 'insertQuery': 'INSERT INTO isconnected (None, connected) VALUES (%s, %s)',
6
- 'table': 'CREATE TABLE IF NOT EXISTS isconnected (id SERIAL PRIMARY KEY,None REAL UNIQUE NOT NULL,connected JSONB NOT NULL);'},
7
- {'fresh_call':True,'tableName': 'getbalance', 'columnSearch': 'pubkey', 'insertName': 'balance', 'type': 'Balance',
8
- 'searchQuery': 'SELECT balance FROM getbalance WHERE pubkey = %s;',
9
- 'insertQuery': 'INSERT INTO getbalance (pubkey, balance) VALUES (%s, %s)',
10
- 'table': 'CREATE TABLE IF NOT EXISTS getbalance (id SERIAL PRIMARY KEY,pubkey REAL UNIQUE NOT NULL,balance JSONB NOT NULL);'},
11
- {'fresh_call':True,'tableName': 'getaccountinfo', 'columnSearch': 'pubkey', 'insertName': 'account_info', 'type': 'AccountInfo',
12
- 'searchQuery': 'SELECT account_info FROM getaccountinfo WHERE pubkey = %s;',
13
- 'insertQuery': 'INSERT INTO getaccountinfo (pubkey, account_info) VALUES (%s, %s)',
14
- 'table': 'CREATE TABLE IF NOT EXISTS getaccountinfo (id SERIAL PRIMARY KEY,pubkey REAL UNIQUE NOT NULL,account_info JSONB NOT NULL);'},
15
- {'fresh_call':True,'tableName': 'getaccountinfojsonparsed', 'columnSearch': 'pubkey', 'insertName': 'account_info_json_parsed', 'type': 'AccountInfoMaybeJsonParsed',
16
- 'searchQuery': 'SELECT account_info_json_parsed FROM getaccountinfojsonparsed WHERE pubkey = %s;',
17
- 'insertQuery': 'INSERT INTO getaccountinfojsonparsed (pubkey, account_info_json_parsed) VALUES (%s, %s)',
18
- 'table': 'CREATE TABLE IF NOT EXISTS getaccountinfojsonparsed (id SERIAL PRIMARY KEY,pubkey REAL UNIQUE NOT NULL,account_info_json_parsed JSONB NOT NULL);'},
19
- {'fresh_call':True,'tableName': 'getblockcommitment', 'columnSearch': 'slot', 'insertName': 'block_commitment', 'type': 'BlockCommitment',
20
- 'searchQuery': 'SELECT block_commitment FROM getblockcommitment WHERE slot = %s;',
21
- 'insertQuery': 'INSERT INTO getblockcommitment (slot, block_commitment) VALUES (%s, %s)',
22
- 'table': 'CREATE TABLE IF NOT EXISTS getblockcommitment (id SERIAL PRIMARY KEY,slot REAL UNIQUE NOT NULL,block_commitment JSONB NOT NULL);'},
23
- {'fresh_call':True,'tableName': 'getblocktime', 'columnSearch': 'slot', 'insertName': 'block_time', 'type': 'BlockTime',
24
- 'searchQuery': 'SELECT block_time FROM getblocktime WHERE slot = %s;',
25
- 'insertQuery': 'INSERT INTO getblocktime (slot, block_time) VALUES (%s, %s)',
26
- 'table': 'CREATE TABLE IF NOT EXISTS getblocktime (id SERIAL PRIMARY KEY,slot REAL UNIQUE NOT NULL,block_time JSONB NOT NULL);'},
27
- {'fresh_call':True,'tableName': 'getclusternodes', 'columnSearch': None, 'insertName': 'cluster_nodes', 'type': 'ClusterNodes',
28
- 'searchQuery': 'SELECT cluster_nodes FROM getclusternodes WHERE None = %s;',
29
- 'insertQuery': 'INSERT INTO getclusternodes (None, cluster_nodes) VALUES (%s, %s)',
30
- 'table': 'CREATE TABLE IF NOT EXISTS getclusternodes (id SERIAL PRIMARY KEY,None REAL UNIQUE NOT NULL,cluster_nodes JSONB NOT NULL);'},
31
- {'fresh_call':True,'tableName': 'getblock', 'columnSearch': 'slot', 'insertName': 'block', 'type': 'Block',
32
- 'searchQuery': 'SELECT block FROM getblock WHERE slot = %s;',
33
- 'insertQuery': 'INSERT INTO getblock (slot, block) VALUES (%s, %s)',
34
- 'table': 'CREATE TABLE IF NOT EXISTS getblock (id SERIAL PRIMARY KEY,slot REAL UNIQUE NOT NULL,block JSONB NOT NULL);'},
35
- {'fresh_call':True,'tableName': 'getrecentperformancesamples', 'columnSearch': 'limit', 'insertName': 'recent_performance_samples', 'type': 'RecentPerformanceSamples',
36
- 'searchQuery': 'SELECT recent_performance_samples FROM getrecentperformancesamples WHERE limit = %s;',
37
- 'insertQuery': 'INSERT INTO getrecentperformancesamples (limit, recent_performance_samples) VALUES (%s, %s)',
38
- 'table': 'CREATE TABLE IF NOT EXISTS getrecentperformancesamples (id SERIAL PRIMARY KEY,limit REAL UNIQUE NOT NULL,recent_performance_samples JSONB NOT NULL);'},
39
- {'fresh_call':True,'tableName': 'getblockheight', 'columnSearch': 'commitment', 'insertName': 'block_height', 'type': 'BlockHeight',
40
- 'searchQuery': 'SELECT block_height FROM getblockheight WHERE commitment = %s;',
41
- 'insertQuery': 'INSERT INTO getblockheight (commitment, block_height) VALUES (%s, %s)',
42
- 'table': 'CREATE TABLE IF NOT EXISTS getblockheight (id SERIAL PRIMARY KEY,commitment REAL UNIQUE NOT NULL,block_height JSONB NOT NULL);'},
43
- {'fresh_call':True,'tableName': 'getblocks', 'columnSearch': 'start_slot', 'insertName': 'blocks', 'type': 'Blocks',
44
- 'searchQuery': 'SELECT blocks FROM getblocks WHERE start_slot = %s;',
45
- 'insertQuery': 'INSERT INTO getblocks (start_slot, blocks) VALUES (%s, %s)',
46
- 'table': 'CREATE TABLE IF NOT EXISTS getblocks (id SERIAL PRIMARY KEY,start_slot REAL UNIQUE NOT NULL,blocks JSONB NOT NULL);'},
47
- {'fresh_call':True,'tableName': 'getsignaturesforaddress', 'columnSearch': 'account', 'insertName': 'signatures_for_address', 'type': 'SignaturesForAddress',
48
- 'searchQuery': 'SELECT signatures_for_address FROM getsignaturesforaddress WHERE account = %s;',
49
- 'insertQuery': 'INSERT INTO getsignaturesforaddress (account, signatures_for_address) VALUES (%s, %s)',
50
- 'table': 'CREATE TABLE IF NOT EXISTS getsignaturesforaddress (id SERIAL PRIMARY KEY,account REAL UNIQUE NOT NULL,signatures_for_address JSONB NOT NULL);'},
51
- {'fresh_call':False,'tableName': 'gettransaction', 'columnSearch': 'signature', 'insertName': 'transaction', 'type': 'Transaction',
52
- 'searchQuery': 'SELECT transaction FROM gettransaction WHERE signature = %s;',
53
- 'insertQuery': 'INSERT INTO gettransaction (signature, transaction) VALUES (%s, %s)',
54
- 'table': 'CREATE TABLE IF NOT EXISTS gettransaction (id SERIAL PRIMARY KEY,signature REAL UNIQUE NOT NULL,transaction JSONB NOT NULL);'},
55
- {'fresh_call':True,'tableName': 'getepochinfo', 'columnSearch': 'commitment', 'insertName': 'epoch_info', 'type': 'EpochInfo',
56
- 'searchQuery': 'SELECT epoch_info FROM getepochinfo WHERE commitment = %s;',
57
- 'insertQuery': 'INSERT INTO getepochinfo (commitment, epoch_info) VALUES (%s, %s)',
58
- 'table': 'CREATE TABLE IF NOT EXISTS getepochinfo (id SERIAL PRIMARY KEY,commitment REAL UNIQUE NOT NULL,epoch_info JSONB NOT NULL);'},
59
- {'fresh_call':True,'tableName': 'getepochschedule', 'columnSearch': None, 'insertName': 'epoch_schedule', 'type': 'EpochSchedule',
60
- 'searchQuery': 'SELECT epoch_schedule FROM getepochschedule WHERE None = %s;',
61
- 'insertQuery': 'INSERT INTO getepochschedule (None, epoch_schedule) VALUES (%s, %s)',
62
- 'table': 'CREATE TABLE IF NOT EXISTS getepochschedule (id SERIAL PRIMARY KEY,None REAL UNIQUE NOT NULL,epoch_schedule JSONB NOT NULL);'},
63
- {'fresh_call':True,'tableName': 'getfeeformessage', 'columnSearch': 'message', 'insertName': 'fee_for_message', 'type': 'FeeForMessage',
64
- 'searchQuery': 'SELECT fee_for_message FROM getfeeformessage WHERE message = %s;',
65
- 'insertQuery': 'INSERT INTO getfeeformessage (message, fee_for_message) VALUES (%s, %s)',
66
- 'table': 'CREATE TABLE IF NOT EXISTS getfeeformessage (id SERIAL PRIMARY KEY,message REAL UNIQUE NOT NULL,fee_for_message JSONB NOT NULL);'},
67
- {'fresh_call':True,'tableName': 'getfirstavailableblock', 'columnSearch': None, 'insertName': 'first_available_block', 'type': 'FirstAvailableBlock',
68
- 'searchQuery': 'SELECT first_available_block FROM getfirstavailableblock WHERE None = %s;',
69
- 'insertQuery': 'INSERT INTO getfirstavailableblock (None, first_available_block) VALUES (%s, %s)',
70
- 'table': 'CREATE TABLE IF NOT EXISTS getfirstavailableblock (id SERIAL PRIMARY KEY,None REAL UNIQUE NOT NULL,first_available_block JSONB NOT NULL);'},
71
- {'fresh_call':True,'tableName': 'getgenesishash', 'columnSearch': None, 'insertName': 'genesis_hash', 'type': 'GenesisHash',
72
- 'searchQuery': 'SELECT genesis_hash FROM getgenesishash WHERE None = %s;',
73
- 'insertQuery': 'INSERT INTO getgenesishash (None, genesis_hash) VALUES (%s, %s)',
74
- 'table': 'CREATE TABLE IF NOT EXISTS getgenesishash (id SERIAL PRIMARY KEY,None REAL UNIQUE NOT NULL,genesis_hash JSONB NOT NULL);'},
75
- {'fresh_call':True,'tableName': 'getidentity', 'columnSearch': None, 'insertName': 'identity', 'type': 'Identity',
76
- 'searchQuery': 'SELECT identity FROM getidentity WHERE None = %s;',
77
- 'insertQuery': 'INSERT INTO getidentity (None, identity) VALUES (%s, %s)',
78
- 'table': 'CREATE TABLE IF NOT EXISTS getidentity (id SERIAL PRIMARY KEY,None REAL UNIQUE NOT NULL,identity JSONB NOT NULL);'},
79
- {'fresh_call':True,'tableName': 'getinflationgovernor', 'columnSearch': 'commitment', 'insertName': 'inflation_governor', 'type': 'InflationGovernor',
80
- 'searchQuery': 'SELECT inflation_governor FROM getinflationgovernor WHERE commitment = %s;',
81
- 'insertQuery': 'INSERT INTO getinflationgovernor (commitment, inflation_governor) VALUES (%s, %s)',
82
- 'table': 'CREATE TABLE IF NOT EXISTS getinflationgovernor (id SERIAL PRIMARY KEY,commitment REAL UNIQUE NOT NULL,inflation_governor JSONB NOT NULL);'},
83
- {'fresh_call':True,'tableName': 'getinflationrate', 'columnSearch': None, 'insertName': 'inflation_rate', 'type': 'InflationRate',
84
- 'searchQuery': 'SELECT inflation_rate FROM getinflationrate WHERE None = %s;',
85
- 'insertQuery': 'INSERT INTO getinflationrate (None, inflation_rate) VALUES (%s, %s)',
86
- 'table': 'CREATE TABLE IF NOT EXISTS getinflationrate (id SERIAL PRIMARY KEY,None REAL UNIQUE NOT NULL,inflation_rate JSONB NOT NULL);'},
87
- {'fresh_call':True,'tableName': 'getinflationreward', 'columnSearch': 'pubkeys', 'insertName': 'inflation_reward', 'type': 'InflationReward',
88
- 'searchQuery': 'SELECT inflation_reward FROM getinflationreward WHERE pubkeys = %s;',
89
- 'insertQuery': 'INSERT INTO getinflationreward (pubkeys, inflation_reward) VALUES (%s, %s)',
90
- 'table': 'CREATE TABLE IF NOT EXISTS getinflationreward (id SERIAL PRIMARY KEY,pubkeys REAL UNIQUE NOT NULL,inflation_reward JSONB NOT NULL);'},
91
- {'fresh_call':True,'tableName': 'getlargestaccounts', 'columnSearch': 'filter_opt', 'insertName': 'largest_accounts', 'type': 'LargestAccounts',
92
- 'searchQuery': 'SELECT largest_accounts FROM getlargestaccounts WHERE filter_opt = %s;',
93
- 'insertQuery': 'INSERT INTO getlargestaccounts (filter_opt, largest_accounts) VALUES (%s, %s)',
94
- 'table': 'CREATE TABLE IF NOT EXISTS getlargestaccounts (id SERIAL PRIMARY KEY,filter_opt REAL UNIQUE NOT NULL,largest_accounts JSONB NOT NULL);'},
95
- {'fresh_call':True,'tableName': 'getleaderschedule', 'columnSearch': 'epoch', 'insertName': 'leader_schedule', 'type': 'LeaderSchedule',
96
- 'searchQuery': 'SELECT leader_schedule FROM getleaderschedule WHERE epoch = %s;',
97
- 'insertQuery': 'INSERT INTO getleaderschedule (epoch, leader_schedule) VALUES (%s, %s)',
98
- 'table': 'CREATE TABLE IF NOT EXISTS getleaderschedule (id SERIAL PRIMARY KEY,epoch REAL UNIQUE NOT NULL,leader_schedule JSONB NOT NULL);'},
99
- {'fresh_call':True,'tableName': 'getminimumbalanceforrentexemption', 'columnSearch': 'usize', 'insertName': 'minimum_balance_for_rent_exemption', 'type': 'MinimumBalanceForRentExemption',
100
- 'searchQuery': 'SELECT minimum_balance_for_rent_exemption FROM getminimumbalanceforrentexemption WHERE usize = %s;',
101
- 'insertQuery': 'INSERT INTO getminimumbalanceforrentexemption (usize, minimum_balance_for_rent_exemption) VALUES (%s, %s)',
102
- 'table': 'CREATE TABLE IF NOT EXISTS getminimumbalanceforrentexemption (id SERIAL PRIMARY KEY,usize REAL UNIQUE NOT NULL,minimum_balance_for_rent_exemption JSONB NOT NULL);'},
103
- {'fresh_call':True,'tableName': 'getmultipleaccounts', 'columnSearch': 'pubkeys', 'insertName': 'multiple_accounts', 'type': 'MultipleAccounts',
104
- 'searchQuery': 'SELECT multiple_accounts FROM getmultipleaccounts WHERE pubkeys = %s;',
105
- 'insertQuery': 'INSERT INTO getmultipleaccounts (pubkeys, multiple_accounts) VALUES (%s, %s)',
106
- 'table': 'CREATE TABLE IF NOT EXISTS getmultipleaccounts (id SERIAL PRIMARY KEY,pubkeys REAL UNIQUE NOT NULL,multiple_accounts JSONB NOT NULL);'},
107
- {'fresh_call':True,'tableName': 'getmultipleaccountsjsonparsed', 'columnSearch': 'pubkeys', 'insertName': 'multiple_accounts_json_parsed', 'type': 'MultipleAccountsMaybeJsonParsed',
108
- 'searchQuery': 'SELECT multiple_accounts_json_parsed FROM getmultipleaccountsjsonparsed WHERE pubkeys = %s;',
109
- 'insertQuery': 'INSERT INTO getmultipleaccountsjsonparsed (pubkeys, multiple_accounts_json_parsed) VALUES (%s, %s)',
110
- 'table': 'CREATE TABLE IF NOT EXISTS getmultipleaccountsjsonparsed (id SERIAL PRIMARY KEY,pubkeys REAL UNIQUE NOT NULL,multiple_accounts_json_parsed JSONB NOT NULL);'},
111
- {'fresh_call':True,'tableName': 'getprogramaccounts', 'columnSearch': 'pubkey', 'insertName': 'program_accounts', 'type': 'ProgramAccounts',
112
- 'searchQuery': 'SELECT program_accounts FROM getprogramaccounts WHERE pubkey = %s;',
113
- 'insertQuery': 'INSERT INTO getprogramaccounts (pubkey, program_accounts) VALUES (%s, %s)',
114
- 'table': 'CREATE TABLE IF NOT EXISTS getprogramaccounts (id SERIAL PRIMARY KEY,pubkey REAL UNIQUE NOT NULL,program_accounts JSONB NOT NULL);'},
115
- {'fresh_call':True,'tableName': 'getprogramaccountsjsonparsed', 'columnSearch': 'pubkey', 'insertName': 'program_accounts_json_parsed', 'type': 'ProgramAccountsMaybeJsonParsed',
116
- 'searchQuery': 'SELECT program_accounts_json_parsed FROM getprogramaccountsjsonparsed WHERE pubkey = %s;',
117
- 'insertQuery': 'INSERT INTO getprogramaccountsjsonparsed (pubkey, program_accounts_json_parsed) VALUES (%s, %s)',
118
- 'table': 'CREATE TABLE IF NOT EXISTS getprogramaccountsjsonparsed (id SERIAL PRIMARY KEY,pubkey REAL UNIQUE NOT NULL,program_accounts_json_parsed JSONB NOT NULL);'},
119
- {'fresh_call':True,'tableName': 'getlatestblockhash', 'columnSearch': 'commitment', 'insertName': 'latest_blockhash', 'type': 'LatestBlockhash',
120
- 'searchQuery': 'SELECT latest_blockhash FROM getlatestblockhash WHERE commitment = %s;',
121
- 'insertQuery': 'INSERT INTO getlatestblockhash (commitment, latest_blockhash) VALUES (%s, %s)',
122
- 'table': 'CREATE TABLE IF NOT EXISTS getlatestblockhash (id SERIAL PRIMARY KEY,commitment REAL UNIQUE NOT NULL,latest_blockhash JSONB NOT NULL);'},
123
- {'fresh_call':True,'tableName': 'getsignaturestatuses', 'columnSearch': 'signatures', 'insertName': 'signature_statuses', 'type': 'SignatureStatuses',
124
- 'searchQuery': 'SELECT signature_statuses FROM getsignaturestatuses WHERE signatures = %s;',
125
- 'insertQuery': 'INSERT INTO getsignaturestatuses (signatures, signature_statuses) VALUES (%s, %s)',
126
- 'table': 'CREATE TABLE IF NOT EXISTS getsignaturestatuses (id SERIAL PRIMARY KEY,signatures REAL UNIQUE NOT NULL,signature_statuses JSONB NOT NULL);'},
127
- {'fresh_call':True,'tableName': 'getslot', 'columnSearch': 'commitment', 'insertName': 'slot', 'type': 'Slot',
128
- 'searchQuery': 'SELECT slot FROM getslot WHERE commitment = %s;',
129
- 'insertQuery': 'INSERT INTO getslot (commitment, slot) VALUES (%s, %s)',
130
- 'table': 'CREATE TABLE IF NOT EXISTS getslot (id SERIAL PRIMARY KEY,commitment REAL UNIQUE NOT NULL,slot JSONB NOT NULL);'},
131
- {'fresh_call':True,'tableName': 'getslotleader', 'columnSearch': 'commitment', 'insertName': 'slot_leader', 'type': 'SlotLeader',
132
- 'searchQuery': 'SELECT slot_leader FROM getslotleader WHERE commitment = %s;',
133
- 'insertQuery': 'INSERT INTO getslotleader (commitment, slot_leader) VALUES (%s, %s)',
134
- 'table': 'CREATE TABLE IF NOT EXISTS getslotleader (id SERIAL PRIMARY KEY,commitment REAL UNIQUE NOT NULL,slot_leader JSONB NOT NULL);'},
135
- {'fresh_call':True,'tableName': 'getstakeactivation', 'columnSearch': 'pubkey', 'insertName': 'stake_activation', 'type': 'StakeActivation',
136
- 'searchQuery': 'SELECT stake_activation FROM getstakeactivation WHERE pubkey = %s;',
137
- 'insertQuery': 'INSERT INTO getstakeactivation (pubkey, stake_activation) VALUES (%s, %s)',
138
- 'table': 'CREATE TABLE IF NOT EXISTS getstakeactivation (id SERIAL PRIMARY KEY,pubkey REAL UNIQUE NOT NULL,stake_activation JSONB NOT NULL);'},
139
- {'fresh_call':True,'tableName': 'getsupply', 'columnSearch': 'commitment', 'insertName': 'supply', 'type': 'Supply',
140
- 'searchQuery': 'SELECT supply FROM getsupply WHERE commitment = %s;',
141
- 'insertQuery': 'INSERT INTO getsupply (commitment, supply) VALUES (%s, %s)',
142
- 'table': 'CREATE TABLE IF NOT EXISTS getsupply (id SERIAL PRIMARY KEY,commitment REAL UNIQUE NOT NULL,supply JSONB NOT NULL);'},
143
- {'fresh_call':True,'tableName': 'gettokenaccountbalance', 'columnSearch': 'pubkey', 'insertName': 'token_account_balance', 'type': 'TokenAccountBalance',
144
- 'searchQuery': 'SELECT token_account_balance FROM gettokenaccountbalance WHERE pubkey = %s;',
145
- 'insertQuery': 'INSERT INTO gettokenaccountbalance (pubkey, token_account_balance) VALUES (%s, %s)',
146
- 'table': 'CREATE TABLE IF NOT EXISTS gettokenaccountbalance (id SERIAL PRIMARY KEY,pubkey REAL UNIQUE NOT NULL,token_account_balance JSONB NOT NULL);'},
147
- {'fresh_call':True,'tableName': 'gettokenaccountsbydelegate', 'columnSearch': 'delegate', 'insertName': 'token_accounts_by_delegate', 'type': 'TokenAccountsByDelegate',
148
- 'searchQuery': 'SELECT token_accounts_by_delegate FROM gettokenaccountsbydelegate WHERE delegate = %s;',
149
- 'insertQuery': 'INSERT INTO gettokenaccountsbydelegate (delegate, token_accounts_by_delegate) VALUES (%s, %s)',
150
- 'table': 'CREATE TABLE IF NOT EXISTS gettokenaccountsbydelegate (id SERIAL PRIMARY KEY,delegate REAL UNIQUE NOT NULL,token_accounts_by_delegate JSONB NOT NULL);'},
151
- {'fresh_call':True,'tableName': 'gettokenaccountsbydelegatejsonparsed', 'columnSearch': 'delegate', 'insertName': 'token_accounts_by_delegate_json_parsed', 'type': 'TokenAccountsByDelegateJsonParsed',
152
- 'searchQuery': 'SELECT token_accounts_by_delegate_json_parsed FROM gettokenaccountsbydelegatejsonparsed WHERE delegate = %s;',
153
- 'insertQuery': 'INSERT INTO gettokenaccountsbydelegatejsonparsed (delegate, token_accounts_by_delegate_json_parsed) VALUES (%s, %s)',
154
- 'table': 'CREATE TABLE IF NOT EXISTS gettokenaccountsbydelegatejsonparsed (id SERIAL PRIMARY KEY,delegate REAL UNIQUE NOT NULL,token_accounts_by_delegate_json_parsed JSONB NOT NULL);'},
155
- {'fresh_call':True,'tableName': 'gettokenaccountsbyowner', 'columnSearch': 'owner', 'insertName': 'token_accounts_by_owner', 'type': 'TokenAccountsByOwner',
156
- 'searchQuery': 'SELECT token_accounts_by_owner FROM gettokenaccountsbyowner WHERE owner = %s;',
157
- 'insertQuery': 'INSERT INTO gettokenaccountsbyowner (owner, token_accounts_by_owner) VALUES (%s, %s)',
158
- 'table': 'CREATE TABLE IF NOT EXISTS gettokenaccountsbyowner (id SERIAL PRIMARY KEY,owner REAL UNIQUE NOT NULL,token_accounts_by_owner JSONB NOT NULL);'},
159
- {'fresh_call':True,'tableName': 'gettokenaccountsbyownerjsonparsed', 'columnSearch': 'owner', 'insertName': 'token_accounts_by_owner_json_parsed', 'type': 'TokenAccountsByOwnerJsonParsed',
160
- 'searchQuery': 'SELECT token_accounts_by_owner_json_parsed FROM gettokenaccountsbyownerjsonparsed WHERE owner = %s;',
161
- 'insertQuery': 'INSERT INTO gettokenaccountsbyownerjsonparsed (owner, token_accounts_by_owner_json_parsed) VALUES (%s, %s)',
162
- 'table': 'CREATE TABLE IF NOT EXISTS gettokenaccountsbyownerjsonparsed (id SERIAL PRIMARY KEY,owner REAL UNIQUE NOT NULL,token_accounts_by_owner_json_parsed JSONB NOT NULL);'},
163
- {'fresh_call':True,'tableName': 'gettokenlargestaccounts', 'columnSearch': 'pubkey', 'insertName': 'token_largest_accounts', 'type': 'TokenLargestAccounts',
164
- 'searchQuery': 'SELECT token_largest_accounts FROM gettokenlargestaccounts WHERE pubkey = %s;',
165
- 'insertQuery': 'INSERT INTO gettokenlargestaccounts (pubkey, token_largest_accounts) VALUES (%s, %s)',
166
- 'table': 'CREATE TABLE IF NOT EXISTS gettokenlargestaccounts (id SERIAL PRIMARY KEY,pubkey REAL UNIQUE NOT NULL,token_largest_accounts JSONB NOT NULL);'},
167
- {'fresh_call':True,'tableName': 'gettokensupply', 'columnSearch': 'pubkey', 'insertName': 'token_supply', 'type': 'TokenSupply',
168
- 'searchQuery': 'SELECT token_supply FROM gettokensupply WHERE pubkey = %s;',
169
- 'insertQuery': 'INSERT INTO gettokensupply (pubkey, token_supply) VALUES (%s, %s)',
170
- 'table': 'CREATE TABLE IF NOT EXISTS gettokensupply (id SERIAL PRIMARY KEY,pubkey REAL UNIQUE NOT NULL,token_supply JSONB NOT NULL);'},
171
- {'fresh_call':True,'tableName': 'gettransactioncount', 'columnSearch': 'commitment', 'insertName': 'transaction_count', 'type': 'TransactionCount',
172
- 'searchQuery': 'SELECT transaction_count FROM gettransactioncount WHERE commitment = %s;',
173
- 'insertQuery': 'INSERT INTO gettransactioncount (commitment, transaction_count) VALUES (%s, %s)',
174
- 'table': 'CREATE TABLE IF NOT EXISTS gettransactioncount (id SERIAL PRIMARY KEY,commitment REAL UNIQUE NOT NULL,transaction_count JSONB NOT NULL);'},
175
- {'fresh_call':True,'tableName': 'getminimumledgerslot', 'columnSearch': None, 'insertName': 'minimum_ledger_slot', 'type': 'MinimumLedgerSlot',
176
- 'searchQuery': 'SELECT minimum_ledger_slot FROM getminimumledgerslot WHERE None = %s;',
177
- 'insertQuery': 'INSERT INTO getminimumledgerslot (None, minimum_ledger_slot) VALUES (%s, %s)',
178
- 'table': 'CREATE TABLE IF NOT EXISTS getminimumledgerslot (id SERIAL PRIMARY KEY,None REAL UNIQUE NOT NULL,minimum_ledger_slot JSONB NOT NULL);'},
179
- {'fresh_call':True,'tableName': 'getversion', 'columnSearch': None, 'insertName': 'version', 'type': 'Version',
180
- 'searchQuery': 'SELECT version FROM getversion WHERE None = %s;',
181
- 'insertQuery': 'INSERT INTO getversion (None, version) VALUES (%s, %s)',
182
- 'table': 'CREATE TABLE IF NOT EXISTS getversion (id SERIAL PRIMARY KEY,None REAL UNIQUE NOT NULL,version JSONB NOT NULL);'},
183
- {'fresh_call':True,'tableName': 'getvoteaccounts', 'columnSearch': 'commitment', 'insertName': 'vote_accounts', 'type': 'VoteAccounts',
184
- 'searchQuery': 'SELECT vote_accounts FROM getvoteaccounts WHERE commitment = %s;',
185
- 'insertQuery': 'INSERT INTO getvoteaccounts (commitment, vote_accounts) VALUES (%s, %s)',
186
- 'table': 'CREATE TABLE IF NOT EXISTS getvoteaccounts (id SERIAL PRIMARY KEY,commitment REAL UNIQUE NOT NULL,vote_accounts JSONB NOT NULL);'},
187
- {'fresh_call':True,'tableName': 'requestairdrop', 'columnSearch': 'pubkey', 'insertName': 'airdrop', 'type': 'RequestAirdrop',
188
- 'searchQuery': 'SELECT airdrop FROM requestairdrop WHERE pubkey = %s;',
189
- 'insertQuery': 'INSERT INTO requestairdrop (pubkey, airdrop) VALUES (%s, %s)',
190
- 'table': 'CREATE TABLE IF NOT EXISTS requestairdrop (id SERIAL PRIMARY KEY,pubkey REAL UNIQUE NOT NULL,airdrop JSONB NOT NULL);'},
191
- {'fresh_call':True,'tableName': 'sendrawtransaction', 'columnSearch': 'txn', 'insertName': 'raw_transaction', 'type': 'SendTransaction',
192
- 'searchQuery': 'SELECT raw_transaction FROM sendrawtransaction WHERE txn = %s;',
193
- 'insertQuery': 'INSERT INTO sendrawtransaction (txn, raw_transaction) VALUES (%s, %s)',
194
- 'table': 'CREATE TABLE IF NOT EXISTS sendrawtransaction (id SERIAL PRIMARY KEY,txn REAL UNIQUE NOT NULL,raw_transaction JSONB NOT NULL);'},
195
- {'fresh_call':True,'tableName': 'sendtransaction', 'columnSearch': 'txn', 'insertName': 'transaction', 'type': 'SendTransaction',
196
- 'searchQuery': 'SELECT transaction FROM sendtransaction WHERE txn = %s;',
197
- 'insertQuery': 'INSERT INTO sendtransaction (txn, transaction) VALUES (%s, %s)',
198
- 'table': 'CREATE TABLE IF NOT EXISTS sendtransaction (id SERIAL PRIMARY KEY,txn REAL UNIQUE NOT NULL,transaction JSONB NOT NULL);'},
199
- {'fresh_call':True,'tableName': 'simulatetransaction', 'columnSearch': 'txn', 'insertName': 'transaction', 'type': 'SimulateTransaction',
200
- 'searchQuery': 'SELECT transaction FROM simulatetransaction WHERE txn = %s;',
201
- 'insertQuery': 'INSERT INTO simulatetransaction (txn, transaction) VALUES (%s, %s)',
202
- 'table': 'CREATE TABLE IF NOT EXISTS simulatetransaction (id SERIAL PRIMARY KEY,txn REAL UNIQUE NOT NULL,transaction JSONB NOT NULL);'},
203
- {'fresh_call':True,'tableName': 'validatorexit', 'columnSearch': None, 'insertName': 'exit', 'type': 'ValidatorExit',
204
- 'searchQuery': 'SELECT exit FROM validatorexit WHERE None = %s;',
205
- 'insertQuery': 'INSERT INTO validatorexit (None, exit) VALUES (%s, %s)',
206
- 'table': 'CREATE TABLE IF NOT EXISTS validatorexit (id SERIAL PRIMARY KEY,None REAL UNIQUE NOT NULL,exit JSONB NOT NULL);'},
207
- {'fresh_call':True,'tableName': 'postsendwithconfirm', 'columnSearch': 'resp', 'insertName': '_post_send_with_confirm', 'type': 'SendTransaction',
208
- 'searchQuery': 'SELECT _post_send_with_confirm FROM postsendwithconfirm WHERE resp = %s;',
209
- 'insertQuery': 'INSERT INTO postsendwithconfirm (resp, _post_send_with_confirm) VALUES (%s, %s)',
210
- 'table': 'CREATE TABLE IF NOT EXISTS postsendwithconfirm (id SERIAL PRIMARY KEY,resp REAL UNIQUE NOT NULL,_post_send_with_confirm JSONB NOT NULL);'},
211
- {'fresh_call':True,'tableName': 'confirmtransaction', 'columnSearch': 'tx_sig', 'insertName': 'transaction', 'type': 'SignatureStatuses',
212
- 'searchQuery': 'SELECT transaction FROM confirmtransaction WHERE tx_sig = %s;',
213
- 'insertQuery': 'INSERT INTO confirmtransaction (tx_sig, transaction) VALUES (%s, %s)',
214
- 'table': 'CREATE TABLE IF NOT EXISTS confirmtransaction (id SERIAL PRIMARY KEY,tx_sig REAL UNIQUE NOT NULL,transaction JSONB NOT NULL);'}
215
- ]
@@ -1,211 +0,0 @@
1
- import PySimpleGUI as sg
2
- from .get_body import Client
3
- from abstract_gui import *
4
- import inspect
5
-
6
- # Example of getting the expected args dynamically from a function
7
- def get_dict_from_vars(values, function):
8
- # Get the signature of the function
9
- sig = inspect.signature(function)
10
-
11
- # Filter out the values that match the expected function parameters
12
- filtered_values = {key: values[key] for key in sig.parameters if key in values}
13
-
14
- return filtered_values
15
- client = Client()
16
- def get_sample_var(var):
17
- signatures = ["5EzaJ7GrBUqT9gAGqNR1vNcduhpgc5agiLXWMW9hcmo4Lzbyqy66VFqa26uY81BkqWLtrpWr4NqkKvfRL5qzAfAt","2LLrwwzk3E8yb7JPwp8E15ZvYwnKHVHs1K9CNs6rzDiDUsCCU6U15UjAfMijur2bVK7Q7tvMC6p1J1xe3xjx8Gnn"]
18
- pubkey = "BJ8aUaWmAbbUdFFYhFbmhNPrH4NncWj7ACZD5E4bpump"
19
- mint = "HpfiQovafVvvKPgFMbYhbrY2LX9GeuTTR4saN25Xpump"
20
- account="GBzQG2iFrPwXjGtCnwNt9S5eHd8xAR8jUMt3QDJpnjud"
21
- delegate="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
22
- signer = "HMU77m6WSL9Xew9YvVCgz1hLuhzamz74eD9avi4XPdr"
23
- slot = 287731841
24
- owner = "AfQ1oaudsGjvznX4JNEw671hi57JfWo4CWqhtkdgoVHU"
25
- return {
26
- 'tx':"01b3795ccfaac3eee838bb05c3b8284122c18acedcd645c914fe8e178c3b62640d8616d061cc818b26cab8ecf3855ecc",
27
- 'mint':mint,
28
- 'pubkeys': [pubkey, pubkey],
29
- 'limit': 100,
30
- 'recent_blockhash': "HZ5VGgojr2ZS3sFc7QUaiLGdzLmEGP7nHu5ZRhhoFjg4",
31
- 'pubkey': pubkey,
32
- 'start_slot': 287731841,
33
- 'filters': [{'dataSize': 165}],
34
- 'sig_verify': True,
35
- 'Transaction': None, # Placeholder if not using a specific transaction object yet
36
- 'commitment': 'confirmed',
37
- 'until': None, # Can be user-input for upper range of transaction signature
38
- 'before': None, # Can be user-input for lower range of transaction signature
39
- '*signers': [], # List of required signers
40
- 'delegate': delegate,
41
- 'opts': {'skipPreflight': True, 'preflightCommitment': 'confirmed'},
42
- 'message': None, # Message to be signed, if applicable
43
- 'sleep_seconds': 2,
44
- 'epoch': None, # Epoch can be retrieved or user-specified
45
- 'lamports': 0, # Number of lamports for sending transactions
46
- 'VersionedTransaction': None, # Placeholder if using versioned transactions
47
- 'signature': signatures[0],
48
- 'search_transaction_history': True,
49
- 'last_valid_block_height': 5000000,
50
- 'txn': None, # Placeholder for raw transaction data
51
- 'filter_opt': {'mint': mint}, # Optional filter for mint
52
- 'tx_sig': signatures[0],
53
- 'encoding': "jsonParsed",
54
- 'end_slot': slot,
55
- 'account': account,
56
- 'usize': 1024,
57
- 'conf_comm': None, # Placeholder for confirmation commitment
58
- 'data_slice': {'offset': 0, 'bytes': 'base58_encoded_value'},
59
- 'max_supported_transaction_version': 0,
60
- 'owner': owner,
61
- 'types.MemcmpOpts': 0,#{'offset': 0, 'bytes': 'base58_encoded_value'},
62
- 'before': None,
63
- 'signatures': [signatures[0], signatures[1]],
64
- 'slot': slot,
65
- 'signers':[signer,signer],
66
- 'signer':signer,
67
- "preflight_commitment":True,
68
- }.get(var)
69
- def convert_to_lower(strings):
70
- nustring = ''
71
- for char in str(strings):
72
- if char in list('ABCDEFGHIJKLMNOPQRSTUVWXYZ'):
73
- char = f"_{char.lower()}"
74
- nustring+=char
75
- return nustring
76
- def get_cal_function(strings):
77
- return ''.join([f"{string[1][0].upper()}{string[1][1:].lower()}" if string[1] and string[0] > 0 else string[1] for string in enumerate(strings.split('_'))])
78
- def get_functions_js():
79
- return {'get_balance': ['pubkey', 'commitment'], 'get_account_info': ['pubkey', 'commitment', 'encoding', 'data_slice'], 'get_account_info_json_parsed': ['pubkey', 'commitment'], 'get_block_commitment': ['slot'], 'get_block_time': ['slot'], 'get_cluster_nodes': [], 'get_block': ['slot', 'encoding', 'max_supported_transaction_version', 'None'], 'get_recent_performance_samples': ['limit'], 'get_block_height': ['commitment'], 'get_blocks': ['start_slot', 'end_slot'], 'get_signatures_for_address': ['account', 'before', 'until', 'limit', 'commitment'], 'get_transaction': ['signature', 'encoding', 'commitment', 'max_supported_transaction_version'], 'get_epoch_info': ['commitment'], 'get_epoch_schedule': [], 'get_fee_for_message': ['message', 'commitment'], 'get_first_available_block': [], 'get_genesis_hash': [], 'get_identity': [], 'get_inflation_governor': ['commitment'], 'get_inflation_rate': [], 'get_inflation_reward': ['pubkeys', 'epoch', 'commitment'], 'get_largest_accounts': ['filter_opt', 'commitment'], 'get_leader_schedule': ['epoch', 'commitment'], 'get_minimum_balance_for_rent_exemption': ['usize', 'commitment'], 'get_multiple_accounts': ['pubkeys', 'commitment', 'encoding', 'data_slice'], 'get_multiple_accounts_json_parsed': ['pubkeys', 'commitment'], 'get_program_accounts': ['pubkey', 'commitment', 'encoding', 'data_slice', 'filters', 'types.MemcmpOpts'], 'get_program_accounts_json_parsed': ['pubkey', 'commitment', 'filters', 'types.MemcmpOpts'], 'get_latest_blockhash': ['commitment'], 'get_signature_statuses': ['signatures', 'search_transaction_history'], 'get_slot': ['commitment'], 'get_slot_leader': ['commitment'], 'get_stake_activation': ['pubkey', 'epoch', 'commitment'], 'get_supply': ['commitment'], 'get_token_account_balance': ['pubkey', 'commitment'], 'get_token_accounts_by_delegate': ['delegate', 'opts', 'commitment'], 'get_token_accounts_by_delegate_json_parsed': ['delegate', 'opts', 'commitment'], 'get_token_accounts_by_owner': ['owner', 'opts', 'commitment'], 'get_token_accounts_by_owner_json_parsed': ['owner', 'opts', 'commitment'], 'get_token_largest_accounts': ['pubkey', 'commitment'], 'get_token_supply': ['pubkey', 'commitment'], 'get_transaction_count': ['commitment'], 'get_minimum_ledger_slot': [], 'get_version': [], 'get_vote_accounts': ['commitment'], 'request_airdrop': ['pubkey', 'lamports', 'commitment'], 'send_raw_transaction': ['txn', 'opts'], 'send_transaction': ['txn', 'Transaction', '*signers', 'opts', 'recent_blockhash'], 'simulate_transaction': ['txn', 'VersionedTransaction', 'sig_verify', 'commitment'], 'validator_exit': [], '__post_send_with_confirm': ['resp', 'conf_comm', 'last_valid_block_height'], 'confirm_transaction': ['tx_sig', 'commitment', 'sleep_seconds', 'last_valid_block_height']}
80
- def get_functions_list():
81
- return list(get_functions_js().keys())
82
- def get_list_vars():
83
- return list(get_functions_js().values())
84
- def get_all_vars():
85
- total_ls = []
86
- for obj in get_list_vars():
87
- total_ls+=obj
88
- return total_ls
89
-
90
- def get_vars(function):
91
- return get_functions_js().get(function)
92
-
93
- def get_longest(list_obj):
94
- list_obj = [len(string) for string in list_obj]
95
- list_obj.sort()
96
- return list_obj[-1]
97
-
98
- def get_var_inputs():
99
- inputs=[]
100
- for i in range(get_longest(get_list_vars())):
101
- inputs.append([make_component('Input','',size=(get_longest(get_all_vars()),1),key=f'var_{i}'),make_component('Input','',size=(get_longest(get_all_vars()),1),key=f'input_{i}')])
102
- return [inputs]
103
- def clear_inputs(window):
104
- for i in range(get_longest(get_list_vars())):
105
- window[f'var_{i}'].update(value='')
106
- window[f'input_{i}'].update(value='')
107
- def get_dict_from_vars(values, function):
108
- # Get the signature of the function
109
- sig = inspect.signature(function)
110
- # Filter out the values that match the expected function parameters
111
- filtered_values = {key: get_sample_var(key) for key in list(sig.parameters.keys()) if key in values}
112
-
113
- return filtered_values
114
- def get_result(function,values):
115
- try:
116
- result = function(**values)
117
- except:
118
- result = {}
119
- return result
120
- def get_function(lowered):
121
- try:
122
- function = getattr(client, lowered)
123
- except:
124
- function =None
125
- return function
126
- def second_window():
127
- sg.theme('DarkGrey14')
128
- menu_def = [['&File', ['&Open Ctrl-O', '&Save Ctrl-S', '&Properties', 'E&xit']],
129
- ['&Edit', ['&Paste', ['Special', 'Normal', ], 'Undo', 'Options::this_is_a_menu_key'], ],
130
- ['&Toolbar', ['---', 'Command &1', 'Command &2','---', 'Command &3', 'Command &4']],
131
- ['&NetworkTools', ['---','RPC',['Add RPC', 'Choose RPC','get Manual RPC'], 'Choose RPC &2','---', 'Command &3', 'Command &4']],
132
- ['APIs',['chainScan'],
133
- ['&Help', ['&About...']]]]
134
- right_click_menu = ['Unused', ['Right', '!&Click', '&Menu', 'E&xit', 'Properties']]
135
- layout = [[sg.Menu(menu_def, tearoff=True, font='_ 12', key='-MENUBAR-')],
136
- [sg.Text('Right click me for a right click menu example')],
137
- [sg.ButtonMenu('ButtonMenu', right_click_menu, key='-BMENU-', text_color='red', disabled_text_color='green'),
138
- sg.Button('Plain Button')],
139
- make_component('Frame','url',[[sg.Input('https://solcatcher.io', size=(40, 1), key='url')]]),
140
- make_component('combo', get_functions_list(), size=(get_longest(get_functions_list()), 1), key='body_functions',enable_events=True),
141
- make_component('combo', [get_cal_function(string) for string in get_functions_list()],
142
- size=(get_longest(get_functions_list()), 1), key='call_functions',enable_events=True)],get_var_inputs(),[sg.Multiline(size=(88, 20), font='Courier 10', key='output')]
143
- results={}
144
- for lowered in get_functions_list():
145
-
146
- if lowered:
147
- function = get_function(lowered)
148
- if function:
149
- sig = inspect.signature(function)
150
- dictsa = {}
151
- revsa = {}
152
- for i,var in enumerate(list(sig.parameters.keys())):
153
- dictsa[var]=get_sample_var(var)
154
- revsa[get_sample_var(var)]:var
155
- # Get function by its name dynamically
156
-
157
- try:
158
- # Pass filtered arguments
159
- result = get_result(function,dictsa)
160
- params =result.get('params',[])
161
-
162
- for i,param in enumerate(params):
163
- if isinstance(param,dict):
164
- for key,value in param.items():
165
- param[key]=key
166
- params[i]= param
167
- else:
168
- for key,value in dictsa.items():
169
- if value == param:
170
- param = key
171
- params[i] = key
172
- break
173
-
174
-
175
-
176
- except TypeError as e:
177
- print(f"Error calling function: {e}")
178
- result = {}
179
- results[lowered] = result
180
- window = sg.Window('Script launcher', layout)
181
- results = {}
182
- while True:
183
- event, values = window.read()
184
- if event == 'EXIT' or event == sg.WIN_CLOSED:
185
- break # exit button clicked
186
- if event in ['body_functions', 'call_functions']:
187
- clear_inputs(window)
188
- lowered = convert_to_lower(values['body_functions'])
189
- window['body_functions'].update(value=lowered)
190
- window['call_functions'].update(value=get_sample_var(lowered))
191
- if lowered:
192
- function = getattr(client, lowered)
193
- sig = inspect.signature(function)
194
- dictsa = {}
195
- for i,var in enumerate(list(sig.parameters.keys())):
196
- window[f'var_{i}'].update(value=var)
197
- window[f'input_{i}'].update(value=get_sample_var(var))
198
- dictsa[var]=get_sample_var(var)
199
- # Get function by its name dynamically
200
-
201
-
202
- try:
203
- filtered_values = get_dict_from_vars(values, function)
204
- # Pass filtered arguments
205
- result = get_result(function,dictsa)
206
- except TypeError as e:
207
- print(f"Error calling function: {e}")
208
- result = {}
209
- results[lowered] = results
210
-
211
-