-
Notifications
You must be signed in to change notification settings - Fork 0
/
sanitycheck.py
36 lines (29 loc) · 930 Bytes
/
sanitycheck.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from Contract import TornadoCashContract
from Mainnet import EthMainnet
from Wallet import Wallet
def test1():
chain = EthMainnet(5)
tc = TornadoCashContract(chain)
user = Wallet(chain=chain, wid=0, initial_money=1)
user.send_transaction(contract=tc, function='deposit', args={'from': 1, 'to': 1})
print('After Deposit')
print("Chain:")
eth_chain = chain.get_main_net_txn()
print(eth_chain)
print(eth_chain['args'].values)
print('------')
print('Contract:')
tc_chain = tc._merkle_tree
print(tc_chain)
user.send_transaction(contract=tc, function='withdraw', args={'from': 1, 'to': 1})
print('\n\nAfter withdraw')
print("Chain:")
eth_chain = chain.get_main_net_txn()
print(eth_chain)
print(eth_chain['args'].values)
print('------')
print('Contract:')
tc_chain = tc._merkle_tree
print(tc_chain)
if __name__ == '__main__':
test1()