This repository was archived by the owner on Dec 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 214
Conversation
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
7374553
to
a7676ad
Compare
So we can compile it to RawJson in PureScript
1116404
to
9eefef8
Compare
ghost
approved these changes
Jun 6, 2022
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.
Looks good 👍
@@ -333,6 +351,7 @@ initialState = ConstraintProcessingState | |||
, cpsMintRedeemers = mempty | |||
, cpsValueSpentBalancesInputs = ValueSpentBalances mempty mempty | |||
, cpsValueSpentBalancesOutputs = ValueSpentBalances mempty mempty | |||
, cpsParams = def |
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.
Shouldn't we pass it directly?
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.
It's not used here. It is passed directly in plutus-tx-constraints, where it is actually used. I'll add a comment.
koslambrou
approved these changes
Jun 6, 2022
koslambrou
pushed a commit
that referenced
this pull request
Jun 22, 2022
* Clone plutus-ledger-constraints * Implement withIsCardanoEra * Support cardano-api Tx's in UnbalancedTx. * Reuse code from pluts-ledger-constraints by importing it * Implement MustPayToPubKeyAddress * A new use of withIsCardanoEra * Fix typo * Fix unbalanced tx export * Generate purs * Fix UnbalancedTx pretty printing * Make CardanoBuildTx a newtype So we can compile it to RawJson in PureScript * Clean up * PR feedback
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This result is maybe not what was expected, at least it's not what I expected when I started. But after realising that the
UnbalancedTx
datatype needs to be reused, because it is expected by downstream code, and that the on-chain part is completely unaffected by the move to the cardano-api transaction type, I chose to only rewrite theOffChain
module and re-export theTxConstraints
andOnChain
modules fromplutus-ledger-constraints
.Also I initially thought that users would specify the constraints using cardano-api types for datums, values, hashes etc, but they should remain those from plutus since that's what scripts also receive from the script context.
Pre-submit checklist: