Skip to content

Commit

Permalink
chore: bump registries and noble cctp modules (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
codingki authored Nov 13, 2024
1 parent 9c456c4 commit ca179fd
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 13,516 deletions.
6 changes: 6 additions & 0 deletions .changeset/olive-boats-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@skip-go/client': patch
'@skip-go/widget': patch
---

update chains and noble cctp modules
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @codingki @NotJeremyLiu @toddkao
* @codingki @NotJeremyLiu @toddkao @ericHgorski
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
"@cosmjs/faucet": "0.32.3",
"@cosmjs/faucet-client": "0.32.3",
"@cosmology/telescope": "1.8.3",
"@initia/initia-registry": "^0.2.1",
"@protobufs/gogoproto": "0.0.10",
"@protobufs/google": "0.0.10",
"@types/keccak": "3.0.4",
"chain-registry": "^1.69.26",
"chain-registry": "^1.69.31",
"minimatch": "^9.0.3",
"proxy-from-env": "^1.1.0",
"vitest": "^1.2.2"
Expand All @@ -50,7 +51,6 @@
"@cosmjs/proto-signing": "0.32.4",
"@cosmjs/stargate": "0.32.4",
"@cosmjs/tendermint-rpc": "0.32.4",
"@initia/initia-registry": "^0.1.16",
"@injectivelabs/core-proto-ts": "0.0.21",
"@injectivelabs/sdk-ts": "1.14.5",
"@keplr-wallet/unit": "^0.12.143",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/scripts/codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ async function codegen() {

// Write all chains to a single JSON file
const outputFilePath = path.resolve(outPath, 'chains.json');
await fs.writeFile(outputFilePath, JSON.stringify(allChains, null, 2), 'utf-8');
await fs.writeFile(outputFilePath, JSON.stringify(allChains), 'utf-8');

}

Expand Down
7 changes: 1 addition & 6 deletions packages/client/src/chains.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Chain } from '@chain-registry/types';
import chainRegistryChains from './codegen/chains.json';
import { chains as initiaRegistry } from '@initia/initia-registry';

const SOLANA_CHAIN = {
chain_name: 'solana',
Expand Down Expand Up @@ -60,10 +59,6 @@ export function chains(): Chain[] {
return [...chainRegistryChains as Chain[], ...newChains];
}

export function initiaChains() {
return initiaRegistry as Chain[];
}

export async function findFirstWorkingEndpoint(
endpoints: string[],
type: 'rpc' | 'rest'
Expand Down Expand Up @@ -101,4 +96,4 @@ export async function findFirstWorkingEndpoint(

console.error('No working endpoints found.');
return null;
}
}
21 changes: 2 additions & 19 deletions packages/client/src/client.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Coin, makeSignDoc as makeSignDocAmino } from '@cosmjs/amino';
import { makeSignDoc as makeSignDocAmino } from '@cosmjs/amino';
import { createWasmAminoConverters } from '@cosmjs/cosmwasm-stargate';
import { fromBase64, toHex } from '@cosmjs/encoding';
import { Int53 } from '@cosmjs/math';
import { Decimal } from '@cosmjs/math';
import { makePubkeyAnyFromAccount } from './proto-signing/pubkey';
import {
EncodeObject,
isOfflineDirectSigner,
makeAuthInfoBytes,
makeSignDoc,
Expand All @@ -24,7 +23,6 @@ import {
SigningStargateClient,
StargateClient,
StdFee,
accountFromAny,
} from '@cosmjs/stargate';
import { BigNumber } from 'bignumber.js';
import { accountParser } from './registry';
Expand All @@ -45,7 +43,7 @@ import { MsgExecute } from './codegen/initia/move/v1/tx';

import { publicActions, WalletClient } from 'viem';

import { chains, findFirstWorkingEndpoint, initiaChains } from './chains';
import { chains, findFirstWorkingEndpoint } from './chains';
import {
circleAminoConverters,
circleProtoRegistry,
Expand Down Expand Up @@ -1355,9 +1353,6 @@ export class SkipClient {

let chain;
chain = chains().find((chain) => chain.chain_id === chainID);
if (!chain) {
chain = initiaChains().find((chain) => chain.chain_id === chainID);
}
if (!chain) {
throw new Error(
`getRpcEndpointForChain: failed to find chain id '${chainID}' in registry`
Expand Down Expand Up @@ -1399,9 +1394,6 @@ export class SkipClient {

let chain;
chain = chains().find((chain) => chain.chain_id === chainID);
if (!chain) {
chain = initiaChains().find((chain) => chain.chain_id === chainID);
}
if (!chain) {
throw new Error(
`getRestEndpointForChain error: failed to find chain id '${chainID}' in registry`
Expand Down Expand Up @@ -1523,9 +1515,6 @@ export class SkipClient {

let chain;
chain = chains().find((chain) => chain.chain_id === chainID);
if (!chain) {
chain = initiaChains().find((chain) => chain.chain_id === chainID);
}
if (!chain) {
return undefined;
}
Expand Down Expand Up @@ -1566,9 +1555,6 @@ export class SkipClient {

let chain;
chain = chains().find((chain) => chain.chain_id === chainID);
if (!chain) {
chain = initiaChains().find((chain) => chain.chain_id === chainID);
}
if (!chain) {
return undefined;
}
Expand Down Expand Up @@ -1613,9 +1599,6 @@ export class SkipClient {
private getStakingTokensForChain(chainID: string) {
let chain;
chain = chains().find((chain) => chain.chain_id === chainID);
if (!chain) {
chain = initiaChains().find((chain) => chain.chain_id === chainID);
}
if (!chain) {
throw new Error(
`getStakingTokensForChain error: failed to find chain id '${chainID}' in registry`
Expand Down
Loading

0 comments on commit ca179fd

Please sign in to comment.