parameters: (arguments: Sequence[str] = None)
return_statement: return args0
docstring: Parse arguments
docstring_summary: Parse arguments
docstring_tokens: Parse arguments
function: def args_parse(arguments: Sequence[str] = None) -> argparse.Namespace:
      ''' Parse arguments '''
      par0 = argparse.ArgumentParser(
          description='Calculate ceiling characteristics based on curve parameters')
  
      # Required
      par0.add_argument('--limit', metavar='LIMIT', required=True, type=Decimal,
                        help='Ceiling limit')
      par0.add_argument('--curve-factor', metavar='FACTOR', required=True, type=Decimal,
                        help='Curve factor')
      # Optional
      par0.add_argument('--collected-start', metavar='WEI', type=Decimal,
                        default=Decimal('0'), help='Amount collected at start of curve')
      par0.add_argument('--gas-per-tx-1st', metavar='AMOUNT', type=Decimal,
                        default=Decimal('151070'), help='Gas used per 1st transaction')
      par0.add_argument('--gas-per-tx-2nd', metavar='AMOUNT', type=Decimal,
                        default=Decimal('123765'), help='Gas used for all subsequent transactions')
      par0.add_argument('--gas-price', metavar='WEI', type=Decimal,
                        default=Decimal('50000000000'), help='Gas price')
      par0.add_argument('--fee-token', metavar='FRACTION', type=Decimal,
                        default=Decimal('0.1'), help='Max fee cost as fraction of token value')
      par0.add_argument('--collect-min', metavar='WEI', type=Decimal,
                        help='Minimum collection amount')
      par0.add_argument('--gas-limit', metavar='AMOUNT', type=Decimal,
                        default=Decimal('4700000'), help='Gas limit per block')
      par0.add_argument('--secs-per-block', metavar='SECONDS', type=Decimal,
                        default=Decimal('16.07'), help='Average seconds per block')
      par0.add_argument('--print-txs', action='store_true',
                        default=False, help='Print every individual transaction')
      par0.add_argument('--txs-per-address', metavar='NUMBER', type=Decimal,
                        default=Decimal('1'), help='Average number of TXs per address')
      par0.add_argument(
          '--congestion', metavar='FRACTION', type=Decimal,
          default=Decimal('0.8'),
          help='Chance of contribution TXs being confirmed due to network congestion'
      )
      par0.add_argument('--collect-mean', metavar='FRACTION', type=Decimal,
                        default=Decimal('0.9'), help='Collected of TX from amount possible')
  
      args0 = par0.parse_args(arguments)
  
      if args0.txs_per_address < 1:
          print('--txs-per-address can\'t be less than 1', file=sys.stderr)
          sys.exit(1)
  
      return args0
function_tokens: def args_parse ( arguments : Sequence [ str ] = None ) -> argparse . Namespace : par0 = argparse . ArgumentParser ( description = 'Calculate ceiling characteristics based on curve parameters' ) # Required par0 . add_argument ( '--limit' , metavar = 'LIMIT' , required = True , type = Decimal , help = 'Ceiling limit' ) par0 . add_argument ( '--curve-factor' , metavar = 'FACTOR' , required = True , type = Decimal , help = 'Curve factor' ) # Optional par0 . add_argument ( '--collected-start' , metavar = 'WEI' , type = Decimal , default = Decimal ( '0' ) , help = 'Amount collected at start of curve' ) par0 . add_argument ( '--gas-per-tx-1st' , metavar = 'AMOUNT' , type = Decimal , default = Decimal ( '151070' ) , help = 'Gas used per 1st transaction' ) par0 . add_argument ( '--gas-per-tx-2nd' , metavar = 'AMOUNT' , type = Decimal , default = Decimal ( '123765' ) , help = 'Gas used for all subsequent transactions' ) par0 . add_argument ( '--gas-price' , metavar = 'WEI' , type = Decimal , default = Decimal ( '50000000000' ) , help = 'Gas price' ) par0 . add_argument ( '--fee-token' , metavar = 'FRACTION' , type = Decimal , default = Decimal ( '0.1' ) , help = 'Max fee cost as fraction of token value' ) par0 . add_argument ( '--collect-min' , metavar = 'WEI' , type = Decimal , help = 'Minimum collection amount' ) par0 . add_argument ( '--gas-limit' , metavar = 'AMOUNT' , type = Decimal , default = Decimal ( '4700000' ) , help = 'Gas limit per block' ) par0 . add_argument ( '--secs-per-block' , metavar = 'SECONDS' , type = Decimal , default = Decimal ( '16.07' ) , help = 'Average seconds per block' ) par0 . add_argument ( '--print-txs' , action = 'store_true' , default = False , help = 'Print every individual transaction' ) par0 . add_argument ( '--txs-per-address' , metavar = 'NUMBER' , type = Decimal , default = Decimal ( '1' ) , help = 'Average number of TXs per address' ) par0 . add_argument ( '--congestion' , metavar = 'FRACTION' , type = Decimal , default = Decimal ( '0.8' ) , help = 'Chance of contribution TXs being confirmed due to network congestion' ) par0 . add_argument ( '--collect-mean' , metavar = 'FRACTION' , type = Decimal , default = Decimal ( '0.9' ) , help = 'Collected of TX from amount possible' ) args0 = par0 . parse_args ( arguments ) if args0 . txs_per_address < 1 : print ( '--txs-per-address can\'t be less than 1' , file = sys . stderr ) sys . exit ( 1 ) return args0