Open protocols.json
and add a new protocol entry to the whitelist.
A new protocol entry needs atleast a name, slug and its contract addresses. Optionally, add twitter and logo reference. Logo must be stored under ./img
. Ensure your slug is consistent with your project's slug used in Defillama if you are integrated.
{
"name": "Name of Protocol",
"slug": "name-of-protocol",
"contracts": [
"0x0"
...
],
"twitter": "@optional-protocol-twitter",
"logo": "optional-protocol-logo.jpg",
}
Create a pull request (PR) on GitHub to merge your changes into the main branch. Provide a clear description of the changes and the protocol added.
Wait for the PR to be reviewed by the maintainers. Once approved, your changes will be merged, and the new protocol will be added to the whitelist.
After the details of the indexer has been confirmed with the team, add your project's indexer in the adapters/projects
folder. See adapters/adapters.go
for interfaces and types.
An example adapter for tracking OrderFulfilled Event on the OKX marketplace can be seen here along with its accompanying test file.
First, add a new adapter in cmd/adapter.go
. Second, add adapter to switch case of cmd/cmd.go
's function executeCommand
. Test out the CLI with go run .
from project root.
Create a pull request (PR) on GitHub to merge your changes into the main branch. Provide a clear description of the changes and the protocol added.
Wait for the PR to be reviewed by the maintainers. Once approved, your changes will be merged, and the protocol info will be added to trailblazers.