All checks were successful
Sophia Tests / tests (push) Successful in 48m54s
A few references to oracles still remain, but they have been removed as a feature, at least. Reviewed-on: #985 Reviewed-by: Ulf Wiger <ulfwiger@qpq.swiss> Co-authored-by: Craig Everett <zxq9@zxq9.com> Co-committed-by: Craig Everett <zxq9@zxq9.com>
58 lines
1.2 KiB
Plaintext
58 lines
1.2 KiB
Plaintext
include "String.aes"
|
|
contract FunctionArguments =
|
|
|
|
entrypoint sum(n : int, m: int) =
|
|
n + m
|
|
|
|
entrypoint append(xs : list(string)) =
|
|
switch(xs)
|
|
[] => ""
|
|
y :: ys => String.concat(y, append(ys))
|
|
|
|
entrypoint menot(b) =
|
|
!b
|
|
|
|
entrypoint bitsum(b : bits) =
|
|
Bits.sum(b)
|
|
|
|
record answer('a) = {label : string, result : 'a}
|
|
|
|
entrypoint read(a : answer(int)) =
|
|
a.result
|
|
|
|
entrypoint any_bytes(b : bytes()) = b
|
|
|
|
entrypoint sjutton(b : bytes(17)) =
|
|
b
|
|
|
|
entrypoint sextiosju(b : bytes(67)) =
|
|
b
|
|
|
|
entrypoint trettiotva(b : bytes(32)) =
|
|
b
|
|
|
|
datatype colour() = Green | Yellow | Red | Pantone(int)
|
|
|
|
entrypoint traffic_light(c : colour) =
|
|
Red
|
|
|
|
entrypoint tuples(t : unit) =
|
|
t
|
|
|
|
entrypoint due(t : Chain.ttl) =
|
|
true
|
|
|
|
record singleton_r = { x : int }
|
|
|
|
entrypoint singleton_rec(r : singleton_r) =
|
|
r.x
|
|
|
|
entrypoint aens_name(n : AENS.name) = true
|
|
entrypoint aens_pointee(p : AENS.pointee) = true
|
|
|
|
entrypoint chain_ga_meta_tx(tx : Chain.ga_meta_tx) = true
|
|
entrypoint chain_paying_for_tx(tx : Chain.paying_for_tx) = true
|
|
entrypoint chain_base_tx(tx : Chain.base_tx) = true
|
|
|
|
entrypoint sig(sg : signature) = true
|