|
|
|
@ -17,7 +17,7 @@ import os |
|
|
|
|
|
|
|
|
|
def searchCallback(addresses): |
|
|
|
|
print("Match found in contract deployed at: ") |
|
|
|
|
print(addresses) |
|
|
|
|
print(addresses.join("\n")) |
|
|
|
|
|
|
|
|
|
def exitWithError(message): |
|
|
|
|
print(message) |
|
|
|
@ -40,7 +40,12 @@ parser.add_argument('--rpcport', type=int, default=8545, help='RPC port') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app_root = os.path.dirname(os.path.realpath(__file__)) |
|
|
|
|
db_path = os.path.join(app_root, "database", "contractstorage.fs") |
|
|
|
|
db_dir = os.path.join(app_root, "database") |
|
|
|
|
|
|
|
|
|
if not os.path.exists(db_dir): |
|
|
|
|
os.makedirs(db_dir) |
|
|
|
|
|
|
|
|
|
db_path = os.path.join(db_dir, "contractstorage.fs") |
|
|
|
|
|
|
|
|
|
storage = FileStorage.FileStorage(db_path) |
|
|
|
|
db = ZODB.DB(storage) |
|
|
|
|