From cb1499d75e1ebcf0b4360c60c27aec698e04dd17 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 15 Oct 2024 08:23:25 +0800 Subject: [PATCH] fix: docs --- README.md | 29 +++++++++++++++++++---------- adapters/README.md | 21 +++++++++++++++++++++ 2 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 adapters/README.md diff --git a/README.md b/README.md index 3acd3c8..b8d8026 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,30 @@ -# Trailblazer Adapters +# Trailblazer Whitelisted Protocols -## Adding a new protocol adapter +## Adding a New Protocol to the Whitelist -### 1. Add your project under `adapters/projects` +### 1. Modify `protocols.json` -### 2. Write an indexer in the new folder +Open [`protocols.json`](./whitelist/protocols.json) and add a new protocol entry to the whitelist. -An example adapter for tracking OrderFulfilled Event on the OKX marketplace can be seen [here](./adapters/projects/okx/order_fulfilled.go) +### 2. Example Protocol Entry -### 3. Test out the adapter by adding it to the cli +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`. -An example on how to add a new adapter to the cli is [here](./cmd/README.md) +```json +{ + "name": "Name of Protocol", + "slug": "name-of-protocol", + "contracts": [ + "0x0" + ... + ] +} +``` -### 4. Create a Pull Request +### 3. Create a Pull Request 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. -### 5. Review and Merge +### 6. Review and Merge -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. +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. diff --git a/adapters/README.md b/adapters/README.md new file mode 100644 index 0000000..47b7dc3 --- /dev/null +++ b/adapters/README.md @@ -0,0 +1,21 @@ +# Trailblazer Adapters + +## Adding a new protocol adapter + +### 1. Add your project under `adapters/projects` + +### 2. Write an indexer in the new folder + +An example adapter for tracking OrderFulfilled Event on the OKX marketplace can be seen [here](./projects/okx/order_fulfilled.go) + +### 3. Test out the adapter by adding it to the cli + +An example on how to add a new adapter to the cli is [here](../cmd/README.md) + +### 4. Create a Pull Request + +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. + +### 5. Review and Merge + +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.