Skip to content

Commit 00b1be0

Browse files
committed
sigmastate-js version update
1 parent ea6ebdb commit 00b1be0

File tree

4 files changed

+1
-41
lines changed

4 files changed

+1
-41
lines changed

data/shared/src/main/scala/sigma/ast/methods.scala

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,6 @@ case object SBooleanMethods extends MonoTypeMethods {
474474

475475
val ToByte = "toByte"
476476
protected override def getMethods() = super.getMethods()
477-
/* TODO soft-fork: https://github.com/ScorexFoundation/sigmastate-interpreter/issues/479
478-
++ Seq(
479-
SMethod(this, ToByte, SFunc(this, SByte), 1)
480-
.withInfo(PropertyCall, "Convert true to 1 and false to 0"),
481-
)
482-
*/
483477
}
484478

485479
/** Methods of ErgoTree type `Byte`. */
@@ -646,10 +640,6 @@ case object SGroupElementMethods extends MonoTypeMethods {
646640
.withInfo(PropertyCall, "Inverse element of the group.")
647641

648642
protected override def getMethods(): Seq[SMethod] = {
649-
/* TODO soft-fork: https://github.com/ScorexFoundation/sigmastate-interpreter/issues/479
650-
SMethod(this, "isIdentity", SFunc(this, SBoolean), 1)
651-
.withInfo(PropertyCall, "Checks if this value is identity element of the eliptic curve group."),
652-
*/
653643
val v5Methods = Seq(
654644
GetEncodedMethod,
655645
ExponentiateMethod,
@@ -747,18 +737,6 @@ object SOptionMethods extends MethodsContainer {
747737
|return the result of evaluating \lst{default}.
748738
""".stripMargin, ArgInfo("default", "the default value"))
749739

750-
// TODO soft-fork: https://github.com/ScorexFoundation/sigmastate-interpreter/issues/479
751-
// val FoldMethod = SMethod(
752-
// this, Fold, SFunc(Array(ThisType, tR, SFunc(tT, tR)), tR, Array[STypeParam](tT, tR)), 5, FixedCost(JitCost(1)))
753-
// .withInfo(MethodCall,
754-
// """Returns the result of applying \lst{f} to this option's
755-
// | value if the option is nonempty. Otherwise, evaluates
756-
// | expression \lst{ifEmpty}.
757-
// | This is equivalent to \lst{option map f getOrElse ifEmpty}.
758-
// """.stripMargin,
759-
// ArgInfo("ifEmpty", "the expression to evaluate if empty"),
760-
// ArgInfo("f", "the function to apply if nonempty"))
761-
762740
val MapMethod = SMethod(this, "map",
763741
SFunc(Array(ThisType, SFunc(tT, tR)), SOption(tR), Array(paramT, paramR)), 7, FixedCost(JitCost(20)))
764742
.withIRInfo(MethodCallIrBuilder)
@@ -781,9 +759,6 @@ object SOptionMethods extends MethodsContainer {
781759
IsDefinedMethod,
782760
GetMethod,
783761
GetOrElseMethod,
784-
/* TODO soft-fork: https://github.com/ScorexFoundation/sigmastate-interpreter/issues/479
785-
FoldMethod,
786-
*/
787762
MapMethod,
788763
FilterMethod
789764
)

sc/shared/src/test/scala/sigmastate/ErgoTreeSpecification.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,6 @@ class ErgoTreeSpecification extends SigmaDslTesting with ContractsTestkit with C
598598
MInfo(2, IsDefinedMethod),
599599
MInfo(3, GetMethod),
600600
MInfo(4, GetOrElseMethod),
601-
/* TODO soft-fork: https://github.com/ScorexFoundation/sigmastate-interpreter/issues/479
602-
FoldMethod,
603-
*/
604601
MInfo(7, MapMethod),
605602
MInfo(8, FilterMethod)
606603
), true)

sc/shared/src/test/scala/sigmastate/lang/SigmaTyperTest.scala

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ class SigmaTyperTest extends AnyPropSpec
188188
typecheck(env, "{ (a: Int) => (1, 2L)(a) }") shouldBe SFunc(IndexedSeq(SInt), SAny)
189189
}
190190

191-
// TODO soft-fork: https://github.com/ScorexFoundation/sigmastate-interpreter/issues/479
192191
ignore("tuple advanced operations") {
193192
typecheck(env, "(1, 2L).getOrElse(2, 3)") shouldBe SAny
194193
typecheck(env, "(1, 2L).slice(0, 2)") shouldBe SCollection(SAny)
@@ -263,10 +262,6 @@ class SigmaTyperTest extends AnyPropSpec
263262
typecheck(env, "{ (a: Int) => { val b = a + 1; b } }") shouldBe SFunc(IndexedSeq(SInt), SInt)
264263
typecheck(env, "{ (a: Int, box: Box) => a + box.value }") shouldBe
265264
SFunc(IndexedSeq(SInt, SBox), SLong)
266-
/* TODO soft-fork: https://github.com/ScorexFoundation/sigmastate-interpreter/issues/479
267-
typecheck(env, "{ (p: (Int, GroupElement), box: Box) => p._1 > box.value && p._2.isIdentity }") shouldBe
268-
SFunc(IndexedSeq(STuple(SInt, SGroupElement), SBox), SBoolean)
269-
*/
270265
typecheck(env, "{ (p: (Int, SigmaProp), box: Box) => p._1 > box.value && p._2.isProven }") shouldBe
271266
SFunc(IndexedSeq(STuple(SInt, SSigmaProp), SBox), SBoolean)
272267

@@ -307,8 +302,6 @@ class SigmaTyperTest extends AnyPropSpec
307302
typecheck(env, "SELF.R1[Int].isDefined") shouldBe SBoolean
308303
typecheck(env, "SELF.R1[Int].isEmpty") shouldBe SBoolean
309304
typecheck(env, "SELF.R1[Int].get") shouldBe SInt
310-
// TODO soft-fork: https://github.com/ScorexFoundation/sigmastate-interpreter/issues/416
311-
// typecheck(env, "SELF.getReg[Int](1)") shouldBe SOption.SIntOption
312305
typefail(env, "x[Int]", 1, 1)
313306
typefail(env, "arr1[Int]", 1, 1)
314307
typecheck(env, "SELF.R1[(Int,Boolean)]") shouldBe SOption(STuple(SInt, SBoolean))
@@ -682,11 +675,6 @@ class SigmaTyperTest extends AnyPropSpec
682675
typecheck(env, "SELF.tokens") shouldBe ErgoBox.STokensRegType
683676
}
684677

685-
// TODO soft-fork: related to https://github.com/ScorexFoundation/sigmastate-interpreter/issues/479
686-
// property("SOption.toColl") {
687-
// typecheck(env, "getVar[Int](1).toColl") shouldBe SIntArray
688-
// }
689-
690678
property("SContext.dataInputs") {
691679
typecheck(env, "CONTEXT.dataInputs") shouldBe SCollection(SBox)
692680
}

sigma-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sigmastate-js",
3-
"version": "0.4.2",
3+
"version": "0.6",
44
"description": "Sigma.js library",
55
"files": [
66
"dist/",

0 commit comments

Comments
 (0)