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

upgrade chain-registry #224

Merged
merged 14 commits into from
Nov 22, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/asset-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"@types/react-dom": "18.0.9"
},
"dependencies": {
"@chain-registry/assets": "^1.21.0",
"@chain-registry/types": "0.44.3",
"@chain-registry/assets": "^1.70.32",
"@chain-registry/types": "^0.50.13",
"@cosmjs/amino": "^0.32.3",
"@cosmjs/cosmwasm-stargate": "^0.32.3",
"@cosmjs/stargate": "^0.32.3",
Expand All @@ -31,7 +31,7 @@
"@tanstack/react-query": "4.32.0",
"@uidotdev/usehooks": "2.4.1",
"bignumber.js": "^9.1.2",
"chain-registry": "1.20.0",
"chain-registry": "^1.69.32",
"cosmos-kit": "2.18.0",
"fast-fuzzy": "1.12.0",
"framer-motion": "9.0.7",
Expand All @@ -53,4 +53,4 @@
"typescript": "^5.1.6"
},
"packageManager": "[email protected]"
}
}
2 changes: 2 additions & 0 deletions examples/asset-list/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) {
return (
<ThemeProvider>
<ChainProvider
// @ts-ignore
chains={chains}
// @ts-ignore
assetLists={assets}
wallets={wallets}
walletConnectOptions={{
Expand Down
6 changes: 3 additions & 3 deletions examples/asset-list/utils/types.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { AssetDenomUnit } from '@chain-registry/types';
import { DenomUnit } from '@chain-registry/types';
import { Duration } from 'osmo-query/dist/codegen/google/protobuf/duration';
import { Gauge } from 'osmo-query/dist/codegen/osmosis/incentives/gauge';
import { SuperfluidAsset } from 'osmo-query/dist/codegen/osmosis/superfluid/superfluid';
import { Coin } from 'osmo-query/dist/codegen/cosmos/base/v1beta1/coin';
import { Pool } from 'osmo-query/dist/codegen/osmosis/gamm/pool-models/balancer/balancerPool';

export type CoinDenom = AssetDenomUnit['denom'];
export type CoinDenom = DenomUnit['denom'];

export type Exponent = AssetDenomUnit['exponent'];
export type Exponent = DenomUnit['exponent'];

export type CoinSymbol = string;

Expand Down
60 changes: 20 additions & 40 deletions examples/asset-list/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,12 @@ __metadata:
languageName: node
linkType: hard

"@chain-registry/assets@npm:^1.21.0":
version: 1.34.20
resolution: "@chain-registry/assets@npm:1.34.20"
"@chain-registry/assets@npm:^1.70.32":
version: 1.70.40
resolution: "@chain-registry/assets@npm:1.70.40"
dependencies:
"@babel/runtime": "npm:^7.21.0"
"@chain-registry/types": "npm:^0.18.15"
checksum: 10c0/f43eb1ca77f5b3ab17459ca9d61fec8d22d7ff9071704d5706dcd741088f251dc810af91c74dc7a97f8c9ddf08edfc90487e9eb09c0966f61716872a91df59fe
"@chain-registry/types": "npm:^0.50.18"
checksum: 10c0/467f389b1e032042910b1926ae9a7c3391e965a467ca14041a5faa33b4546b44ac67d952923df6a9a5463ff81582ac73177a801ee9dcff782bcf650087a9eb98
languageName: node
linkType: hard

Expand Down Expand Up @@ -145,38 +144,13 @@ __metadata:
languageName: node
linkType: hard

"@chain-registry/types@npm:0.44.3":
version: 0.44.3
resolution: "@chain-registry/types@npm:0.44.3"
checksum: 10c0/471e85e934e42ba2704fece7ca0545df5ef98e947a5d10aaefa7872145a21211036740b4b37bb8a33359561b7533c07c22e1608b372efc19be5e2ebd386ac3de
languageName: node
linkType: hard

"@chain-registry/types@npm:0.45.1":
version: 0.45.1
resolution: "@chain-registry/types@npm:0.45.1"
checksum: 10c0/d2008c36e2b9d5b4dfbeae2e4038b956789cf7a70bff85d936fdb76a34a16609952b8b233bd09c3e93eeb9ccde26a5492230d1f3e450b2a7a7b8474df76835a5
languageName: node
linkType: hard

"@chain-registry/types@npm:^0.17.0":
version: 0.17.1
resolution: "@chain-registry/types@npm:0.17.1"
dependencies:
"@babel/runtime": "npm:^7.21.0"
checksum: 10c0/00400f2994c838dbf0a4a6aa01af397d72badbeee82e13095e1ae1e5853a9405f802f0e5629f3aab0cfaa7ec9eae78eb0976001d5a24a7f33d138e2b02edb547
languageName: node
linkType: hard

"@chain-registry/types@npm:^0.18.15":
version: 0.18.15
resolution: "@chain-registry/types@npm:0.18.15"
dependencies:
"@babel/runtime": "npm:^7.21.0"
checksum: 10c0/3acc164760c99d495d691cd3d17631e5a8c0350ea3f0a58565aa8db0db3430fe9c197d1605eedb8ac06d2aa281a9d1446dfe6836ef40c99be8356134341d5c04
languageName: node
linkType: hard

"@chain-registry/types@npm:^0.45.1, @chain-registry/types@npm:^0.45.3":
version: 0.45.3
resolution: "@chain-registry/types@npm:0.45.3"
Expand All @@ -191,6 +165,13 @@ __metadata:
languageName: node
linkType: hard

"@chain-registry/types@npm:^0.50.13, @chain-registry/types@npm:^0.50.18":
version: 0.50.18
resolution: "@chain-registry/types@npm:0.50.18"
checksum: 10c0/a7b5ca5b42fbf80a98e802372fe64602c1ac3cef8b3cb20ba8e444cd2613a07ab3b26d5049eb00fbcb578836050a859c78f722c8a414ae1525043860fa0709e0
languageName: node
linkType: hard

"@chain-registry/utils@npm:^1.46.1, @chain-registry/utils@npm:^1.46.4":
version: 1.46.4
resolution: "@chain-registry/utils@npm:1.46.4"
Expand Down Expand Up @@ -557,8 +538,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@cosmology/asset-list@workspace:."
dependencies:
"@chain-registry/assets": "npm:^1.21.0"
"@chain-registry/types": "npm:0.44.3"
"@chain-registry/assets": "npm:^1.70.32"
"@chain-registry/types": "npm:^0.50.13"
"@cosmjs/amino": "npm:^0.32.3"
"@cosmjs/cosmwasm-stargate": "npm:^0.32.3"
"@cosmjs/stargate": "npm:^0.32.3"
Expand All @@ -574,7 +555,7 @@ __metadata:
"@types/react-dom": "npm:^18.3.0"
"@uidotdev/usehooks": "npm:2.4.1"
bignumber.js: "npm:^9.1.2"
chain-registry: "npm:1.20.0"
chain-registry: "npm:^1.69.32"
cosmos-kit: "npm:2.18.0"
eslint: "npm:^8.56.0"
eslint-config-next: "npm:^14.1.0"
Expand Down Expand Up @@ -5720,13 +5701,12 @@ __metadata:
languageName: node
linkType: hard

"chain-registry@npm:1.20.0":
version: 1.20.0
resolution: "chain-registry@npm:1.20.0"
"chain-registry@npm:^1.69.32":
version: 1.69.40
resolution: "chain-registry@npm:1.69.40"
dependencies:
"@babel/runtime": "npm:^7.21.0"
"@chain-registry/types": "npm:^0.17.0"
checksum: 10c0/f2d4b23bc2b8607fc4de05fa34949eaa183a563afb07f718c039c2be151fa6fbd86e9a3c998dc6ca1b7ab9440bfbc1e1218aff51f0e681f9915788269e95a9da
"@chain-registry/types": "npm:^0.50.18"
checksum: 10c0/170ce11574ad1386b90c46fa43d955e8b22ec039bff992cac23d5146e0e99fc42c9d2d2035dbae88b6127888f171bcb60d89f30c626f957e1a1bdc7279020312
languageName: node
linkType: hard

Expand Down
8 changes: 4 additions & 4 deletions examples/authz/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"@types/react-dom": "18.0.9"
},
"dependencies": {
"@chain-registry/client": "1.11.0",
"@chain-registry/types": "0.17.0",
"@chain-registry/client": "^1.53.13",
"@chain-registry/types": "^0.50.13",
"@cosmjs/amino": "0.32.4",
"@cosmjs/cosmwasm-stargate": "0.32.4",
"@cosmjs/encoding": "^0.32.4",
Expand All @@ -48,7 +48,7 @@
"@interchain-ui/react-no-ssr": "^0.1.6",
"@tanstack/react-query": "4.32.0",
"bignumber.js": "9.1.0",
"chain-registry": "1.20.0",
"chain-registry": "^1.69.32",
"cosmos-kit": "2.18.0",
"dayjs": "1.11.10",
"fast-fuzzy": "^1.12.0",
Expand Down Expand Up @@ -83,4 +83,4 @@
"typescript": "^5.1.6"
},
"packageManager": "[email protected]"
}
}
10 changes: 5 additions & 5 deletions examples/authz/utils/vote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { getChainAssets } from './chain';

export function getChainLogo(chain: Chain) {
return chain.logo_URIs?.svg || chain.logo_URIs?.png || chain.logo_URIs?.jpeg;
return chain.logo_URIs?.svg || chain.logo_URIs?.png;
}

export function formatDate(date?: Date) {
Expand All @@ -29,10 +29,10 @@ export function paginate(limit: bigint, reverse: boolean = false) {
export function percent(num: number | string = 0, total: number, decimals = 2) {
return total
? new BigNumber(num)
.dividedBy(total)
.multipliedBy(100)
.decimalPlaces(decimals)
.toNumber()
.dividedBy(total)
.multipliedBy(100)
.decimalPlaces(decimals)
.toNumber()
: 0;
}

Expand Down
109 changes: 35 additions & 74 deletions examples/authz/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1515,19 +1515,6 @@ __metadata:
languageName: node
linkType: hard

"@chain-registry/client@npm:1.11.0":
version: 1.11.0
resolution: "@chain-registry/client@npm:1.11.0"
dependencies:
"@babel/runtime": "npm:^7.21.0"
"@chain-registry/types": "npm:^0.16.0"
"@chain-registry/utils": "npm:^1.10.0"
bfs-path: "npm:^1.0.2"
cross-fetch: "npm:^3.1.5"
checksum: 10c0/89cffedfc308d6338910d7981c3d3d9e1f0fa75ca47b0672147be3607ca995d6de345cdc291f621dab7fd507f5e3907abf548a596de9dbfa450a11119ef55642
languageName: node
linkType: hard

"@chain-registry/client@npm:^1.48.1":
version: 1.48.3
resolution: "@chain-registry/client@npm:1.48.3"
Expand All @@ -1540,6 +1527,18 @@ __metadata:
languageName: node
linkType: hard

"@chain-registry/client@npm:^1.53.13":
version: 1.53.18
resolution: "@chain-registry/client@npm:1.53.18"
dependencies:
"@chain-registry/types": "npm:^0.50.18"
"@chain-registry/utils": "npm:^1.51.18"
bfs-path: "npm:^1.0.2"
cross-fetch: "npm:^3.1.5"
checksum: 10c0/55b0a02d8ac53bd195ce61146b1014f92f120443093c177949bd55fa369618a6a9d59ac138d7b4d8382abb43bb479701cf47c061bf67dca2954c86312c182ac5
languageName: node
linkType: hard

"@chain-registry/cosmostation@npm:1.66.2":
version: 1.66.2
resolution: "@chain-registry/cosmostation@npm:1.66.2"
Expand Down Expand Up @@ -1586,49 +1585,13 @@ __metadata:
languageName: node
linkType: hard

"@chain-registry/types@npm:0.17.0":
version: 0.17.0
resolution: "@chain-registry/types@npm:0.17.0"
dependencies:
"@babel/runtime": "npm:^7.21.0"
checksum: 10c0/e4a32546e350240560b1339a3dcb6426eede1569ba9d17b0d6b5eeacd79fb643f347c21ea7f5ba147185c9ad2e19eea44dff248d8e1bf27e882511398812bfe4
languageName: node
linkType: hard

"@chain-registry/types@npm:0.45.1":
version: 0.45.1
resolution: "@chain-registry/types@npm:0.45.1"
checksum: 10c0/d2008c36e2b9d5b4dfbeae2e4038b956789cf7a70bff85d936fdb76a34a16609952b8b233bd09c3e93eeb9ccde26a5492230d1f3e450b2a7a7b8474df76835a5
languageName: node
linkType: hard

"@chain-registry/types@npm:^0.16.0":
version: 0.16.0
resolution: "@chain-registry/types@npm:0.16.0"
dependencies:
"@babel/runtime": "npm:^7.21.0"
checksum: 10c0/6101d2ce519d9982d4d40bd47dd2056d60db48d87823aa6e17d45a954b0e0ca755cfc0d1c90d9e815de8f4ab1c62d55267205c4fd8b4cbd9f4a7df1752f3b4bc
languageName: node
linkType: hard

"@chain-registry/types@npm:^0.17.0":
version: 0.17.1
resolution: "@chain-registry/types@npm:0.17.1"
dependencies:
"@babel/runtime": "npm:^7.21.0"
checksum: 10c0/00400f2994c838dbf0a4a6aa01af397d72badbeee82e13095e1ae1e5853a9405f802f0e5629f3aab0cfaa7ec9eae78eb0976001d5a24a7f33d138e2b02edb547
languageName: node
linkType: hard

"@chain-registry/types@npm:^0.18.15":
version: 0.18.15
resolution: "@chain-registry/types@npm:0.18.15"
dependencies:
"@babel/runtime": "npm:^7.21.0"
checksum: 10c0/3acc164760c99d495d691cd3d17631e5a8c0350ea3f0a58565aa8db0db3430fe9c197d1605eedb8ac06d2aa281a9d1446dfe6836ef40c99be8356134341d5c04
languageName: node
linkType: hard

"@chain-registry/types@npm:^0.45.1, @chain-registry/types@npm:^0.45.3":
version: 0.45.3
resolution: "@chain-registry/types@npm:0.45.3"
Expand All @@ -1643,15 +1606,10 @@ __metadata:
languageName: node
linkType: hard

"@chain-registry/utils@npm:^1.10.0":
version: 1.19.14
resolution: "@chain-registry/utils@npm:1.19.14"
dependencies:
"@babel/runtime": "npm:^7.21.0"
"@chain-registry/types": "npm:^0.18.15"
bignumber.js: "npm:9.1.1"
sha.js: "npm:^2.4.11"
checksum: 10c0/95fd1fa9cd86848df29170b3e1f1560cace88abca8fce807cd61093eb6cba4e9efc57e64d37e07e2b163affca7b24191cfa072ef6a9067fcdc2a5497a5f137e7
"@chain-registry/types@npm:^0.50.13, @chain-registry/types@npm:^0.50.18":
version: 0.50.18
resolution: "@chain-registry/types@npm:0.50.18"
checksum: 10c0/a7b5ca5b42fbf80a98e802372fe64602c1ac3cef8b3cb20ba8e444cd2613a07ab3b26d5049eb00fbcb578836050a859c78f722c8a414ae1525043860fa0709e0
languageName: node
linkType: hard

Expand All @@ -1677,6 +1635,17 @@ __metadata:
languageName: node
linkType: hard

"@chain-registry/utils@npm:^1.51.18":
version: 1.51.18
resolution: "@chain-registry/utils@npm:1.51.18"
dependencies:
"@chain-registry/types": "npm:^0.50.18"
bignumber.js: "npm:9.1.2"
sha.js: "npm:^2.4.11"
checksum: 10c0/ee000fd1a1d10c1739e07437c9bc4905a415e12b3dd056a7e44387fbea9cc4eb12d27812bd499dd14a5276b1bfad58feaa37c6e97fcbbbdd413712acc2089218
languageName: node
linkType: hard

"@classic-terra/terra.proto@npm:^1.1.0":
version: 1.1.0
resolution: "@classic-terra/terra.proto@npm:1.1.0"
Expand Down Expand Up @@ -2282,8 +2251,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@cosmology/authz@workspace:."
dependencies:
"@chain-registry/client": "npm:1.11.0"
"@chain-registry/types": "npm:0.17.0"
"@chain-registry/client": "npm:^1.53.13"
"@chain-registry/types": "npm:^0.50.13"
"@confio/relayer": "npm:0.7.0"
"@cosmjs/amino": "npm:0.32.4"
"@cosmjs/cosmwasm-stargate": "npm:0.32.4"
Expand All @@ -2307,7 +2276,7 @@ __metadata:
"@types/react": "npm:18.2.0"
"@types/react-dom": "npm:18.2.0"
bignumber.js: "npm:9.1.0"
chain-registry: "npm:1.20.0"
chain-registry: "npm:^1.69.32"
cosmos-kit: "npm:2.18.0"
dayjs: "npm:1.11.10"
eslint: "npm:8.28.0"
Expand Down Expand Up @@ -8050,13 +8019,6 @@ __metadata:
languageName: node
linkType: hard

"bignumber.js@npm:9.1.1":
version: 9.1.1
resolution: "bignumber.js@npm:9.1.1"
checksum: 10c0/950312b15d038ae06028c8a6901fb4efd57fa889ada8c887cebd856e79f2fc9667641bebfb2e2ea4cc694e663fd55c1fe6e62a7e8fe40bbdebdf92269537b802
languageName: node
linkType: hard

"bignumber.js@npm:9.1.2, bignumber.js@npm:^9.1.2":
version: 9.1.2
resolution: "bignumber.js@npm:9.1.2"
Expand Down Expand Up @@ -8439,13 +8401,12 @@ __metadata:
languageName: node
linkType: hard

"chain-registry@npm:1.20.0":
version: 1.20.0
resolution: "chain-registry@npm:1.20.0"
"chain-registry@npm:^1.69.32":
version: 1.69.40
resolution: "chain-registry@npm:1.69.40"
dependencies:
"@babel/runtime": "npm:^7.21.0"
"@chain-registry/types": "npm:^0.17.0"
checksum: 10c0/f2d4b23bc2b8607fc4de05fa34949eaa183a563afb07f718c039c2be151fa6fbd86e9a3c998dc6ca1b7ab9440bfbc1e1218aff51f0e681f9915788269e95a9da
"@chain-registry/types": "npm:^0.50.18"
checksum: 10c0/170ce11574ad1386b90c46fa43d955e8b22ec039bff992cac23d5146e0e99fc42c9d2d2035dbae88b6127888f171bcb60d89f30c626f957e1a1bdc7279020312
languageName: node
linkType: hard

Expand Down
Loading