How can I create an Oracle Smart Contract in TEAL?

I am able to create Oracles in Blockchain Platforms such as Ethereum, Hyperledger, Aeternity etc. Is there a way I can create an Oracle Smart Contract that verifies Algorand Transactions ? I would like to use this Oracle to feed data from external data sources while I am doing Algorand Transactions. This is to design a Lottery Application in Algorand.

Hi @gokulalex,

You can use TEAL to create oracles.

Here is an example: (this example has not been reviewed for security — it needs to be compiled with
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

Hi @fabrice this is quite interesting. I am going through steal examples. This will be quite useful for our proof of concept. Thank you so much !

You can check this I article:


1 Like