Skip to content

Commit

Permalink
Add scripts to process and aggregate chains (#125)
Browse files Browse the repository at this point in the history
* Create scripts to deploy

* Add README
  • Loading branch information
simcheolhwan authored Jun 24, 2024
1 parent c51c945 commit 51b2e58
Show file tree
Hide file tree
Showing 9 changed files with 569 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
25 changes: 25 additions & 0 deletions _api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Chain Registry Deployment Scripts

### Overview

This repository contains scripts to deploy static files from the `_api/dist` directory. The scripts perform the following tasks:

1. Copy original files to the `dist` directory.
2. Update URLs in `chain.json` and `assetlist.json` files.
3. Aggregate `chain.json` files into a single `chains.json` file by extracting specific properties.

### Usage

Set the `ROOT_DIR` environment variable to specify the network type (e.g., `testnets`, `devnets`).

Run the script:

```sh
pnpm build
```

or

```sh
ROOT_DIR=testnets pnpm build
```
13 changes: 13 additions & 0 deletions _api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"scripts": {
"build": "tsx src/main.ts"
},
"devDependencies": {
"@initia/initia-registry-types": "^0.0.17",
"@tsconfig/recommended": "^1.0.6",
"@types/node": "^20.14.8",
"@types/ramda": "^0.30.0",
"ramda": "^0.30.1",
"tsx": "^4.15.7"
}
}
355 changes: 355 additions & 0 deletions _api/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 51b2e58

Please sign in to comment.