sophia/test/contracts/events.aes
Craig Everett dbab49936d
All checks were successful
Sophia Tests / tests (push) Successful in 48m54s
Renaming and preparing to remove oracles (#985)
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>
2025-03-13 12:53:01 +09:00

37 lines
1.0 KiB
Plaintext

contract interface Remote =
entrypoint dummy : () => unit
contract Events =
// Valid index types
type ix1 = int
type ix2 = bool
type ix3 = bits
type ix4 = bytes(12)
type ix5 = hash // bytes(32)
type ix6 = address
type ix7 = Remote
// Valid payload types
type data1 = string
type data2 = signature // bytes(64)
type data3 = bytes(65)
datatype event
= Nodata0
| Nodata1(ix1)
| Nodata2(ix2, ix3)
| Nodata3(ix4, ix5, ix6)
| Data0(data1)
| Data1(data2, ix7)
| Data3(ix1, ix2, ix5, data1)
entrypoint nodata0() = Chain.event(Nodata0)
entrypoint nodata1(ix1) = Chain.event(Nodata1(ix1))
entrypoint nodata2(ix2, ix3) = Chain.event(Nodata2(ix2, ix3))
entrypoint nodata3(ix4, ix5, ix6) = Chain.event(Nodata3(ix4, ix5, ix6))
entrypoint data0(data1) = Chain.event(Data0(data1))
entrypoint data1(data2, ix7) = Chain.event(Data1(data2, ix7))
entrypoint data3(ix1, ix2, ix5, data1) = Chain.event(Data3(ix1, ix2, ix5, data1))