-
Notifications
You must be signed in to change notification settings - Fork 19
Adding Example Smart Contracts and Traces. #955
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments here and there.
@williamdemeo and I had discussed with @Ali-Hill that probably it will be better to move all the examples to its own hierarchy outside of src
. Maybe in a folder called src-ext-test
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is a symlink to the result of nix-build. It should not be added to git
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the contents of this file relate to scripts I suggest to move it to the Script folder.
I see two options:
- Merge it with
Script.Base
- Replace
Script.Base
by this module and move the currentScript.Base
toScript.Structure
(or something along those lines)
⦃ Dec-validPlutusScript ⦄ : ∀ {x} → (validPlutusScript x ⁇³) | ||
language : PlutusScript → Language | ||
toData : ∀ {A : Type} → A → Data | ||
-- toData : ∀ {A : Type} → A → Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented out?
-- valContext : TxInfo → ScriptPurpose → Data | ||
-- valContext txinfo sp = toData (txinfo , sp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these lines commented out?
--valContext : TxInfo → ScriptPurpose → Data | ||
--valContext txinfo sp = toData (txinfo , sp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these lines commented out?
I agree, it could even be factored into a separate library. |
Description
Reimplements the changes in Alasdair's PR #885 modernized for the most recent commit of the master branch.
Additionally adds three more example contracts and their respective traces to the Conway specification tests including:
Development notes:
All examples currently only use coinTokenAlgebra, because the more complex Token Algebras cause the computational traces to hang endlessly. Attempted to use the proposed fixed-length vector implementation as well as a simplified version with just Ada and one singular token with no success. This makes the Distributed Exchange a bit weird since it does not have different currencies to exchange, but should be easily adaptable once Token Algebras are fully implemented.
As part of the previous changes, we removed
toData
, which will need to be reflected in the spec of Djikstra going forward.Checklist
CHANGELOG.md