Plutus Quiz B

Select the most correct option


  1. What does pubKeyHashAddress produce? A. Address with PubKeyCredential and no staking B. Raw PubKeyHash C. ValidatorHash D. Credential only E. Nothing

  2. toPubKeyHash (Address (ScriptCredential _) _) yields: A. Just a PubKeyHash B. Nothing C. A runtime error D. A default PubKeyHash E. Inline datum

  3. Calling stakingCredential (Address cred s) returns: A. cred B. s C. Just cred D. Always Nothing E. A ScriptError

  4. encodeByteString takes a ByteString and returns: A. Base16-encoded Text B. ByteString of hex digits C. LedgerBytes D. A String E. UTF-8 Json

  5. The type of fromHex is: A. BS.ByteString -> Either String LedgerBytes B. Text -> Either String LedgerBytes C. String -> BS.ByteString D. LedgerBytes -> BS.ByteString E. BS.ByteString -> LedgerBytes

  6. The newtype LedgerBytes wraps: A. P.BuiltinByteString B. BS.ByteString C. String D. Text E. Integer

  7. The IsString instance for LedgerBytes uses: A. unsafeFromEither . fromHex . fromString B. fromBytes C. encodeByteString D. toBuiltin E. toString

  8. instance PlutusTx.Eq Credential defines equality by: A. Matching only like constructors B. Always returning True C. Using the Show instance D. Always returning False E. Auto-derived Eq

  9. The DCertPoolRegister constructor carries two PubKeyHash fields representing: A. Pool ID and VRF key B. Delegator and delegatee C. Pool params hash D. Nonce and index E. Stake credential and reward

  10. The Extended a data type has constructors: A. NegInf, Finite, PosInf B. Zero, One C. Closed, Open D. LowerBound, UpperBound E. Interval

  11. strictLowerBound a constructs: A. LowerBound (Finite a) False B. LowerBound (Finite a) True C. UpperBound (Finite a) False D. LowerBound a E. NegInf

  12. upperBound a yields: A. UpperBound (Finite a) True B. LowerBound (Finite a) True C. Finite a D. PosInf E. NegInf

  13. The Closure type alias means: A. True = inclusive endpoint B. True = exclusive endpoint C. Unused in intervals D. Always False E. Always True

  14. The Functor instance for Interval allows fmap to: A. Map over both endpoints B. Map over term bodies C. No effect D. Only for lists E. Only for Maybe

  15. The Pretty instance for Interval a prints as: A. "[l, r]" B. "l,r" C. "l , r" D. With a comma between lower and upper E. With parentheses only

  16. interval s s' produces an interval that: A. Includes both s and s' B. Excludes both endpoints C. Includes only s D. Includes only s' E. Is empty

  17. from s yields: A. All values ≥ s B. All values ≤ s C. Only the point s D. Empty interval E. All real numbers

  18. to s yields: A. All values ≤ s B. All values ≥ s C. Closed interval around s D. Empty interval E. Full interval

  19. always is the interval: A. (-∞, +∞) closed both ends B. A single point C. Empty D. Only non-negative E. Only non-positive

  20. never is the interval: A. Empty B. always C. Closed D. Full E. Single-point

  21. singleton s is equivalent to: A. interval s s B. always C. never D. from s E. to s

  22. hull a b returns: A. Smallest interval containing a and b B. Largest interval contained in both C. always D. never E. Random interval

  23. overlaps l r checks whether: A. l and r share any points B. l contains r fully C. r contains l fully D. Always True E. Always False

  24. contains a b is True if: A. Interval b is entirely within a B. a is within b C. They are equal D. Disjoint E. Always

  25. For Interval (Finite 3 False) (Finite 4 False) on Int, isEmpty returns: A. False B. True C. Runtime error D. Not allowed E. Maybe Bool

  26. before h i returns True when: A. h is less than the lower bound of i B. h is greater than the upper bound C. h is inside D. Always E. Never

  27. after h i returns True when: A. h is greater than the upper bound of i B. h is less than the lower bound C. h is inside D. Always E. Never

  28. POSIXTimeRange is an alias for: A. Interval POSIXTime B. (POSIXTime, POSIXTime) C. Value D. TxInfo E. TxInInfo

  29. DiffMilliSeconds derives the Integral class, so it can be: A. Used as an integer in arithmetic B. Mapped over C. Only compared D. Converted to text E. Serialized only

  30. fromMilliSeconds converts: A. DiffMilliSeconds → POSIXTime B. POSIXTime → DiffMilliSeconds C. Integer → Time D. Value → Interval E. ByteString → Text

  31. alwaysSucceedingNAryFunction n generates a UPLC script that: A. Takes n arguments and returns the first B. Always fails C. Adds two integers D. Calls Error E. Creates a singleton

  32. alwaysFailingNAryFunction 0 yields: A. Error B. Identity function C. A variable reference D. A lambda abstraction E. A constant 0

  33. summingFunction applies which builtin? A. AddInteger B. SubtractInteger C. MultiplyInteger D. DivideInteger E. IfThenElse

  34. saltFunction salt b0 wraps script b0 by: A. Applying a lambda abstraction to salt B. Changing its hash only C. Adding a datum D. Embedding a reference script E. Modifying the cost model

  35. shelleyPV is defined as: A. ProtocolVersion 2 0 B. ProtocolVersion 3 0 C. ProtocolVersion 4 0 D. ProtocolVersion 5 0 E. ProtocolVersion 7 0

  36. alonzoPV equals: A. ProtocolVersion 5 0 B. ProtocolVersion 4 0 C. ProtocolVersion 7 0 D. ProtocolVersion 3 0 E. ProtocolVersion 2 0

  37. In Plutus.V1.Ledger.Scripts, the Script newtype wraps: A. UPLC.Program UPLC.DeBruijn DefaultUni DefaultFun () B. ShortByteString C. ByteString D. CompiledCode E. Validator

  38. fromCompiledCode uses which function to drop names? A. toNameless . getPlc B. serialise C. decodeViaFlat D. applyArguments E. mkTermToEvaluate

  39. scriptSize returns: A. UPLC.programSize of the wrapped program B. Byte length of the script C. Number of lam­das D. Cost model estimate E. Datum size

  40. applyArguments injects constant arguments using: A. PLC.mkConstant B. UPLC.LamAbs C. UPLC.Error D. mkTermToEvaluate E. scriptCBORDecoder

  41. evaluateScript returns on success: A. (ExBudget, [Text]) B. ExBudget only C. [Text] only D. Either EvaluationError ExBudget E. Script

  42. unitDatum is defined as: A. Datum $ toBuiltinData () B. DatumHash C. Redeemer D. Value E. Script

  43. unitRedeemer is: A. Redeemer $ toBuiltinData () B. Datum C. TxOut D. TxIn E. Context

  44. applyValidator applied to its args returns: A. A Script ready to evaluate B. ExBudget C. LogOutput D. Value E. TxInfo

  45. runMintingPolicyScript under the hood calls: A. applyMintingPolicyScript then evaluateScript B. applyValidator C. scriptCBORDecoder D. mkTermToEvaluate E. unliftingModeIn

  46. The runtime types ScriptHash, ValidatorHash, etc., all derive IsString via: A. LedgerBytes B. ByteString C. Text D. Integer E. Value

  47. The Context type wraps: A. BuiltinData B. Datum C. Value D. TxId E. TxInfo

  48. In V1 Tx, the lens outValue focuses on: A. txOutValue B. txOutAddress C. txOutDatumHash D. txOutDatum E. txOutReferenceScript

  49. In V2 Tx, pubKeyHashTxOut v pkh sets: A. txOutDatum = NoOutputDatum and txOutReferenceScript = Nothing B. Inline datum and a reference script C. Datum hash only D. A script address E. A default cost model

  50. makeIsDataIndexed ''OutputDatum tags the OutputDatum constructor with index: A. 2 B. 0 C. 1 D. 3 E. 4


Answers Quiz B

  1. A

  2. B

  3. B

  4. A

  5. A

  6. A

  7. A

  8. A

  9. A

  10. A

  11. A

  12. A

  13. A

  14. A

  15. D

  16. A

  17. A

  18. A

  19. A

  20. A

  21. A

  22. A

  23. A

  24. A

  25. B

  26. A

  27. A

  28. A

  29. A

  30. A

  31. A

  32. A

  33. A

  34. A

  35. A

  36. A

  37. A

  38. A

  39. A

  40. A

  41. A

  42. A

  43. A

  44. A

  45. A

  46. A

  47. A

  48. A

  49. A

  50. A

Last updated