Compare commits

...

7 Commits

8 changed files with 13 additions and 6 deletions

View File

@ -114,7 +114,7 @@ def list_tx_by_bloom(self, bloomspec, address, chain_spec_dict):
# TODO: pass through registry to validate declarator entry of token # TODO: pass through registry to validate declarator entry of token
#token = registry.by_address(tx['to'], sender_address=self.call_address) #token = registry.by_address(tx['to'], sender_address=self.call_address)
token = ERC20Token(rpc, tx['to']) token = ERC20Token(chain_spec, rpc, tx['to'])
token_symbol = token.symbol token_symbol = token.symbol
token_decimals = token.decimals token_decimals = token.decimals
times = tx_times(tx['hash'], chain_spec) times = tx_times(tx['hash'], chain_spec)

View File

@ -12,6 +12,7 @@ from chainqueue.error import NotLocalTxError
# local imports # local imports
from cic_eth.task import CriticalSQLAlchemyAndWeb3Task from cic_eth.task import CriticalSQLAlchemyAndWeb3Task
from cic_eth.db.models.base import SessionBase
celery_app = celery.current_app celery_app = celery.current_app

View File

@ -1,4 +1,4 @@
cic-base==0.1.2b3 cic-base==0.1.2b5
celery==4.4.7 celery==4.4.7
crypto-dev-signer~=0.4.14b3 crypto-dev-signer~=0.4.14b3
confini~=0.3.6rc3 confini~=0.3.6rc3
@ -15,10 +15,10 @@ semver==2.13.0
websocket-client==0.57.0 websocket-client==0.57.0
moolb~=0.1.1b2 moolb~=0.1.1b2
eth-address-index~=0.1.1a9 eth-address-index~=0.1.1a9
chainlib~=0.0.2a18 chainlib~=0.0.2a20
hexathon~=0.0.1a7 hexathon~=0.0.1a7
chainsyncer[sql]~=0.0.2a2 chainsyncer[sql]~=0.0.2a2
chainqueue~=0.0.1a7 chainqueue~=0.0.2a2
pysha3==1.0.2 pysha3==1.0.2
coincurve==15.0.0 coincurve==15.0.0
sarafu-faucet==0.0.2a28 sarafu-faucet==0.0.2a28

View File

@ -210,9 +210,11 @@ def test_callback_filter(
def __init__(self): def __init__(self):
self.results = {} self.results = {}
self.queue = 'test'
def call_back(self, transfer_type, result): def call_back(self, transfer_type, result):
self.results[transfer_type] = result self.results[transfer_type] = result
return self
mock = CallbackMock() mock = CallbackMock()
fltr.call_back = mock.call_back fltr.call_back = mock.call_back

View File

@ -65,6 +65,7 @@ def test_tx(
tx_hash_hex_orig = tx_hash_hex tx_hash_hex_orig = tx_hash_hex
gas_oracle = OverrideGasOracle(price=1100000000, limit=21000) gas_oracle = OverrideGasOracle(price=1100000000, limit=21000)
c = Gas(default_chain_spec, signer=eth_signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
(tx_hash_hex, tx_signed_raw_hex) = c.create(agent_roles['ALICE'], agent_roles['BOB'], 100 * (10 ** 6), tx_format=TxFormat.RLP_SIGNED) (tx_hash_hex, tx_signed_raw_hex) = c.create(agent_roles['ALICE'], agent_roles['BOB'], 100 * (10 ** 6), tx_format=TxFormat.RLP_SIGNED)
queue_create( queue_create(
default_chain_spec, default_chain_spec,

View File

@ -53,6 +53,9 @@ def init_database(
alembic.command.downgrade(ac, 'base') alembic.command.downgrade(ac, 'base')
alembic.command.upgrade(ac, 'head') alembic.command.upgrade(ac, 'head')
session.execute('DELETE FROM lock')
session.commit()
yield session yield session
session.commit() session.commit()
session.close() session.close()

View File

@ -273,7 +273,7 @@ def test_tx(
eth_signer, eth_signer,
agent_roles, agent_roles,
contract_roles, contract_roles,
celery_worker, celery_session_worker,
): ):
nonce_oracle = RPCNonceOracle(agent_roles['ALICE'], eth_rpc) nonce_oracle = RPCNonceOracle(agent_roles['ALICE'], eth_rpc)

View File

@ -35,7 +35,7 @@ def test_list_tx(
foo_token, foo_token,
register_tokens, register_tokens,
init_eth_tester, init_eth_tester,
celery_worker, celery_session_worker,
): ):
tx_hashes = [] tx_hashes = []