Skip to content

Commit

Permalink
revise build script and regen chain registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetazzz committed Jan 29, 2024
1 parent 69ca524 commit d4fc6da
Show file tree
Hide file tree
Showing 1,076 changed files with 123,182 additions and 83,065 deletions.
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
11 changes: 11 additions & 0 deletions packages/chain-registry/sample/all.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import assets from './assets/';
import chains from './chains';
import ibc from './ibc';

export default {
assets,
chains,
ibc
};

export { assets, chains, ibc };
8 changes: 8 additions & 0 deletions packages/chain-registry/sample/assets.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { AssetList } from '@chain-registry/types';

import * as _mainnet from './mainnet/all';
import * as _testnet from './testnet/all';

const assets: AssetList[] = [..._mainnet.assets, ..._testnet.assets];

export default assets;
8 changes: 8 additions & 0 deletions packages/chain-registry/sample/chains.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Chain } from '@chain-registry/types';

import * as _mainnet from './mainnet/all';
import * as _testnet from './testnet/all';

const chains: Chain[] = [..._mainnet.chains, ..._testnet.chains];

export default chains;
23 changes: 23 additions & 0 deletions packages/chain-registry/sample/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 '.';

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

// backward compatibility using "all.ts": get all chains at once:
import { chains } from './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 './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
8 changes: 8 additions & 0 deletions packages/chain-registry/sample/ibc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { IBCInfo } from '@chain-registry/types';

import * as _mainnet from './mainnet/all';
import * as _testnet from './testnet/all';

const ibc: IBCInfo[] = [..._mainnet.ibc, ..._testnet.ibc];

export default ibc;
2 changes: 2 additions & 0 deletions packages/chain-registry/sample/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './mainnet';
export * from './testnet';
37 changes: 37 additions & 0 deletions packages/chain-registry/sample/mainnet/8ball/assets.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { AssetList } from '@chain-registry/types';
const info: AssetList = {
"$schema": "../assetlist.schema.json",
"chain_name": "8ball",
"assets": [
{
"description": "The native staking token of 8ball.",
"denom_units": [
{
"denom": "uebl",
"exponent": 0
},
{
"denom": "ebl",
"exponent": 6
}
],
"base": "uebl",
"name": "8ball",
"display": "ebl",
"symbol": "EBL",
"logo_URIs": {
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/8ball/images/8ball.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/8ball/images/8ball.svg"
},
"coingecko_id": "",
"images": [
{
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/8ball/images/8ball.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/8ball/images/8ball.svg"
}
]
}
]
};
export default info;

130 changes: 130 additions & 0 deletions packages/chain-registry/sample/mainnet/8ball/chain.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
import { Chain } from '@chain-registry/types';
const info: Chain = {
"$schema": "../chain.schema.json",
"chain_name": "8ball",
"status": "live",
"website": "https://8ball.info/",
"network_type": "mainnet",
"pretty_name": "8ball",
"chain_id": "eightball-1",
"bech32_prefix": "8ball",
"daemon_name": "8ball",
"node_home": "$HOME/.8ball",
"key_algos": [
"secp256k1"
],
"slip44": 118,
"fees": {
"fee_tokens": [
{
"denom": "uebl",
"fixed_min_gas_price": 0,
"low_gas_price": 0,
"average_gas_price": 0.025,
"high_gas_price": 0.04
}
]
},
"staking": {
"staking_tokens": [
{
"denom": "uebl"
}
]
},
"codebase": {
"cosmos_sdk_version": "0.46.7",
"cosmwasm_enabled": true
},
"logo_URIs": {
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/8ball/images/8ball.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/8ball/images/8ball.svg"
},
"apis": {
"rpc": [
{
"address": "https://rpc.8ball.info/",
"provider": "8ball"
},
{
"address": "https://rpc.8ball.nodestake.top",
"provider": "NodeStake"
},
{
"address": "https://8ball-rpc.genznodes.dev/",
"provider": "genznodes"
}
],
"rest": [
{
"address": "https://rest.8ball.info",
"provider": "8ball"
},
{
"address": "https://api.8ball.nodestake.top",
"provider": "NodeStake"
},
{
"address": "https://8ball-api.genznodes.dev/",
"provider": "genznodes"
},
{
"address": "https://api-8ball.nodine.id/",
"provider": "Nodine.ID"
}
],
"grpc": [
{
"address": "grpc.8ball.nodestake.top:443",
"provider": "NodeStake"
},
{
"address": "8ball-grpc.genznodes.dev:31090",
"provider": "genznodes"
},
{
"address": "https://grpc.8ball.nodexcapital.com:443",
"provider": "NodeX Validator"
}
]
},
"explorers": [
{
"url": "https://explorer.8ball.info/",
"tx_page": "https://explorer.8ball.info/8ball/tx/${txHash}"
},
{
"kind": "ping.pub",
"url": "https://ping.pub/8ball",
"tx_page": "https://ping.pub/8ball/tx/${txHash}"
},
{
"kind": "NodeStake Explorer",
"url": "https://explorer.nodestake.top/8ball/",
"tx_page": "https://explorer.nodestake.top/8ball/tx/${txHash}"
},
{
"kind": "TC Network",
"url": "https://explorer.tcnetwork.io/8ball",
"tx_page": "https://explorer.tcnetwork.io/8ball/transaction/${txHash}"
},
{
"kind": "TC Network",
"url": "https://explorer.co.id/8ball",
"tx_page": "https://explorer.co.id/8ball/tx/${txHash}"
},
{
"kind": "NODEXPLORER",
"url": "https://explorer.nodexcapital.com/8ball",
"tx_page": "https://explorer.nodexcapital.com/8ball/tx/${txHash}"
}
],
"images": [
{
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/8ball/images/8ball.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/8ball/images/8ball.svg"
}
]
};
export default info;

36 changes: 36 additions & 0 deletions packages/chain-registry/sample/mainnet/8ball/ibc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { IBCInfo } from '@chain-registry/types';
const info: IBCInfo[] = [
{
$schema: '../ibc_data.schema.json',
chain_1: {
chain_name: '8ball',
client_id: '07-tendermint-2',
connection_id: 'connection-18',
},
chain_2: {
chain_name: 'osmosis',
client_id: '07-tendermint-2668',
connection_id: 'connection-2163',
},
channels: [
{
chain_1: {
channel_id: 'channel-16',
port_id: 'transfer',
},
chain_2: {
channel_id: 'channel-641',
port_id: 'transfer',
},
ordering: 'unordered',
version: 'ics20-1',
tags: {
status: 'live',
preferred: true,
dex: 'osmosis',
}
}
]
}
];
export default info;
36 changes: 36 additions & 0 deletions packages/chain-registry/sample/mainnet/8ball/ibc_chain1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { IBCInfo } from '@chain-registry/types';
const info: IBCInfo[] = [
{
$schema: '../ibc_data.schema.json',
chain_1: {
chain_name: '8ball',
client_id: '07-tendermint-2',
connection_id: 'connection-18',
},
chain_2: {
chain_name: 'osmosis',
client_id: '07-tendermint-2668',
connection_id: 'connection-2163',
},
channels: [
{
chain_1: {
channel_id: 'channel-16',
port_id: 'transfer',
},
chain_2: {
channel_id: 'channel-641',
port_id: 'transfer',
},
ordering: 'unordered',
version: 'ics20-1',
tags: {
status: 'live',
preferred: true,
dex: 'osmosis',
}
}
]
}
];
export default info;
9 changes: 9 additions & 0 deletions packages/chain-registry/sample/mainnet/8ball/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import _assets from './assets';
import _chain from './chain';
import _ibc from './ibc';
import _ibc_chain1 from './ibc_chain1';

export const assets = _assets;
export const chain = _chain;
export const ibc = _ibc;
export const ibc_chain1 = _ibc_chain1;
Loading

0 comments on commit d4fc6da

Please sign in to comment.