abstract-solana 0.0.2.98__tar.gz → 0.0.2.100__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.
- {abstract_solana-0.0.2.98 → abstract_solana-0.0.2.100}/PKG-INFO +1 -1
- {abstract_solana-0.0.2.98 → abstract_solana-0.0.2.100}/setup.py +1 -1
- abstract_solana-0.0.2.100/src/abstract_solana/abstract_utils/__init__.py +1 -0
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_utils/pubkey_utils.py → abstract_solana-0.0.2.100/src/abstract_solana/abstract_utils/pubKeyUtils.py +0 -0
- {abstract_solana-0.0.2.98 → abstract_solana-0.0.2.100}/src/abstract_solana.egg-info/PKG-INFO +1 -1
- abstract_solana-0.0.2.100/src/abstract_solana.egg-info/SOURCES.txt +11 -0
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_rpcs/__init__.py +0 -4
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_rpcs/db_templates.py +0 -215
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_rpcs/get_api_gui.py +0 -211
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_rpcs/get_body.py +0 -1178
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_rpcs/rate_limiter.py +0 -177
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_rpcs/solana_rpc_client.py +0 -101
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_utils/__init__.py +0 -10
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_utils/account_key_utils.py +0 -20
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_utils/constants.py +0 -30
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_utils/genesis_functions.py +0 -14
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_utils/index_utils.py +0 -43
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_utils/keypair_utils.py +0 -17
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_utils/log_message_functions.py +0 -151
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_utils/price_utils.py +0 -78
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_utils/signature_data_parse.py +0 -57
- abstract_solana-0.0.2.98/src/abstract_solana/abstract_utils/utils.py +0 -16
- abstract_solana-0.0.2.98/src/abstract_solana.egg-info/SOURCES.txt +0 -26
- {abstract_solana-0.0.2.98 → abstract_solana-0.0.2.100}/README.md +0 -0
- {abstract_solana-0.0.2.98 → abstract_solana-0.0.2.100}/pyproject.toml +0 -0
- {abstract_solana-0.0.2.98 → abstract_solana-0.0.2.100}/setup.cfg +0 -0
- {abstract_solana-0.0.2.98 → abstract_solana-0.0.2.100}/src/abstract_solana/__init__.py +0 -0
- {abstract_solana-0.0.2.98 → abstract_solana-0.0.2.100}/src/abstract_solana.egg-info/dependency_links.txt +0 -0
- {abstract_solana-0.0.2.98 → abstract_solana-0.0.2.100}/src/abstract_solana.egg-info/requires.txt +0 -0
- {abstract_solana-0.0.2.98 → abstract_solana-0.0.2.100}/src/abstract_solana.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .pubKeyUtils import *
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
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/pubKeyUtils.py
|
|
@@ -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
|
-
|