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

revise build script and regen chain registry #63

Merged
merged 3 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions packages/chain-registry/examples/examples.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// import single chain from folder, good for tree shaking
import { chain as chain_akash } from './mainnet/akash';

console.log(chain_akash.apis);

// import single chain from root, good for tree shaking
import { akash, akashtestnet } from '../src';

console.log(akash.chain.apis, akashtestnet.chain.apis);

// backward compatibility using "all.ts": get all chains at once:
import { chains } from '../src/all';

console.log(chains.find((chain) => chain.chain_name === 'akash'));

// made bundle smaller: get all chains only in mainnet:
import { chains as chains_main } from '../src/mainnet/all';

console.log(chains_main.find((chain) => chain.chain_name === 'akash'));

// made bundle even smaller: get all chains only in mainnet
// and with minimal info customized for dropbox:
// TODO:: gen minimal arrays of mainnet and testnet and both
1 change: 1 addition & 0 deletions packages/chain-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"eslint-plugin-react-hooks": "4.6.0",
"glob": "8.0.3",
"jest": "^29.5.0",
"mkdirp": "3.0.1",
"prettier": "^2.8.7",
"regenerator-runtime": "^0.13.11",
"ts-jest": "^29.1.0",
Expand Down
Loading
Loading