-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add full stack whitelist AMM test #9
Comments
It looks like four separated tests cases too me:
Testing all scenario in single test makes big blob which is difficult to follow, and in case of failure it is slightly more difficult to find a reason. Splitting test to test well defined path is often better (it is also just single responsibility rule mapped to the QA world). |
Yes, 4 different tests make sense when you have this nice suite setup.
Yes
tfi-pair doesn't have a group. the asset in it is a dso token and in a group. we can have it part of a group that has one member, that can fill liquidity. but all other users are not in the group and no one can do anything with it.
I think this is already tested in dso-token code. you can improve those for sure.
Yes |
Clarifying something about tokens. There are three tokens we want to test.
For the suite, I would imagine setting something up which is cw20 to cw20. It takes I would make a different suite setup that is only cw20-cw20 so the interfaces match and just a slightly different setup. |
The cases for me are:
"can swap" and "can provide liquidity" can both be tested, they have the same controls |
In tests, create 4 contracts using multitest:
tfi-factory
generic AMM factorycw4-group
as a DSO placeholder (for testing)cw20-whitelist
contract that points to the abovecw4-group
tfi-factory
to createtfi-pair
that swaps between a native token and thiscw20-whitelist
tokenActions:
cw4-group
members cannot provide liquidity to thetfi-pair
.tfi-pair
to thecw4-group
"whitelist"cw4-group
members to add liquidity totfi-pair
and make a swapcw4-group
members cannot do a swap in either directionThe text was updated successfully, but these errors were encountered: