Skip to content

Commit

Permalink
Merge pull request #63 from cosmology-tech/split-json
Browse files Browse the repository at this point in the history
revise build script and regen chain registry
  • Loading branch information
Zetazzz authored Jan 30, 2024
2 parents 69ca524 + 244076c commit 937cc57
Show file tree
Hide file tree
Showing 1,044 changed files with 122,790 additions and 83,069 deletions.
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

0 comments on commit 937cc57

Please sign in to comment.