Skip to content

Commit

Permalink
refactor: remove registries package usage and use code generated
Browse files Browse the repository at this point in the history
  • Loading branch information
codingki committed Nov 8, 2024
1 parent 5e8b6fb commit e23d848
Show file tree
Hide file tree
Showing 16 changed files with 427 additions and 197 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"@cosmos-kit/react": "2.10.x",
"@cosmos-kit/station": "2.5.x",
"@cosmos-kit/vectis": "2.6.x",
"@initia/initia-registry": "0.1.9",
"@injectivelabs/core-proto-ts": "0.0.21",
"@injectivelabs/sdk-ts": "1.14.5",
"@keplr-wallet/unit": "^0.12.67",
Expand All @@ -62,7 +61,6 @@
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"axios": "1.x",
"chain-registry": "^1.69.22",
"cosmjs-types": "0.9.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/client/scripts/codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const registries = [
packageName: 'chain-registry',
registryPath: path.resolve(__dirname, '../../../node_modules/chain-registry'),
},
{
packageName: 'initia-registry',
registryPath: path.resolve(__dirname, '../../../node_modules/@initia/initia-registry/main'),
}
];

async function genTelescope () {
Expand Down Expand Up @@ -212,4 +216,4 @@ async function codegen() {

}

void codegen();
void codegen();
202 changes: 168 additions & 34 deletions packages/client/src/codegen/chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -1075,10 +1075,6 @@
{
"address": "http://134.122.12.165:26657",
"provider": "bitbadges"
},
{
"address": "https://bitbadges_mainnet_rpc.chain.whenmoonwhenlambo.money",
"provider": "🚀 WHEN MOON 🌕 WHEN LAMBO 🔥"
}
]
}
Expand Down Expand Up @@ -5619,10 +5615,6 @@
{
"address": "https://mantrachain-mainnet-rpc.autostake.com:443",
"provider": "AutoStake 🛡️ Slash Protected"
},
{
"address": "https://mantra-rpc.publicnode.com:443",
"provider": "Allnodes ⚡️ Nodes & Staking"
}
]
}
Expand Down Expand Up @@ -11530,10 +11522,6 @@
{
"address": "https://rpc.dukong.mantrachain.io",
"provider": "MANTRACHAIN"
},
{
"address": "https://mantra-testnet-rpc.publicnode.com:443",
"provider": "Allnodes ⚡️ Nodes & Staking"
}
]
}
Expand Down Expand Up @@ -11679,28 +11667,6 @@
]
}
},
{
"chain_id": "nibiru-testnet-3",
"fees": {
"fee_tokens": [
{
"denom": "unibi",
"fixed_min_gas_price": 0.025,
"low_gas_price": 0.025,
"average_gas_price": 0.05,
"high_gas_price": 0.1
}
]
},
"apis": {
"rpc": [
{
"address": "https://rpc.testnet-3.nibiru.fi",
"provider": "Nibiru Foundation"
}
]
}
},
{
"chain_id": "nillion-chain-testnet-1",
"fees": {
Expand Down Expand Up @@ -13040,5 +13006,173 @@
}
]
}
},
{
"chain_id": "landlord-2",
"fees": {
"fee_tokens": [
{
"denom": "l2/1666ede2bf1985307a86de36a6b78411cbf1edeffc2ac569e6a7b2f8753db4bb",
"fixed_min_gas_price": 0.15,
"low_gas_price": 0.2,
"average_gas_price": 0.3,
"high_gas_price": 0.4
}
]
},
"apis": {
"rpc": [
{
"address": "https://maze-rpc-sequencer-53ecf1d6-4fa1-4103-827f-a9430df97cef.ane1-prod-nocsm.newmetric.xyz",
"provider": "Civitia"
}
]
}
},
{
"chain_id": "initiation-2",
"fees": {
"fee_tokens": [
{
"denom": "uinit",
"fixed_min_gas_price": 0.15,
"low_gas_price": 0.15,
"average_gas_price": 0.15,
"high_gas_price": 0.4
}
]
},
"apis": {
"rpc": [
{
"address": "https://rpc.testnet.initia.xyz/",
"provider": "Initia Labs"
},
{
"address": "https://rpc-skip.testnet.initia.xyz/",
"provider": "Initia Labs",
"authorizedUser": "skip"
}
]
}
},
{
"chain_id": "glados-2.1",
"fees": {
"fee_tokens": [
{
"denom": "umilk",
"fixed_min_gas_price": 0.15,
"low_gas_price": 0.2,
"average_gas_price": 0.3,
"high_gas_price": 0.4
},
{
"denom": "ibc/37A3FB4FED4CA04ED6D9E5DA36C6D27248645F0E22F585576A1488B8A89C5A50",
"fixed_min_gas_price": 0.15,
"low_gas_price": 0.2,
"average_gas_price": 0.3,
"high_gas_price": 0.4
}
]
},
"apis": {
"rpc": [
{
"address": "https://rpc.testnet.milkyway.zone",
"provider": "MilkyWay Labs"
},
{
"address": "https://rpc-skip.testnet.milkyway.zone",
"provider": "MilkyWay Labs",
"authorizedUser": "skip",
"indexForSkip": 0
}
]
}
},
{
"chain_id": "minievm-2",
"fees": {
"fee_tokens": [
{
"denom": "GAS",
"fixed_min_gas_price": 0,
"low_gas_price": 0,
"average_gas_price": 0,
"high_gas_price": 0
}
]
},
"apis": {
"rpc": [
{
"address": "https://rpc.minievm-2.initia.xyz",
"provider": "Initia Labs"
},
{
"address": "https://rpc-skip.minievm-2.initia.xyz",
"provider": "Initia Labs",
"authorizedUser": "skip",
"indexForSkip": 0
}
]
}
},
{
"chain_id": "minimove-2",
"fees": {
"fee_tokens": [
{
"denom": "umin",
"fixed_min_gas_price": 0,
"low_gas_price": 0,
"average_gas_price": 0,
"high_gas_price": 0
}
]
},
"apis": {
"rpc": [
{
"address": "https://rpc.minimove-2.initia.xyz",
"provider": "Initia Labs"
},
{
"address": "https://rpc-skip.minimove-2.initia.xyz",
"provider": "Initia Labs",
"authorizedUser": "skip",
"indexForSkip": 0
}
]
}
},
{
"chain_id": "miniwasm-2",
"fees": {
"fee_tokens": [
{
"denom": "umin",
"fixed_min_gas_price": 0,
"low_gas_price": 0,
"average_gas_price": 0,
"high_gas_price": 0
}
]
},
"apis": {
"rpc": [
{
"address": "https://rpc.miniwasm-2.initia.xyz",
"provider": "Initia Labs"
},
{
"address": "https://rpc-skip.miniwasm-2.initia.xyz",
"provider": "Initia Labs",
"authorizedUser": "skip",
"indexForSkip": 0
}
]
}
}
]
10 changes: 5 additions & 5 deletions packages/widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
"scripts": {
"dev": "vite --force",
"dev:storybook": "storybook dev -p 6006",
"build": "NODE_OPTIONS=--max-old-space-size=16384 vite build",
"build": "npm run generate-chains && NODE_OPTIONS=--max-old-space-size=16384 vite build",
"lint": "eslint . --fix",
"preview": "vite preview",
"build:web-component": "NODE_OPTIONS=--max-old-space-size=32384 webpack --config webpack.config.js",
"publish:web-component": "npm run build:web-component && cd web-component && npm publish --tag=alpha && cd ..",
"prepack": "yarn run pre",
"postpack": "yarn run post",
"pre": "npm run build && node scripts/prepublish.cjs",
"post": "git checkout -- package.json"
"post": "git checkout -- package.json",
"generate-chains": "node scripts/generate-chains.cjs"
},
"exports": {
".": {
Expand All @@ -34,6 +35,7 @@
"devDependencies": {
"@chromatic-com/storybook": "^1.6.1",
"@eslint/js": "^9.9.0",
"@initia/initia-registry": "^0.2.1",
"@keplr-wallet/types": "^0.12.125",
"@storybook/addon-essentials": "^8.2.6",
"@storybook/addon-interactions": "^8.2.6",
Expand All @@ -51,6 +53,7 @@
"@typescript-eslint/parser": "^7.15.0",
"@vitejs/plugin-react": "^4.3.1",
"buffer": "^6.0.3",
"chain-registry": "^1.69.26",
"eslint": "^9.9.0",
"eslint-plugin-react-hooks": "^4.6.2",
"node-polyfill-webpack-plugin": "^4.0.0",
Expand All @@ -70,18 +73,15 @@
},
"peerDependencies": {
"@tanstack/react-query": "^5.51.21",
"chain-registry": "^1.69.22",
"graz": "^0.1.25",
"react": ">=17.0.0",
"react-dom": ">=17.0.0",
"viem": "^2.21.1",
"wagmi": "^2.12.8"
},
"dependencies": {
"@chain-registry/keplr": "^1.74.22",
"@ebay/nice-modal-react": "^1.2.13",
"@eslint/compat": "^1.1.1",
"@initia/initia-registry": "^0.1.16",
"@leapwallet/cosmos-social-login-capsule-provider": "^0.0.44",
"@penumbra-zone/bech32m": "^7.0.0",
"@penumbra-zone/client": "^18.1.0",
Expand Down
Loading

0 comments on commit e23d848

Please sign in to comment.