def solc_arguments(libraries=None, combined='bin,abi', optimize=True, extra_args=None):
 args = ['--combined-json', combined, '--add-std']
 if optimize:
  args.append('--optimize')
 if extra_args:
  try:
   args.extend(shlex.split(extra_args))
  except:
   args.extend(extra_args)
 if ((libraries is not None) and len(libraries)):
  addresses = ['{name}:{address}'.format(name=name, address=address.decode('utf8')) for (name, address) in libraries.items()]
  args.extend(['--libraries', ','.join(addresses)])
 return args

def solc_arguments ( libraries = None , combined = 'bin,abi' , optimize = True , extra_args = None ) : args = [ '--combined-json' , combined , '--add-std' ] if optimize : args . append ( '--optimize' ) if extra_args : try : args . extend ( shlex . split ( extra_args ) ) except : args . extend ( extra_args ) if ( ( libraries is not None ) and len ( libraries ) ) : addresses = [ '{name}:{address}' . format ( name = name , address = address . decode ( 'utf8' ) ) for ( name , address ) in libraries . items ( ) ] args . extend ( [ '--libraries' , ',' . join ( addresses ) ] ) return args
build the arguments to call the solc binary .