Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates readme #3268

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 17 additions & 29 deletions packages/synapse-constants/README.md
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
abtestingalpha marked this conversation as resolved.
Show resolved Hide resolved
```

## 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
Loading