Open MaksymZavershynskyi opened 4 years ago
To clarify, these are meant to be unit tests, because
their interaction with each other (and ERC20) by using mocks>
In detail:
we need to check for the Near2EthProver that it handles correctly both
nearprover/contracts/NearBridgeMock.sol
Same thing with Token, when token interacts with ERC20 we need to test
token-locker/contracts/MockERC20.sol
when it interacts with prover:
token-locker/contracts/NearProverMock.sol
So in short, we only need to mock contracts of three failure cases listed above.
We need to test the following Solidity contracts: Near2EthClient, Near2EthProver, Locker, and their interaction with each other (and ERC20) by using mocks. Specifically we need to check for each interaction: the success case, and the failure case, e.g. we need to check for the Near2EthProver that it handles correctly both failure by Near2EthClient and success by Near2EthClient. Same thing with Token, when token interacts with ERC20 we need to test for failure to transfer, success to transfer; when it interacts with prover: failed proof, successful proof.