A class meant to be extended with the custom implementation of an Oracle Program. Takes care of
executing the correct code depending on the phase of the Data Request.
Example
classMyOracleProgramextendsOracleProgram { execution(): void { Process.success(Bytes.fromUtf8String("Hello from execution phase")); } tally(): void { Process.success(Bytes.fromUtf8String("Hello from tally phase")); } }
Meant to be overridden if the oracle program needs to execute logic in the execution phase.
Returns void
run
run(): void
Method used to execute the correct part of the oracle program depending on the context in which it is run.
Not meant to be overridden unless you know what you're doing.
Returns void
tally
tally(): void
Meant to be overridden if the oracle program needs to execute logic in the tally phase.
A class meant to be extended with the custom implementation of an Oracle Program. Takes care of executing the correct code depending on the phase of the Data Request.
Example