CREATE sometimes compiles and sometimes not

This commit is contained in:
radrow
2021-04-26 14:04:34 +02:00
parent 6a46bb74ab
commit c47169a4a4
5 changed files with 113 additions and 61 deletions
+18 -7
View File
@@ -1,9 +1,20 @@
// If you need a quick compiler test — this file is for your playground
contract Chuj =
type state = bool
// entrypoint init : (int, bool) => void
entrypoint init(x : int, y : bool) = if(x < 0) abort("xD") else true
contract IntegerAdder =
entrypoint init() = unit
entrypoint addIntegers(x, y) = x + y
main contract Test =
stateful entrypoint kek() =
Chain.create(value=3, 123, 555) : Chuj
contract IntegerAdderHolder =
type state = IntegerAdder
entrypoint init() = Chain.create() : IntegerAdder
entrypoint get() = state
namespace IntegerAdderFactory =
function new() =
let i = Chain.create() : IntegerAdderHolder
i.get()
main contract EnterpriseContract =
entrypoint calculateSomething(x) =
let adder = IntegerAdderFactory.new()
adder.addIntegers(x, 2137)