|
|
@ -35,6 +35,7 @@ parser.add_argument('-a', '--address', default='0x0123456789ABCDEF0123456789ABCD |
|
|
|
parser.add_argument('-o', '--outfile') |
|
|
|
parser.add_argument('-o', '--outfile') |
|
|
|
parser.add_argument('--data', help='message call input data for tracing') |
|
|
|
parser.add_argument('--data', help='message call input data for tracing') |
|
|
|
parser.add_argument('--search', help='search the contract database') |
|
|
|
parser.add_argument('--search', help='search the contract database') |
|
|
|
|
|
|
|
parser.add_argument('--xrefs', help='get xrefs from contract in database', metavar='CONTRACT_HASH') |
|
|
|
parser.add_argument('--hash', help='calculate function signature hash', metavar='SIGNATURE') |
|
|
|
parser.add_argument('--hash', help='calculate function signature hash', metavar='SIGNATURE') |
|
|
|
parser.add_argument('--init-db', action='store_true', help='Initialize the contract database') |
|
|
|
parser.add_argument('--init-db', action='store_true', help='Initialize the contract database') |
|
|
|
parser.add_argument('--sync-all', action='store_true', help='Also sync contracts with zero balance') |
|
|
|
parser.add_argument('--sync-all', action='store_true', help='Also sync contracts with zero balance') |
|
|
@ -110,6 +111,12 @@ elif (args.search): |
|
|
|
|
|
|
|
|
|
|
|
contract_storage.search(args.search, searchCallback) |
|
|
|
contract_storage.search(args.search, searchCallback) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif (args.xrefs): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
contract_hash = bytes.fromhex(args.xrefs) |
|
|
|
|
|
|
|
contract = contract_storage.get_contract_by_hash(contract_hash) |
|
|
|
|
|
|
|
print("\n".join(contract.get_xrefs())) |
|
|
|
|
|
|
|
|
|
|
|
elif (args.init_db): |
|
|
|
elif (args.init_db): |
|
|
|
contract_storage.initialize(args.rpchost, args.rpcport, args.sync_all) |
|
|
|
contract_storage.initialize(args.rpchost, args.rpcport, args.sync_all) |
|
|
|
|
|
|
|
|
|
|
|