Integrate a New Project
How to integrate a new project
Integrating notifications for a new project requires implementing a small web3-compatible JavaScript class and creating a new PR to add the class to this repo.
Example - low health notification for Aave
This notification aims to protect Aave users from liquidation by notifying them when their position health factor drops below 1.1:
Documentation and more examples
Formal TypeScript type definitions for the class interface are available here. Explore example integrations to different projects by browsing the different directories in this repo.
Testing your integration
Before submitting the PR, you should test your integration manually. Let's assume that you're integrating a new lending project called "SuperLend". You've git cloned this repo locally, created your new integration in the new directory superlend and created the following new files:
/superlend/project.json
/superlend/near-liquidation.js
To test your integration for the near liquidation notification do the following:
Make sure you're in the repo root
Run
npm install
Create
/_test/dev-keys.json
(see example in that directory) containing your API key for a web3 service like Infura or AlchemyCreate
/_test/test-superlend.js
for your test, you can copy one of the other example test filesRun node
./_test/test-superlend.js
Execution environment
These JavaScript classes are constantly executed by protocol alert nodes in order to analyze new blocks of on-chain data for notifying protocol subscribers. Alert nodes are currently supported on the Orbs Network and executed by the public validators of the network.
Recent Community Contributions
Last updated