Skip to content

Commit

Permalink
Merge pull request #110 from taikoxyz/docs
Browse files Browse the repository at this point in the history
fix: docs
  • Loading branch information
bennettyong authored Oct 15, 2024
2 parents 4ccdca8 + cb1499d commit 8e6b4cd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
29 changes: 19 additions & 10 deletions README.md
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.
21 changes: 21 additions & 0 deletions adapters/README.md
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.

0 comments on commit 8e6b4cd

Please sign in to comment.