Yeah, so the "contract" is like a "struct" in Swift language (what I speak), as you get the initializer ("construct") for free; whereas in Swift "classes" require a specifically written initializer. Still not sure how sCrypt works exactly, but first you'd need to call Test, like Test(0) to set x = 0 (or this.x, with "this" being equivalent in Swift to "self"). THEN, the the Test has 3 functions (or methods) which can be called: equals, larger, smaller. So if you simply call Test.equal(0) this would meet the TRUE requirement for "require" and the condition would be met. If you used Test.larger(1) then this would also pass, as 1 > 0. Finally, Test.smaller(-1) would also pass. However, it appears as tho you aren't supposed to call the functions as I did above (the Swifty way), but call them with an index where 1 = equals, 2 = smaller, and 3 => larger. So a solution would be something like "0 1" where 0 goes into the stack as "y" and "1" calls "equals" to see if 0 == 0.
Final, and still not sure, answer: OP_0 OP_1. So Solval was right all along!
Yeah, so the "contract" is like a "struct" in Swift language (what I speak), as you get the initializer ("construct") for free; whereas in Swift "classes" require a specifically written initializer. Still not sure how sCrypt works exactly, but first you'd need to call Test, like Test(0) to set x = 0 (or this.x, with "this" being equivalent in Swift to "self"). THEN, the the Test has 3 functions (or methods) which can be called: equals, larger, smaller. So if you simply call Test.equal(0) this would meet the TRUE requirement for "require" and the condition would be met. If you used Test.larger(1) then this would also pass, as 1 > 0. Finally, Test.smaller(-1) would also pass. However, it appears as tho you aren't supposed to call the functions as I did above (the Swifty way), but call them with an index where 1 = equals, 2 = smaller, and 3 => larger. So a solution would be something like "0 1" where 0 goes into the stack as "y" and "1" calls "equals" to see if 0 == 0.
Final, and still not sure, answer: OP_0 OP_1. So Solval was right all along!