Closed mhchia closed 7 years ago
test()
Main functions
call_deposit(state, validator_manager_addr, sender_privkey, value, validation_code_addr, return_addr) returns validator_index, transaction
call_withdraw(state, validator_manager_addr, sender_privkey, validator_index, signature) returns success, transaction
call_sample(state, validator_manager_addr, block_number, shard_id, sig_index) returns validation_code_addr
call_validation_code(state, validation_code_addr, msg_hash, signature) returns success
TODO
State
startgas
gaslimit
I advise moving the tests to sharding/tests/test_contract_utils.py, so we can test the entire project by pytest sharding/tests command.
sharding/tests/test_contract_utils.py
pytest sharding/tests
This PR is contained by the PR #6
A simple version of the contract utils of basic sharding v1 with a simple tester
test()
, without unit-tests.Main functions
call_deposit(state, validator_manager_addr, sender_privkey, value, validation_code_addr, return_addr) returns validator_index, transaction
call_withdraw(state, validator_manager_addr, sender_privkey, validator_index, signature) returns success, transaction
call_sample(state, validator_manager_addr, block_number, shard_id, sig_index) returns validation_code_addr
call_validation_code(state, validation_code_addr, msg_hash, signature) returns success
TODO
State
startgas
andgaslimit