In this section, we will show you how to set up a simple project to monitor an ERC20 contract.
By default, Sentio will create an empty "default" project for you, if you want to have a default project ID, then click "Create Project" on the project selector. In addition, our CLI can also automatically create a project for you.
You can simply run the following command to create a processor project with the name
You can also give the processor project a name by using the following command
The commands will generate a template project based on X2Y2 token. This should be a good starting point to write your own processor logic. It is also possible to create template projects for other types of chains, please refer CLI Reference.
You can directly modify the code (
src/processor.ts) to fit your use case as well.
Sentio has a list of builtin ABIs. We also support custom ABIs for your own project. See Decoding from custom ABIs for more details.
You can build and upload the processor project by using the following command
yarn sentio upload
You will see a link to Data Source printed and you can open it in a browser to see the upload status.
The command line should tell you that the processor has been uploaded correctly and give you a link to check the status of the processor, such as what chains this processor is running, how many blocks it has processed, the version, etc.
You can go to the metrics page to check the metrics submitted to the project. Checkout Metricsfor more details.