utilities.add_argument('--hash', help='calculate function signature hash', metavar='SIGNATURE')
utilities.add_argument('--storage', help='read state variables from storage index, use with -a', metavar='INDEX,NUM_SLOTS,[array]')
utilities.add_argument('--storage', help='read state variables from storage index, use with -a', metavar='INDEX,NUM_SLOTS,[array] / mapping,INDEX,[KEY1, KEY2...]')
utilities.add_argument('--solv', help='specify solidity compiler version. If not present, will try to install it (Experimental)', metavar='SOLV')
options = parser.add_argument_group('options')
@ -331,9 +331,24 @@ if args.storage:
if not args.address:
exitWithError(args.outform, "To read storage, provide the address of a deployed contract with the -a option.")
else:
(position, length) = (0, 1)
(position, length, mappings) = (0, 1, [])
try:
params = args.storage.split(",")
if params[0] == "mapping":
if len(params) < 3:
exitWithError(args.outform, "Invalid number of parameters.")