You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Though this transition is pretty menial, it is a necessary first step for addressing #213, independently of the path we end up choosing (conditional compilation vs. having a tez/FA2 wrapper contract). By making all the core logic deal with an opaque-ish type tok we can defer the choice of collateral type to a higher level. With this PR checker.ml deals with tez—as it did before—and makes calls to tok_of_tez before calling core logic and tez_of_tok when interpreting results from core logic. No other module makes calls to these conversion functions (excluding the tests ofc).
While working on this I also noticed that our API uses tez in names which we probably want to rename to something more generic: Deposit_tez and Withdraw_tez (which I think we could rename to Deposit_collateral and Withdraw_collateral).
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Though this transition is pretty menial, it is a necessary first step for addressing #213, independently of the path we end up choosing (conditional compilation vs. having a tez/FA2 wrapper contract). By making all the core logic deal with an opaque-ish type
tok
we can defer the choice of collateral type to a higher level. With this PRchecker.ml
deals with tez—as it did before—and makes calls totok_of_tez
before calling core logic andtez_of_tok
when interpreting results from core logic. No other module makes calls to these conversion functions (excluding the tests ofc).While working on this I also noticed that our API uses
tez
in names which we probably want to rename to something more generic:Deposit_tez
andWithdraw_tez
(which I think we could rename toDeposit_collateral
andWithdraw_collateral
).