This directory contains e2e tests for Farm contract, written using drink!
and ink-wrapper
integration. Currently, this integration lives in a feature branch of ink-wrapper
repository and its future is not set in stone. It does however allow for writing e2e-styled unit tests for contracts using statically-typed API generated by the ink-wrapper
.
In Makefile
of the farm
directory you will find calls to ink-wrapper
but it assumes that you're using ink-wrapper
installed from a specific git hash:
cargo install --git https://github.com/Cardinal-Cryptography/ink-wrapper --rev 28bce20d63ff174a437b89c7e9becc78cd4dbd52 ink-wrapper
We do not guarantee it will work with other versions.
The tests require some setting up to do:
- Build the contracts.
- Generate wrappers.
- Copy output of the (2) to the test directory.
All of the above is taken care of by the Makefile
in the parent directory. Simply run make all-drink
.