-
Notifications
You must be signed in to change notification settings - Fork 23
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
Introduce new witness api #763
Conversation
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs
Fixed
Show fixed
Hide fixed
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs
Fixed
Show fixed
Hide fixed
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs
Fixed
Show fixed
Hide fixed
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs
Fixed
Show fixed
Hide fixed
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs
Fixed
Show fixed
Hide fixed
41613bf
to
ee59574
Compare
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/Shim/LegacyScripts.hs
Fixed
Show fixed
Hide fixed
53e997c
to
8b9e4cd
Compare
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs
Fixed
Show fixed
Hide fixed
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/ScriptWitness.hs
Fixed
Show fixed
Hide fixed
5e14d8f
to
e00ddf0
Compare
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/IndexedPlutusScriptWitness.hs
Fixed
Show fixed
Hide fixed
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/IndexedPlutusScriptWitness.hs
Fixed
Show fixed
Hide fixed
cardano-api/src/Cardano/Api/Internal/Experimental/Witness/TxScriptWitnessRequirements.hs
Fixed
Show fixed
Hide fixed
e00ddf0
to
ad6e828
Compare
b71efce
to
3dee118
Compare
8189957
to
b8182e1
Compare
7b52a0b
to
2bbc191
Compare
cardano-api/src/Cardano/Api/Internal/Governance/Actions/ProposalProcedure.hs
Fixed
Show fixed
Hide fixed
2bbc191
to
4227863
Compare
|
||
instance IsShelleyBasedEra era => Show (Proposal era) where | ||
show (Proposal pp) = do | ||
let ppStr = shelleyBasedEraConstraints (shelleyBasedEra @era) $ show pp | ||
"Proposal {unProposal = " <> ppStr <> "}" | ||
"Proposal " <> ppStr <> "}" |
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.
lone closing bracket
"Proposal " <> ppStr <> "}" | |
"(Proposal " <> ppStr <> ")" |
data AnyVoter where | ||
AnyVoter :: Typeable era => Voter era -> AnyVoter |
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.
Where is this used?
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 need to delete this.
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.
Blocking on WitMint
: you can have multiple assets w/ quantities per policy ID.
We can delete AnyVoter too I think.
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/IndexedPlutusScriptWitness.hs
Outdated
Show resolved
Hide resolved
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/IndexedPlutusScriptWitness.hs
Outdated
Show resolved
Hide resolved
cardano-api/src/Cardano/Api/Internal/Experimental/Plutus/IndexedPlutusScriptWitness.hs
Outdated
Show resolved
Hide resolved
549cbfe
to
50e941e
Compare
cardano-api/src/Cardano/Api/Internal/Governance/Actions/VotingProcedure.hs
Fixed
Show fixed
Hide fixed
56d34b6
to
5118ac3
Compare
This is intended to replace the type `Witness witctx era` but if you look closely they are similar. The main difference is we do away with `witctx` type parameter because this only really pertains to plutus script witnesses. The witness context is now relfected in the purpose type parameter of the `PlutusScriptWitness` type of the `AnyPlutusScriptWitness` constructor.
…sociated type synonym NativeScript era.
…pt lang` which wrapped a `ShortByteString` which essentially means if our script it malformed we will be informed of this upon deserialization in the ledger i.e at transaction submission or when using transaction build. `PlutusScriptInEra lan era` wraps cardano-ledger's `PlutusRunnable lang`. This allows us to fail early as the deserialization to `PlutusRunnable` will error for malformed scripts. NB: Before the introduction of the new api we did implement a `PlutusScriptInEra era lang` in the old api but this simply wrapped `PlutusScript lang` and utilized the serialization instances of `PlutusRunnable lang`.
`PlutusScriptWitness lang era` is almost identical to the old api's notion of plutus script witnesses except: - It's treated as a separate type to simple script witnesses vs as a constructor of a sum type - A type family is used to represent the presense of a script datum depending on the plutus script language and purpose The `PlutusScriptDatumF` type family has been introduced to capture what script type can have a datum and if that datum can be optional.
a key or script witness Intoduce IndexedPlutusScriptWitness to capture the concept of something witnessable that is being witnessed by a plutus script. These types allow us to uniformly treat anything witnessable that is being witnessed by a plutus script
script witness requirements
Introduce collectTxBodyScriptWitnessRequirements
5118ac3
to
c86846f
Compare
Changelog
Context
Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.
How to trust this PR
Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.
Checklist