Closed gkaracha closed 2 years ago
@dorranh feel free to have a look/merge this after #289; that one is certainly of higher priority at the moment.
Also, while developing this I came across some issues due to the way we currently deal with a couple token ids:
tokens.collateral.token_id
(in checker.yaml
) and TezWrapper.tez_token_id
must be the same when collateral = TEZ
.tokens.cfmm_token.token_id
(in checker.yaml
) and Wctez.wctez_token_id
must be the same when collateral = TEZ
.
Currently TezWrapper.tez_token_id
and Wctez.wctez_token_id
are set manually which is a problem (when they get out of sync Checker gets into an inconsistent state and the e2e tests fail).Gas costs | 85e872ab2e3145c6a73c7eaac3150ced8ba28939 | 3a3c815e3d3d994bd173318f7ca65a09312efca4 | Diff |
---|---|---|---|
checker%remove_liquidity | 12769 | 13162 | 393 |
checker%sell_kit | 11919 | 12312 | 393 |
checker%add_liquidity | 12841 | 12466 | -375 |
checker%buy_kit | 12687 | 12313 | -374 |
checker%touch | 42372 | 42381 | 9 |
checker%deposit_collateral | 19864 | 19866 | 2 |
checker%transfer | 6311 | 6313 | 2 |
checker%withdraw_collateral | 22898 | 22900 | 2 |
checker%touch_burrow | 6102 | 6104 | 2 |
checker%create_burrow | 22163 | 22164 | 1 |
checker%update_operators | 5589 | 5590 | 1 |
checker%set_burrow_delegate | 18185 | 18186 | 1 |
checker%burn_kit | 7360 | 7361 | 1 |
checker%deactivate_burrow | 23257 | 23258 | 1 |
checker%activate_burrow | 19680 | 19681 | 1 |
checker%mint_kit | 7132 | 7133 | 1 |
Entrypoint sizes | 85e872ab2e3145c6a73c7eaac3150ced8ba28939 | 3a3c815e3d3d994bd173318f7ca65a09312efca4 | Diff |
---|---|---|---|
buy_kit | 1319 | 1395 | 76 |
sell_kit | 1315 | 1391 | 76 |
add_liquidity | 1802 | 1878 | 76 |
remove_liquidity | 1922 | 1998 | 76 |
Test coverage: No change.
Great, thanks for having a look! :pray:
Fixes #279 by utilizing the FA2 ctez wrapper introduced in #286 as the de facto contract we use for the CFMM.