Plutus Quiz B
Select the most correct option
What does
pubKeyHashAddress
produce? A.Address
withPubKeyCredential
and no staking B. RawPubKeyHash
C.ValidatorHash
D.Credential
only E.Nothing
toPubKeyHash (Address (ScriptCredential _) _)
yields: A.Just
aPubKeyHash
B.Nothing
C. A runtime error D. A defaultPubKeyHash
E. Inline datumCalling
stakingCredential (Address cred s)
returns: A.cred
B.s
C.Just cred
D. AlwaysNothing
E. AScriptError
encodeByteString
takes aByteString
and returns: A. Base16-encodedText
B.ByteString
of hex digits C.LedgerBytes
D. AString
E. UTF-8Json
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
The
newtype LedgerBytes
wraps: A.P.BuiltinByteString
B.BS.ByteString
C.String
D.Text
E.Integer
The
IsString
instance forLedgerBytes
uses: A.unsafeFromEither . fromHex . fromString
B.fromBytes
C.encodeByteString
D.toBuiltin
E.toString
instance PlutusTx.Eq Credential
defines equality by: A. Matching only like constructors B. Always returningTrue
C. Using theShow
instance D. Always returningFalse
E. Auto-derivedEq
The
DCertPoolRegister
constructor carries twoPubKeyHash
fields representing: A. Pool ID and VRF key B. Delegator and delegatee C. Pool params hash D. Nonce and index E. Stake credential and rewardThe
Extended a
data type has constructors: A.NegInf
,Finite
,PosInf
B.Zero
,One
C.Closed
,Open
D.LowerBound
,UpperBound
E.Interval
strictLowerBound a
constructs: A.LowerBound (Finite a) False
B.LowerBound (Finite a) True
C.UpperBound (Finite a) False
D.LowerBound a
E.NegInf
upperBound a
yields: A.UpperBound (Finite a) True
B.LowerBound (Finite a) True
C.Finite a
D.PosInf
E.NegInf
The
Closure
type alias means: A.True
= inclusive endpoint B.True
= exclusive endpoint C. Unused in intervals D. AlwaysFalse
E. AlwaysTrue
The
Functor
instance forInterval
allowsfmap
to: A. Map over both endpoints B. Map over term bodies C. No effect D. Only for lists E. Only forMaybe
The
Pretty
instance forInterval a
prints as: A."[l, r]"
B."l,r"
C."l , r"
D. With a comma between lower and upper E. With parentheses onlyinterval s s'
produces an interval that: A. Includes boths
ands'
B. Excludes both endpoints C. Includes onlys
D. Includes onlys'
E. Is emptyfrom s
yields: A. All values ≥s
B. All values ≤s
C. Only the points
D. Empty interval E. All real numbersto s
yields: A. All values ≤s
B. All values ≥s
C. Closed interval arounds
D. Empty interval E. Full intervalalways
is the interval: A.(-∞, +∞)
closed both ends B. A single point C. Empty D. Only non-negative E. Only non-positivenever
is the interval: A. Empty B.always
C. Closed D. Full E. Single-pointsingleton s
is equivalent to: A.interval s s
B.always
C.never
D.from s
E.to s
hull a b
returns: A. Smallest interval containinga
andb
B. Largest interval contained in both C.always
D.never
E. Random intervaloverlaps l r
checks whether: A.l
andr
share any points B.l
containsr
fully C.r
containsl
fully D. AlwaysTrue
E. AlwaysFalse
contains a b
isTrue
if: A. Intervalb
is entirely withina
B.a
is withinb
C. They are equal D. Disjoint E. AlwaysFor
Interval (Finite 3 False) (Finite 4 False)
onInt
,isEmpty
returns: A. False B. True C. Runtime error D. Not allowed E.Maybe Bool
before h i
returnsTrue
when: A.h
is less than the lower bound ofi
B.h
is greater than the upper bound C.h
is inside D. Always E. Neverafter h i
returnsTrue
when: A.h
is greater than the upper bound ofi
B.h
is less than the lower bound C.h
is inside D. Always E. NeverPOSIXTimeRange
is an alias for: A.Interval POSIXTime
B.(POSIXTime, POSIXTime)
C.Value
D.TxInfo
E.TxInInfo
DiffMilliSeconds
derives theIntegral
class, so it can be: A. Used as an integer in arithmetic B. Mapped over C. Only compared D. Converted to text E. Serialized onlyfromMilliSeconds
converts: A.DiffMilliSeconds
→POSIXTime
B.POSIXTime
→DiffMilliSeconds
C.Integer
→Time
D.Value
→Interval
E.ByteString
→Text
alwaysSucceedingNAryFunction n
generates a UPLC script that: A. Takesn
arguments and returns the first B. Always fails C. Adds two integers D. CallsError
E. Creates a singletonalwaysFailingNAryFunction 0
yields: A.Error
B. Identity function C. A variable reference D. A lambda abstraction E. A constant 0summingFunction
applies which builtin? A.AddInteger
B.SubtractInteger
C.MultiplyInteger
D.DivideInteger
E.IfThenElse
saltFunction salt b0
wraps scriptb0
by: A. Applying a lambda abstraction tosalt
B. Changing its hash only C. Adding a datum D. Embedding a reference script E. Modifying the cost modelshelleyPV
is defined as: A.ProtocolVersion 2 0
B.ProtocolVersion 3 0
C.ProtocolVersion 4 0
D.ProtocolVersion 5 0
E.ProtocolVersion 7 0
alonzoPV
equals: A.ProtocolVersion 5 0
B.ProtocolVersion 4 0
C.ProtocolVersion 7 0
D.ProtocolVersion 3 0
E.ProtocolVersion 2 0
In Plutus.V1.Ledger.Scripts, the
Script
newtype wraps: A.UPLC.Program UPLC.DeBruijn DefaultUni DefaultFun ()
B.ShortByteString
C.ByteString
D.CompiledCode
E.Validator
fromCompiledCode
uses which function to drop names? A.toNameless . getPlc
B.serialise
C.decodeViaFlat
D.applyArguments
E.mkTermToEvaluate
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 sizeapplyArguments
injects constant arguments using: A.PLC.mkConstant
B.UPLC.LamAbs
C.UPLC.Error
D.mkTermToEvaluate
E.scriptCBORDecoder
evaluateScript
returns on success: A.(ExBudget, [Text])
B.ExBudget
only C.[Text]
only D.Either EvaluationError ExBudget
E.Script
unitDatum
is defined as: A.Datum $ toBuiltinData ()
B.DatumHash
C.Redeemer
D.Value
E.Script
unitRedeemer
is: A.Redeemer $ toBuiltinData ()
B. Datum C. TxOut D. TxIn E. ContextapplyValidator
applied to its args returns: A. AScript
ready to evaluate B.ExBudget
C.LogOutput
D.Value
E.TxInfo
runMintingPolicyScript
under the hood calls: A.applyMintingPolicyScript
thenevaluateScript
B.applyValidator
C.scriptCBORDecoder
D.mkTermToEvaluate
E.unliftingModeIn
The runtime types
ScriptHash
,ValidatorHash
, etc., all deriveIsString
via: A.LedgerBytes
B.ByteString
C.Text
D.Integer
E.Value
The
Context
type wraps: A.BuiltinData
B.Datum
C.Value
D.TxId
E.TxInfo
In V1 Tx, the lens
outValue
focuses on: A.txOutValue
B.txOutAddress
C.txOutDatumHash
D.txOutDatum
E.txOutReferenceScript
In V2 Tx,
pubKeyHashTxOut v pkh
sets: A.txOutDatum = NoOutputDatum
andtxOutReferenceScript = Nothing
B. Inline datum and a reference script C. Datum hash only D. A script address E. A default cost modelmakeIsDataIndexed ''OutputDatum
tags theOutputDatum
constructor with index: A. 2 B. 0 C. 1 D. 3 E. 4
Answers Quiz B
A
B
B
A
A
A
A
A
A
A
A
A
A
A
D
A
A
A
A
A
A
A
A
A
B
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Last updated