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-10-28 05:18:54 +02: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:
|
2021-11-03 12:35:09 +01:00
|
|
|
self.add_argument('--registry-address', type=str, dest='registry_address', help='CIC registry contract address')
|
|
|
|
self.add_argument('--trust-address', type=str, dest='trust_address', action='append', help='Add trust address')
|