From bf38a1078ab3e06e0354aebe7da8a628c9adc332 Mon Sep 17 00:00:00 2001 From: nigiri <168690269+0xnigir1@users.noreply.github.com> Date: Fri, 30 Aug 2024 17:16:29 -0300 Subject: [PATCH] docs: beautify readme --- apps/api/README.md | 33 ++++++++++++++++++--------------- packages/pricing/README.md | 2 +- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/apps/api/README.md b/apps/api/README.md index 1e942d7..78f95e0 100644 --- a/apps/api/README.md +++ b/apps/api/README.md @@ -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 diff --git a/packages/pricing/README.md b/packages/pricing/README.md index aa098c7..9cd55b9 100644 --- a/packages/pricing/README.md +++ b/packages/pricing/README.md @@ -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