sophia/test/contracts/test.aes

20 lines
601 B
Plaintext

// If you need a quick compiler test — this file is for your playground
contract IntegerAdder =
entrypoint init() = unit
entrypoint addIntegers(x, y) = x + y
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)