2021-08-17 08:46:51 +02:00
|
|
|
# external imports
|
|
|
|
from chainlib.eth.cli import ArgumentParser as BaseArgumentParser
|
|
|
|
|
|
|
|
# local imports
|
|
|
|
from .base import (
|
|
|
|
CICFlag,
|
|
|
|
Flag,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
class ArgumentParser(BaseArgumentParser):
|
|
|
|
|
|
|
|
def process_local_flags(self, local_arg_flags):
|
|
|
|
if local_arg_flags & CICFlag.CELERY:
|
2021-08-17 10:03:14 +02:00
|
|
|
self.add_argument('-q', '--celery-queue', dest='celery_queue', type=str, default='cic-cache', help='Task queue')
|
2021-08-17 08:46:51 +02:00
|
|
|
if local_arg_flags & CICFlag.SYNCER:
|
2021-12-22 19:24:05 +01:00
|
|
|
self.add_argument('--offset', type=int, help='Start block height for initial history sync')
|
2021-08-17 08:46:51 +02:00
|
|
|
self.add_argument('--no-history', action='store_true', dest='no_history', help='Skip initial history sync')
|
|
|
|
if local_arg_flags & CICFlag.CHAIN:
|
|
|
|
self.add_argument('-r', '--registry-address', type=str, dest='registry_address', help='CIC registry contract address')
|