Add callback filter test file stub

This commit is contained in:
nolash 2021-04-14 10:18:31 +02:00
parent 6535760abb
commit 25847de75e
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746
4 changed files with 39 additions and 11 deletions

View File

@ -10,7 +10,7 @@ version = (
0, 0,
11, 11,
0, 0,
'beta.1', 'beta.4',
) )
version_object = semver.VersionInfo( version_object = semver.VersionInfo(

View File

@ -1,25 +1,24 @@
cic-base~=0.1.2a67 cic-base~=0.1.2a70
celery==4.4.7 celery==4.4.7
crypto-dev-signer~=0.4.14a17 crypto-dev-signer~=0.4.14b2
confini~=0.3.6rc3 confini~=0.3.6rc3
cic-eth-registry~=0.5.4a12 cic-eth-registry~=0.5.4a14
#cic-bancor~=0.0.6 #cic-bancor~=0.0.6
redis==3.5.3 redis==3.5.3
alembic==1.4.2 alembic==1.4.2
websockets==8.1 websockets==8.1
requests~=2.24.0 requests~=2.24.0
eth_accounts_index~=0.0.11a7 eth_accounts_index~=0.0.11a9
erc20-transfer-authorization~=0.3.1a3 erc20-transfer-authorization~=0.3.1a5
#simple-rlp==0.1.2
uWSGI==2.0.19.1 uWSGI==2.0.19.1
semver==2.13.0 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.1a7 eth-address-index~=0.1.1a9
chainlib~=0.0.2a10 chainlib~=0.0.2a12
hexathon~=0.0.1a7 hexathon~=0.0.1a7
chainsyncer[sql]==0.0.2a1 chainsyncer[sql]==0.0.2a1
chainqueue~=0.0.1a7 chainqueue~=0.0.1a7
pysha3==1.0.2 pysha3==1.0.2
coincurve==15.0.0 coincurve==15.0.0
sarafu-faucet==0.0.2a21 sarafu-faucet==0.0.2a25

View File

@ -4,4 +4,4 @@ pytest-mock==3.3.1
pytest-cov==2.10.1 pytest-cov==2.10.1
eth-tester==0.5.0b3 eth-tester==0.5.0b3
py-evm==0.3.0a20 py-evm==0.3.0a20
giftable-erc20-token==0.0.8a4 giftable-erc20-token==0.0.8a9

View File

@ -0,0 +1,29 @@
# external imports
from chainlib.connection import RPCConnection
from chainlib.eth.nonce import RPCNonceOracle
from chainlib.eth.gas import OverrideGasOracle
from chainlib.eth.tx import receipt
from chainlib.eth.erc20 import ERC20
def test_transfer_tx(
default_chain_spec,
init_database,
eth_rpc,
eth_signer,
foo_token,
agent_roles,
token_roles,
celery_session_worker,
):
rpc = RPCConnection.connect(default_chain_spec, 'default')
nonce_oracle = RPCNonceOracle(token_roles['FOO_TOKEN_OWNER'], rpc)
gas_oracle = OverrideGasOracle(conn=rpc, limit=200000)
txf = ERC20(default_chain_spec, signer=eth_signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
(tx_hash_hex, o) = txf.transfer(foo_token, token_roles['FOO_TOKEN_OWNER'], agent_roles['ALICE'], 1024)
r = rpc.do(o)
o = receipt(tx_hash_hex)
r = rpc.do(o)
assert r['status'] == 1