Integrate a New Project
Last updated
Last updated
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.
This notification aims to protect Aave users from liquidation by notifying them when their position health factor drops below 1.1:
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.
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 Alchemy
Create /_test/test-superlend.js
for your test, you can copy one of the other example test files
Run node ./_test/test-superlend.js
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.