Comment on page
This part explains how to write unit tests during integration with Liquidswap Smart Contracts.
To be able to run tests, you need to prepare the Liquidswap state in your test. There's a couple of utilities available to help you with that:
It correctly initialize both Liquidswap and
LP<X, Y, Curve>token of the Liquidswap. That process is pretty involved, so we provide this helper function to make it easier. Run it after the
genesis::setup()call from Aptos Framework.
coin_yto the pool, and automatically deposits returning lp coins to the
lp_owneraccount, handling the edge cases.
An example of the test would be:
Example of unit test