How can I create an Oracle Smart Contract in TEAL?

Hi @gokulalex,

You can use TEAL to create oracles.

Here is an example:
https://github.com/derbear/steal/blob/oracle/examples/oracle.rkt (this example has not been reviewed for security — it needs to be compiled with https://github.com/derbear/steal/)
It is possible to change this example slightly to make the note directly the oracle value, and to restrict the validity of the oracle value to some range of rounds.

Please note that this example has not been reviewed. It needs to be carefully reviewed before use in real applications.

1 Like