|
|
@@ -99,6 +99,27 @@ def find_transaction():
|
|
|
print('No contract found')
|
|
|
else:
|
|
|
transactions = decrypt_transactions(transactions, str(key.get()))
|
|
|
+ print('Current contract state')
|
|
|
+ pprint.pprint(current_contract_state(transactions, iden=iden))
|
|
|
+
|
|
|
+ conn.close()
|
|
|
+ newWindow.destroy()
|
|
|
+
|
|
|
+ def findall():
|
|
|
+ conn = rpyc.connect(host='localhost', port=42069, keepalive=True)
|
|
|
+ iden = get_plain_key(str(key.get()))
|
|
|
+ transactions = conn.root.find_transactions(iden)
|
|
|
+ if len(transactions) == 0:
|
|
|
+ print('No contract found')
|
|
|
+ else:
|
|
|
+ transactions = decrypt_transactions(transactions, str(key.get()))
|
|
|
+ print('All updates')
|
|
|
+ for item in transactions:
|
|
|
+ if item['type'] != 'init':
|
|
|
+ pprint.pprint(item)
|
|
|
+ print('\n')
|
|
|
+
|
|
|
+ print('Current contract state')
|
|
|
pprint.pprint(current_contract_state(transactions, iden=iden))
|
|
|
|
|
|
conn.close()
|
|
|
@@ -112,7 +133,8 @@ def find_transaction():
|
|
|
key.grid(row=0, column=1, columnspan=3, padx=10, pady=10)
|
|
|
key.insert(0, 'test')
|
|
|
|
|
|
- Button(newWindow, text='find contracts', command=find).grid(row=1, column=1)
|
|
|
+ Button(newWindow, text='find contracts', command=find).grid(row=2, column=0)
|
|
|
+ Button(newWindow, text='find contracts and updates', command=findall).grid(row=2, column=1)
|
|
|
|
|
|
|
|
|
def add_term():
|