-
Notifications
You must be signed in to change notification settings - Fork 32
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
2b05e51
commit 174911d
Showing
1 changed file
with
17 additions
and
29 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,53 +1,41 @@ | ||
# Synapse Constants | ||
|
||
[![npm](https://img.shields.io/npm/v/synapse-constants?style=flat-square)](https://www.npmjs.com/package/synapse-constants) | ||
|
||
This package contains the Synapse Protocol Token and Chain Constants | ||
|
||
|
||
# | ||
|
||
|
||
|
||
## Installation | ||
|
||
```bash | ||
npm install synapse-constants | ||
``` | ||
|
||
With Yarn: | ||
|
||
```bash | ||
yarn add synapse-constants | ||
yarn add @synapsecns/synapse-constants | ||
``` | ||
|
||
## Usage | ||
|
||
|
||
To restrict the assets and chains that are imported, you can create a "custom bridge list". From the set of all tokens imported from "bridgeable.ts" you can import specific tokens and use that as the custom list you use in your application. The same can be done for chains | ||
## Build | ||
|
||
## Usage | ||
For maintenance, when new tokens are added to the bridge the following steps should be taken. | ||
The following command will build the package locally | ||
|
||
1. Regenerate bridgeMaps.ts | ||
|
||
```bash | ||
yarn maps:generate | ||
``` | ||
yarn build | ||
``` | ||
|
||
2. Update Bridgeable.ts with the new token addresses (check all other variables like decimals/ symbols etc. ) | ||
## Usage | ||
|
||
3. Repackage and webpack all of the data | ||
Importing supported tokens and chains: | ||
|
||
```bash | ||
yarn compile | ||
```js | ||
import { BRIDGABLE_TOKENS, CHAINS } from '@synapsecns/synapse-constants' | ||
``` | ||
|
||
4. Republish the npm package (make sure to update the version) | ||
Importing a specific token: | ||
|
||
```bash | ||
npm publish | ||
```js | ||
import { USDC } from '@synapsecns/synapse-constants' | ||
``` | ||
|
||
## TODO | ||
|
||
TODO: | ||
- add the basic structure of the token type and the chain type to show accessibility for token logos, chain logos, and any additional information. | ||
- [ ] Instructions on adding new chains | ||
- [ ] Instructions on adding new tokens | ||
- [ ] Instructions on generating new token route map |