@@ -432,31 +432,16 @@ object SigmaPredef {
432
432
throw new InvalidArguments (s " Invalid register specified $id" )
433
433
}
434
434
435
- val d : Option [Value [rtpe.type ]] = rtpe match {
436
- case SInt => Some (IntConstant (0 ).asValue)
437
- case SBoolean => Some (BooleanConstant (false ).asValue)
438
- case SByte => Some (ByteConstant (0 ).asValue)
439
- case SLong => Some (LongConstant (0L ).asValue)
440
- case SBigInt => Some (BigIntConstant (0 ).asValue)
441
- case SSigmaProp => Some (SigmaPropConstant (CSigmaProp (false )).asValue)
442
- case c : SCollection [a] =>
443
- implicit val elemRType : RType [a# WrappedType ] = asType(stypeToRType(c.elemType))
444
- implicit val elemCT : ClassTag [a# WrappedType ] = elemRType.classTag
445
- Some (CollectionConstant (Colls .fromArray(elemRType.emptyArray), c.elemType).asValue)
446
- case _ => None
447
- }
448
-
449
435
val r : RegisterId = org.ergoplatform.ErgoBox .registerByIndex(idx)
450
- mkDeserializeRegister[rtpe.type ](r, rtpe, d )
436
+ mkDeserializeRegister[rtpe.type ](r, rtpe, None )
451
437
}),
452
438
OperationInfo (DeserializeRegister ,
453
439
""" Extracts SELF register as \lst{Coll[Byte]}, deserializes it to script
454
440
| and then executes this script in the current context.
455
441
| The original \lst{Coll[Byte]} of the script is available as \lst{SELF.getReg[Coll[Byte]](id)}.
456
442
| Type parameter \lst{T} result type of the deserialized script.
457
443
| Throws an exception if the actual script type doesn't conform to \lst{T}.
458
- | Returns a result of the script execution in the current context or an empty value
459
- | of type \lst{T} when the specified register is unavailable
444
+ | Returns a result of the script execution in the current context
460
445
""" .stripMargin,
461
446
Seq (ArgInfo (" id" , " identifier of the register" )))
462
447
)
0 commit comments