Skip to content

Commit

Permalink
docs: beautify readme
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnigir1 committed Aug 30, 2024
1 parent e11deb9 commit bf38a10
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
33 changes: 18 additions & 15 deletions apps/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,24 @@ $ cp .env.example .env
```

Available options:

- (optional) `PORT` on which API is made available. By default is port 3000
- (optional) `ENVIRONMENT` which environment we are using ( 'mainnet' | 'testnet' | 'local'). By default is 'mainnet'
- `BRIDGE_HUB_ADDRESS`
- `SHARED_BRIDGE_ADDRESS`
- `STATE_MANAGER_ADDRESSES` CSV list of State managers addresses
- `L1_RPC_URLS` as CSV list of RPC URLs. For example, `https://eth.llamarpc.com,https://rpc.flashbots.net/fast`. You can check [Chainlist](https://chainlist.org/) for a list of public RPCs
- (optional) `PRICING_SOURCE` which pricing source to use ('dummy' | 'coingecko'). By default is dummy
- (optional) `DUMMY_PRICE` for dummy pricing source. Default is undefined
- (required if 'coingecko' is selected)`COINGECKO_API_KEY`, `COINGECKO_BASE_URL` and `COINGECKO_API_KEY` depending on your API plan. You can get an API Key creating an account on [Coingecko's site](https://www.coingecko.com/en/api)
- `METADATA_SOURCE` which metadata source to use ('github' | 'local' | 'static')
- (required if METADATA_SOURCE is 'github') `METADATA_TOKEN_URL` Metadata tokens URL
- (required if METADATA_SOURCE is 'github') `METADATA_CHAIN_URL` Metadata chains URL
- (required if METADATA_SOURCE is 'local') `METADATA_TOKEN_JSON_PATH` Metadata tokens JSON file path (see examples on `packages/metadata`)
- (required if METADATA_SOURCE is 'local') `METADATA_CHAIN_JSON_PATH` Metadata chain JSON file path (see examples on `packages/metadata`)
| Name | Description | Default | Required | Notes |
|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------|-----------|----------------------------------|-----------------------------------------------------------------|
| `PORT` | Port on which API is made available | 3000 | No | |
| `ENVIRONMENT` | Environment we are using (`'mainnet'`, `'testnet'`, `'local'`) | 'mainnet' | No | |
| `BRIDGE_HUB_ADDRESS` | Bridge Hub address | N/A | Yes | |
| `SHARED_BRIDGE_ADDRESS` | Shared Bridge address | N/A | Yes | |
| `STATE_MANAGER_ADDRESSES` | CSV list of State manager addresses | N/A | Yes | |
| `L1_RPC_URLS` | CSV list of RPC URLs. For example, `https://eth.llamarpc.com,https://rpc.flashbots.net/fast` | N/A | Yes | You can check [Chainlist](https://chainlist.org/) for a list of public RPCs |
| `PRICING_SOURCE` | Pricing source to use (`'dummy'`, `'coingecko'`) | 'dummy' | No | |
| `DUMMY_PRICE` | Price for dummy pricing source | undefined | No | Only applicable if `PRICING_SOURCE` is `'dummy'` |
| `COINGECKO_API_KEY` | API key for CoinGecko | N/A | If `'coingecko'` is selected | You can get an API key by creating an account on [CoinGecko's site](https://www.coingecko.com/en/api) |
| `COINGECKO_BASE_URL` | Base URL for CoinGecko | N/A | If `'coingecko'` is selected | |
| `COINGECKO_API_TYPE` | CoinGecko API Type (`'demo'` or `'pro'`) | N/A | If `'coingecko'` is selected | |
| `METADATA_SOURCE` | Metadata source to use (`'github'`, `'local'`, `'static'`) | N/A | Yes | |
| `METADATA_TOKEN_URL` | Metadata tokens URL | N/A | If `METADATA_SOURCE` is `'github'` | |
| `METADATA_CHAIN_URL` | Metadata chains URL | N/A | If `METADATA_SOURCE` is `'github'` | |
| `METADATA_TOKEN_JSON_PATH` | Metadata tokens JSON file path | N/A | If `METADATA_SOURCE` is `'local'` | See examples in `packages/metadata` |
| `METADATA_CHAIN_JSON_PATH` | Metadata chain JSON file path | N/A | If `METADATA_SOURCE` is `'local'` | See examples in `packages/metadata` |

## Running the app

Expand Down
2 changes: 1 addition & 1 deletion packages/pricing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Retrieves the price for the list of token.

1. To create a new provider, create it inside [`providers`](./src/providers/) folder and implement the [`IPricingProvider`](./src/interfaces/pricing.interface.ts) interface.

> Note 1: is provider implementation responsibility to map token addresses to their internal id if needed.
> Note 1: it is the provider's responsibility to map token addresses to their internal id if needed
> Note 2: for native token (eg. ETH), use the one address
Expand Down

0 comments on commit bf38a10

Please sign in to comment.