#!/usr/bin/env python3 import sys import getconf # construct daemon url CHAIN = sys.argv[1] RPCURL = getconf.def_credentials(CHAIN) oraclelist_result = getconf.oracleslist_rpc(CHAIN) for oracle_txid in oraclelist_result: oraclesinfo_result = getconf.oraclesinfo_rpc(CHAIN, oracle_txid) description = oraclesinfo_result['description'] name = oraclesinfo_result['name'] if description[0:4] == 'CHAT': print('[' + name + ': ' + description[5:] + ']: ' + oracle_txid)
# construct daemon url i = 0 ID = 1 oracletxIDs = [] oracleChains = [] HOME = os.environ['HOME'] with open(HOME + '/StakedNotary/assetchains.json') as file: assetchains = json.load(file) print(colorTable.colors[i] + 'ID'.rjust(3) + ' | ' + 'ASSET CHAIN'.ljust(12) + ' | ' + 'ORACLE NAME'.ljust(20) + ' | ' + 'ORACLE DESCIPTION'.ljust(50) + ' | ' + 'ORACLE TX ID') for chain in assetchains: RPCURL = getconf.def_credentials(chain['ac_name']) oraclelist_result = getconf.oracleslist_rpc(chain['ac_name']) i += 1 for oracle_txid in oraclelist_result: oraclesinfo_result = getconf.oraclesinfo_rpc(chain['ac_name'], oracle_txid) description = oraclesinfo_result['description'] name = oraclesinfo_result['name'] # if description[0:3] == 'GPS': print(colorTable.colors[i] + str(ID).rjust(3) + ' | ' + chain['ac_name'].ljust(12) + ' | ' + name.ljust(20) + ' | ' + description.ljust(50) + ' | ' + oracle_txid) oracletxIDs.append(oracle_txid) oracleChains.append(chain['ac_name']) ID += 1