diff --git a/apps/cic-eth/cic_eth/runnable/daemons/filters/__init__.py b/apps/cic-eth/cic_eth/runnable/daemons/filters/__init__.py index d2a9823b..8b63297a 100644 --- a/apps/cic-eth/cic_eth/runnable/daemons/filters/__init__.py +++ b/apps/cic-eth/cic_eth/runnable/daemons/filters/__init__.py @@ -3,3 +3,4 @@ from .tx import TxFilter from .gas import GasFilter from .register import RegistrationFilter from .transferauth import TransferAuthFilter +from .token import TokenFilter diff --git a/apps/cic-eth/cic_eth/runnable/daemons/filters/token.py b/apps/cic-eth/cic_eth/runnable/daemons/filters/token.py index ef3352c6..e1cb54f5 100644 --- a/apps/cic-eth/cic_eth/runnable/daemons/filters/token.py +++ b/apps/cic-eth/cic_eth/runnable/daemons/filters/token.py @@ -9,6 +9,7 @@ from chainlib.eth.contract import ( ) from chainlib.eth.constant import ZERO_ADDRESS from chainlib.eth.address import is_same_address +from chainlib.eth.error import RequestMismatchException from cic_eth_registry import CICRegistry from cic_eth_registry.erc20 import ERC20Token from eth_token_index import TokenUniqueSymbolIndex diff --git a/apps/cic-eth/cic_eth/runnable/daemons/tracker.py b/apps/cic-eth/cic_eth/runnable/daemons/tracker.py index a173119d..680eb796 100644 --- a/apps/cic-eth/cic_eth/runnable/daemons/tracker.py +++ b/apps/cic-eth/cic_eth/runnable/daemons/tracker.py @@ -36,6 +36,7 @@ from cic_eth.runnable.daemons.filters import ( TxFilter, RegistrationFilter, TransferAuthFilter, + TokenFilter, ) from cic_eth.stat import init_chain_stat from cic_eth.registry import ( @@ -154,6 +155,8 @@ def main(): gas_filter = GasFilter(chain_spec, config.get('CELERY_QUEUE')) + token_gas_cache_filter = TokenFilter(chain_spec, config.get('CELERY_QUEUE')) + #transfer_auth_filter = TransferAuthFilter(registry, chain_spec, config.get('_CELERY_QUEUE')) i = 0 @@ -163,6 +166,7 @@ def main(): syncer.add_filter(registration_filter) # TODO: the two following filter functions break the filter loop if return uuid. Pro: less code executed. Con: Possibly unintuitive flow break syncer.add_filter(tx_filter) + syncer.add_filter(token_gas_cache_filter) #syncer.add_filter(transfer_auth_filter) for cf in callback_filters: syncer.add_filter(cf) diff --git a/apps/contract-migration/3_deploy_token.sh b/apps/contract-migration/3_deploy_token.sh index c6278f75..46578e6a 100644 --- a/apps/contract-migration/3_deploy_token.sh +++ b/apps/contract-migration/3_deploy_token.sh @@ -152,6 +152,12 @@ else deploy_minter_${TOKEN_MINTER_MODE} $TOKEN_ADDRESS fi +>&2 echo -e "\033[;96mTransfer a single token to self to poke the gas cacher\033[;39m" +advance_nonce +debug_rpc +r=`erc20-transfer $DEV_WAIT_FLAG --nonce $nonce $fee_price_arg -p $RPC_PROVIDER -y $WALLET_KEY_FILE -i $CHAIN_SPEC -u $DEV_DEBUG_FLAG -s -e $TOKEN_ADDRESS -a $DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER 1` +add_pending_tx_hash $r + check_wait 3 >&2 echo -e "\033[;96mWriting env_reset file\033[;39m"