Connect token filter to tracker

This commit is contained in:
nolash 2021-10-29 16:35:11 +02:00
parent e2ef9b43c8
commit 83ecdaf023
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746
4 changed files with 12 additions and 0 deletions

View File

@ -3,3 +3,4 @@ from .tx import TxFilter
from .gas import GasFilter from .gas import GasFilter
from .register import RegistrationFilter from .register import RegistrationFilter
from .transferauth import TransferAuthFilter from .transferauth import TransferAuthFilter
from .token import TokenFilter

View File

@ -9,6 +9,7 @@ from chainlib.eth.contract import (
) )
from chainlib.eth.constant import ZERO_ADDRESS from chainlib.eth.constant import ZERO_ADDRESS
from chainlib.eth.address import is_same_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 import CICRegistry
from cic_eth_registry.erc20 import ERC20Token from cic_eth_registry.erc20 import ERC20Token
from eth_token_index import TokenUniqueSymbolIndex from eth_token_index import TokenUniqueSymbolIndex

View File

@ -36,6 +36,7 @@ from cic_eth.runnable.daemons.filters import (
TxFilter, TxFilter,
RegistrationFilter, RegistrationFilter,
TransferAuthFilter, TransferAuthFilter,
TokenFilter,
) )
from cic_eth.stat import init_chain_stat from cic_eth.stat import init_chain_stat
from cic_eth.registry import ( from cic_eth.registry import (
@ -154,6 +155,8 @@ def main():
gas_filter = GasFilter(chain_spec, config.get('CELERY_QUEUE')) 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')) #transfer_auth_filter = TransferAuthFilter(registry, chain_spec, config.get('_CELERY_QUEUE'))
i = 0 i = 0
@ -163,6 +166,7 @@ def main():
syncer.add_filter(registration_filter) 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 # 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(tx_filter)
syncer.add_filter(token_gas_cache_filter)
#syncer.add_filter(transfer_auth_filter) #syncer.add_filter(transfer_auth_filter)
for cf in callback_filters: for cf in callback_filters:
syncer.add_filter(cf) syncer.add_filter(cf)

View File

@ -152,6 +152,12 @@ else
deploy_minter_${TOKEN_MINTER_MODE} $TOKEN_ADDRESS deploy_minter_${TOKEN_MINTER_MODE} $TOKEN_ADDRESS
fi 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 check_wait 3
>&2 echo -e "\033[;96mWriting env_reset file\033[;39m" >&2 echo -e "\033[;96mWriting env_reset file\033[;39m"