Skip to main content
A contract can read the state of an output only when that output is an input of the same transaction. The oracle output must let anyone spend it, and the spend must return the output with its asset and its state. A script that points to itself does this:
contracts/attestation_beacon.ark @ 9fc10ef
The third require makes the output recursive: output 0 must pay to the script of the input, and the fourth require keeps the identity unit on output 0. The read function has no signature check, so anyone can call it. Each cooperative spend keeps the unit on output 0. Only migrate can change the script. Oracle Output shows the rules of each spend.

Roles

By default, the open-source oracle service uses one key as the signer key and as adminPk.