diff --git a/sigmastate/src/main/scala/org/ergoplatform/ErgoLikeContext.scala b/sigmastate/src/main/scala/org/ergoplatform/ErgoLikeContext.scala index 62e9bfa6a5..593dcb987c 100644 --- a/sigmastate/src/main/scala/org/ergoplatform/ErgoLikeContext.scala +++ b/sigmastate/src/main/scala/org/ergoplatform/ErgoLikeContext.scala @@ -97,7 +97,7 @@ class ErgoLikeContext(val lastBlockUtxoRoot: AvlTreeData, Examined ergo code: all that leads to ErgoLikeContext creation. */ require(spendingTransaction.dataInputs.length == dataBoxes.length && - spendingTransaction.dataInputs.forall(dataInput => dataBoxes.exists(b => util.Arrays.equals(b.id, dataInput.boxId))), + spendingTransaction.dataInputs.forall(dataInput => dataBoxes.exists(b => java.util.Arrays.equals(b.id, dataInput.boxId))), "dataBoxes do not correspond to spendingTransaction.dataInputs") // TODO assert boxesToSpend correspond to spendingTransaction.inputs diff --git a/sigmastate/src/main/scala/sigmastate/lang/SigmaPredef.scala b/sigmastate/src/main/scala/sigmastate/lang/SigmaPredef.scala index 948e032a8c..ed15cd783c 100644 --- a/sigmastate/src/main/scala/sigmastate/lang/SigmaPredef.scala +++ b/sigmastate/src/main/scala/sigmastate/lang/SigmaPredef.scala @@ -6,12 +6,12 @@ import scalan.Nullable import scorex.util.encode.{Base64, Base58, Base16} import sigmastate.SCollection.{SIntArray, SByteArray} import sigmastate.SOption._ -import sigmastate.Values.{StringConstant, Constant, EvaluatedValue, SValue, IntValue, SigmaPropConstant, ConstantPlaceholder, BoolValue, Value, ByteArrayConstant, SigmaPropValue, ValueCompanion} +import sigmastate.Values.{StringConstant, SValue, IntValue, SigmaPropConstant, Value, ByteArrayConstant, SigmaPropValue, ValueCompanion, Constant, EvaluatedValue, ConstantPlaceholder, BoolValue} import sigmastate._ import sigmastate.lang.Terms._ import sigmastate.lang.exceptions.InvalidArguments import sigmastate.serialization.ValueSerializer -import sigmastate.utxo.{GetVar, DeserializeContext, DeserializeRegister, SelectField} +import sigmastate.utxo.{DeserializeRegister, SelectField, DeserializeContext, GetVar} object SigmaPredef { @@ -44,7 +44,7 @@ object SigmaPredef { import builder._ /** Type variable used in the signatures of global functions below. */ - import SType.{tT, tR, tK, tL, tO, paramT, paramR} + import SType.{tT, tO, tR, tL, paramR, paramT, tK} private val undefined: IrBuilderFunc = PartialFunction.empty[(SValue, Seq[SValue]), SValue] @@ -176,7 +176,7 @@ object SigmaPredef { throw new InvalidArguments(s"Wrong type after deserialization, expected $tpe, got ${res.tpe}") res }), - OperationInfo(Constant, "", + OperationInfo(Constant, "Deserializes values from Base58 encoded binary data at compile time into a value of type T.", Seq(ArgInfo("", ""))) ) @@ -186,7 +186,11 @@ object SigmaPredef { { case (_, Seq(arg: EvaluatedValue[SString.type]@unchecked)) => ByteArrayConstant(Base16.decode(arg.value).get) }), - OperationInfo(Constant, "", + OperationInfo(Constant, + """Transforms Base16 encoded string literal into constant of type Coll[Byte]. + |It is a compile-time operation and only string literal (constant) can be its + |argument. + """.stripMargin, Seq(ArgInfo("", ""))) ) @@ -196,8 +200,12 @@ object SigmaPredef { { case (_, Seq(arg: EvaluatedValue[SString.type]@unchecked)) => ByteArrayConstant(Base58.decode(arg.value).get) }), - OperationInfo(Constant, "", - Seq(ArgInfo("", ""))) + OperationInfo(Constant, + """Transforms Base58 encoded string literal into constant of type Coll[Byte]. + |It is a compile-time operation and only string literal (constant) can be its + |argument. + """.stripMargin, + Seq(ArgInfo("", ""))) ) val FromBase64Func = PredefinedFunc("fromBase64", @@ -206,7 +214,11 @@ object SigmaPredef { { case (_, Seq(arg: EvaluatedValue[SString.type]@unchecked)) => ByteArrayConstant(Base64.decode(arg.value).get) }), - OperationInfo(Constant, "", + OperationInfo(Constant, + """Transforms Base64 encoded string literal into constant of type Coll[Byte]. + |It is a compile-time operation and only string literal (constant) can be its + |argument. + """.stripMargin, Seq(ArgInfo("", ""))) )