🔹Script Developer
A brief description of how to develop an oracle script on Future-AI:
Future-AI currently only supports scripts written in shell script
For an script, the number of input arguments must be at least two. The first one: $1 is reserved for execution type of the script. For now, the validators only accept three execution types: aiDataSource, testcase, and aggregation. Other types will not be read, and unexpected behaviours may happen. The first type collects all the AI data source names that the oracle wants to execute, while the second type gets all the test cases it prefers. The last type, on the other hand, is the business logic of the oracle script, which is responsible for processing all the results retrieved from the data sources. Indeed, all the results are put in a string passed to the second argument $2 with a delimiter, which is -, and it is the oracle script's job to process these values to come up with a final result to be returned back to Future-AI. An example of an oracle script that is syntaxtically correct is below:
Note:
-> In order to deploy an oracle script on Future-AI, all sufficient data sources and test cases provided in the script need to be on the network already.
->If a data source or a test case change its name, the oracle script deployer must manually edit his script. Otherwise, the script will not run properly because it cannot find the correct data source or test case.
Last updated