Plutus Quiz A

Select the most correct option.

  1. In Plutus.V1.Ledger.Tx, what is the underlying type of TxId? A. BuiltinByteString B. ShortByteString C. ByteString D. String E. Integer

  2. Which ScriptTag value indicates a spending script? A. Mint B. Cert C. Reward D. Spend E. Apply

  3. What does RedeemerPtr consist of? A. (TxId, Integer) B. (ValidatorHash, Redeemer) C. (ScriptTag, Integer) D. (DatumHash, Datum) E. (CurrencySymbol, TokenName)

  4. In V1 Tx, what is the type alias Redeemers? A. Map TxId Redeemer B. Map RedeemerPtr Redeemer C. Map ScriptTag Redeemer D. [Redeemer] E. Map DatumHash Datum

  5. A TxOutRef points to: A. A script and redeemer pair B. A public key signature C. A previous transaction’s output by index D. A datum hash E. A cost model parameter

  6. What does TxInType constructor ConsumeScriptAddress include? A. Validator, Redeemer, Datum B. PubKeyHash, Signature C. DatumHash, ScriptHash D. Value, Address E. TxOutRef, TxId

  7. The function inScripts returns Nothing when: A. Input type is ConsumeScriptAddress B. Input type is ConsumePublicKeyAddress C. Input type is ConsumeSimpleScriptAddress D. Input type is Just a script E. Input type is Nothing

  8. Which optic filters only pubkey inputs? A. scriptTxIns B. pubKeyTxIns C. inScripts D. inRef E. inType

  9. What does txOutPubKey extract? A. A DatumHash B. A ValidatorHash C. A PubKeyHash D. A CurrencySymbol E. A Value

  10. The lens outValue focuses on: A. txOutAddress B. txOutValue C. txOutDatumHash D. txOutDatum E. txOutReferenceScript

  11. In Plutus.V1.Ledger.Value, how is ADA represented? A. CurrencySymbol "ADA" B. adaSymbol = CurrencySymbol "" C. CurrencySymbol 0x00 D. TokenName "ADA" E. TokenName ""

  12. What does singleton c tn i produce? A. A Map of currencies B. A Value with zero entries C. A Value containing only (c, tn) ↦ i D. A CurrencySymbol E. A TokenName

  13. Which function returns all currency symbols in a Value? A. symbols B. valueOf C. flattenValue D. assetClassValue E. unionWith

  14. The operator geq on Value checks: A. Greater in lexicographic order B. Pointwise ≥ comparison C. Strictly greater D. Equality E. Membership

  15. What does unionWith f v1 v2 do? A. Subtracts values B. Combines Values using f on overlapping entries C. Flattens to a list D. Filters zero entries E. Splits positive/negative parts

  16. Calling flattenValue v yields: A. Map of non-zero entries B. List of (CurrencySymbol, TokenName, Integer) triples C. A Value scaled by 1 D. A Boolean E. A Text representation

  17. In Plutus.ApiCommon, what does builtinsIntroducedIn map to? A. Map of DefaultFun to versions B. Map of (LedgerPlutusVersion, ProtocolVersion) to Set DefaultFun C. List of builtins only D. Single set of builtins E. Map of ProtocolVersion to LedgerPlutusVersion

  18. builtinsAvailableIn lv pv does: A. Filters builtins introduced exactly on (lv,pv) B. Folds builtins introduced up to (lv,pv) C. Returns an empty set D. Throws if none found E. Counts builtins

  19. scriptCBORDecoder uses which UPLC decoder? A. decodeProgram with predicate on builtins B. Generic CBOR decode C. Flat decode without builtins check D. JSON decoder E. No decode

  20. Which error is not in EvaluationError? A. CekError B. CodecError C. CostModelParameterMismatch D. DeBruijnError E. TimeoutError

  21. VerboseMode controls: A. Budget calculation B. Inline vs deferred unlifting C. Log emission during evaluation D. Protocol versioning E. Deserialization

  22. mkTermToEvaluate does not: A. Deserialize the script B. Scope-check the term C. Apply constant arguments D. Run the CEK machine E. Check version tag

  23. In V1 Contexts, findOwnInput matches on ScriptPurpose=Spending. True or False? A. True B. False C. Only in V2 D. Only for Minting E. Only for Rewarding

  24. What type is ScriptPurpose? A. Newtype over Int B. Sum type (Minting, Spending, Rewarding, Certifying) C. Alias for DatumHash D. ValidatorHash E. Redeemer

  25. findDatum dsh txi looks in: A. txInfoInputs B. txInfoOutputs C. txInfoData D. txInfoRedeemers E. txInfoDCert

  26. V1 scriptOutputsAt returns a list of: A. TxOutRef B. (DatumHash, Value) C. ValidatorHash D. Value only E. Datum only

  27. valuePaidTo txi pkh sums: A. All inputs’ values B. Values paid to a script address C. Values paid to a public key pkh D. Minted values E. Fees

  28. In V2 Contexts, which field is new in TxInfo? A. txInfoOutputs B. txInfoReferenceInputs C. txInfoInputs D. txInfoFee E. txInfoData

  29. V2 OutputDatum does not include: A. NoOutputDatum B. OutputDatumHash C. OutputDatum D. OutputDatumInline E. All above are present

  30. A V2 TxOut may have: A. Inline datum only B. Reference script only C. Both inline datum and reference script D. Neither E. Only address and value

  31. Which lens focuses on txOutReferenceScript? A. outReference B. outScript C. outReferenceScript D. outDatum E. outValue

  32. The function isPayToScriptOut returns True if: A. txOutValue is zero B. txOutDatum is inline C. There is a validator hash on the address D. There is a reference script E. The address is public key

  33. How is V2 TxIn defined? A. Same as V1 (ref + Maybe TxInType) B. Adds ReferenceInputs C. Has no type field D. Only script inputs allowed E. No redeemer

  34. In Context modules, ownHash returns: A. Datum hash B. Validator script hash C. Currency symbol D. Redeemer pointer E. TxId

  35. findContinuingOutputs errors via traceError when: A. No outputs found B. No own input found C. Datum missing D. Script hash mismatch E. Budget exceeded

  36. In ApiCommon, unliftingModeIn uses which threshold? A. ProtocolVersion 5.0 B. ProtocolVersion 6.0 C. ProtocolVersion 7.0 D. ProtocolVersion 8.0 E. Always Immediate

  37. toMachineParameters selects based on: A. EvaluationError B. VerboseMode C. unliftingModeIn D. ProtocolVersion only E. LedgerPlutusVersion

  38. evaluateScriptRestricting returns remaining budget by subtracting final from initial. A. True B. False C. Only for Counting D. Only in V2 E. Never

  39. The type alias LogOutput is: A. String B. [Text] C. Maybe Text D. IO [Text] E. Writer [Text] ()

  40. Which module provides prettyClassicDef? A. Prettyprinter B. PlutusPrelude C. PlutusCore.Pretty D. Codec.CBOR.Extras E. Control.DeepSeq

  41. In V1 Contexts, stakingCredential returns: A. Address B. Maybe StakingCredential C. CurrencySymbol D. Datum E. ScriptHash

  42. V1 scriptHashAddress constructs an address from: A. PubKeyHash B. ValidatorHash C. DatumHash D. CurrencySymbol E. TxId

  43. toPubKeyHash on an address returns: A. Maybe PubKeyHash B. ValidatorHash C. StakingCredential D. Always Just E. DatumHash

  44. V1 Address is a record of: A. Credential and Maybe StakingCredential B. PubKeyHash only C. ValidatorHash only D. ScriptContext E. TxInfo

  45. The Credential type has constructors: A. PubKeyCredential and ScriptCredential B. StakingHash and StakingPtr C. ValidatorHash only D. DatumHash only E. CurrencySymbol

  46. V2 contexts use PlutusTx.AssocMap instead of: A. Data.Map B. Data.Set C. Data.List D. Map.Strict E. Map.Lazy

  47. In V1, mkIsDataIndexed is used for: A. Generating EQ instances B. On-chain serialization (IsData) C. Logging D. Parsing CBOR E. Defining builtins

  48. NoThunks instance is derived for: A. TxOut B. EvaluationContext C. TxIn D. Value E. Datum

  49. The ScriptForExecution newtype is primarily used in: A. Tx modules B. Value modules C. ApiCommon D. Contexts E. Tx modules V2

  50. Which extension allows deriving via LedgerBytes? A. DeriveAnyClass B. DerivingStrategies C. DerivingVia D. DeriveGeneric E. FlexibleInstances


Answers

  1. A

  2. D

  3. C

  4. B

  5. C

  6. A

  7. B

  8. B

  9. C

  10. B

  11. B

  12. C

  13. A

  14. B

  15. B

  16. B

  17. B

  18. B

  19. A

  20. E

  21. C

  22. D

  23. A

  24. B

  25. C

  26. B

  27. C

  28. B

  29. D

  30. C

  31. C

  32. C

  33. A

  34. B

  35. B

  36. C

  37. C

  38. A

  39. B

  40. C

  41. B

  42. B

  43. A

  44. A

  45. A

  46. A

  47. B

  48. B

  49. C

  50. C

Last updated