diff --git a/apps/cic-eth/cic_eth/runnable/daemons/tracker.py b/apps/cic-eth/cic_eth/runnable/daemons/tracker.py index 0a977825..94b29883 100644 --- a/apps/cic-eth/cic_eth/runnable/daemons/tracker.py +++ b/apps/cic-eth/cic_eth/runnable/daemons/tracker.py @@ -78,6 +78,14 @@ chain_spec = ChainSpec.from_chain_str(config.get('CIC_CHAIN_SPEC')) cic_base.rpc.setup(chain_spec, config.get('ETH_PROVIDER')) +rpc = RPCConnection.connect(chain_spec, 'default') +registry = None +try: + registry = connect_registry(rpc, chain_spec, config.get('CIC_REGISTRY_ADDRESS')) +except UnknownContractError as e: + logg.exception('Registry contract connection failed for {}: {}'.format(config.get('CIC_REGISTRY_ADDRESS'), e)) + sys.exit(1) +logg.info('connected contract registry {}'.format(config.get('CIC_REGISTRY_ADDRESS'))) def main(): @@ -85,7 +93,6 @@ def main(): celery.Celery(broker=config.get('CELERY_BROKER_URL'), backend=config.get('CELERY_RESULT_URL')) # Connect to blockchain with chainlib - rpc = RPCConnection.connect(chain_spec, 'default') o = block_latest() r = rpc.do(o) @@ -151,7 +158,8 @@ def main(): tx_filter = TxFilter(chain_spec, config.get('_CELERY_QUEUE')) - registration_filter = RegistrationFilter(chain_spec, config.get('_CELERY_QUEUE')) + account_registry_address = registry.by_name('AccountRegistry') + registration_filter = RegistrationFilter(chain_spec, account_registry_address, queue=config.get('_CELERY_QUEUE')) gas_filter = GasFilter(chain_spec, config.get('_CELERY_QUEUE')) diff --git a/apps/cic-eth/services_requirements.txt b/apps/cic-eth/services_requirements.txt index e7842d75..c802b823 100644 --- a/apps/cic-eth/services_requirements.txt +++ b/apps/cic-eth/services_requirements.txt @@ -12,3 +12,4 @@ cic-eth-registry~=0.5.6a1 erc20-faucet~=0.2.2a1 sarafu-faucet~=0.0.4a1 moolb~=0.1.1b2 +erc20-transfer-authorization~=0.3.2a1