-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ccdca8
commit cb1499d
Showing
2 changed files
with
40 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |