Creating Oracle
We created many tools to help creating Oracle as simple as possible. This section will walk you through creating your Oracle and endpoint through examples of each tool
This example uses zap-oracle-template that utilizes zapjs packages, for using zapjs packages to create oracle from scratch, check out section {link ZAPJS packages tutorial here}
Set up oracle dir
Layout :
Config : data about your wallet , ethereum node and your provider's pubkey and title
Schema : Your oracle's endpoint list with their params and pre-defined query/response schema
Oracle : Template for Create/Manage flow
Responder : Stub callback function when receive query event and return result
If your address doesnt have oracle initiated, a new oracle and endpoint will be created when you run yarn start
RUNNING ORACLE
Change config.ts with your oracle's information and Implement respond method
Congrats, you have successfully created an oracle and start listening to query as well as providing responses to subscribers
Last updated