diff --git a/packages/osmojs/package.json b/packages/osmojs/package.json index be9d8556..2f793dcf 100644 --- a/packages/osmojs/package.json +++ b/packages/osmojs/package.json @@ -46,8 +46,8 @@ "@protobufs/ibc": "^0.1.0", "@protobufs/osmosis": "^0.4.0", "@protobufs/tendermint": "^0.0.10", - "@starship-ci/cli": "^2.0.2", - "starshipjs": "^2.0.2" + "@starship-ci/cli": "^2.1.0", + "starshipjs": "^2.1.0" }, "dependencies": { "@cosmjs/amino": "0.32.3", diff --git a/packages/osmojs/starship/__tests__/gov.test.ts b/packages/osmojs/starship/__tests__/gov.test.ts index 5ea6a7f5..3052750c 100644 --- a/packages/osmojs/starship/__tests__/gov.test.ts +++ b/packages/osmojs/starship/__tests__/gov.test.ts @@ -8,13 +8,13 @@ import { DirectSecp256k1HdWallet } from '@cosmjs/proto-signing'; import { assertIsDeliverTxSuccess } from '@cosmjs/stargate'; import { BigNumber } from 'bignumber.js'; import { useChain } from 'starshipjs'; +import { generateMnemonic } from 'starshipjs'; import { cosmos, getSigningCosmosClient, getSigningOsmosisClient } from '../../src'; -import { generateMnemonic } from '../src'; import { waitUntil } from '../src'; describe('Governance tests for osmosis', () => { @@ -131,8 +131,8 @@ describe('Governance tests for osmosis', () => { }); const contentMsg = cosmos.gov.v1beta1.TextProposal.fromPartial({ - title: 'Test Proposal', - description: 'Test text proposal for the e2e testing' + title: 'My Test Proposal 🚀', + description: 'Test text proposal for the e2e testing 🚀' }); // Stake half of the tokens diff --git a/packages/osmojs/starship/__tests__/pools.test.ts b/packages/osmojs/starship/__tests__/pools.test.ts index 9812ca4e..a6685fcb 100644 --- a/packages/osmojs/starship/__tests__/pools.test.ts +++ b/packages/osmojs/starship/__tests__/pools.test.ts @@ -7,10 +7,9 @@ import { coin } from '@cosmjs/amino'; import { Secp256k1HdWallet } from '@cosmjs/amino'; import { DirectSecp256k1HdWallet } from '@cosmjs/proto-signing'; import { assertIsDeliverTxSuccess, StargateClient } from '@cosmjs/stargate'; -import { useChain } from 'starshipjs'; +import { generateMnemonic, useChain } from 'starshipjs'; import { getSigningOsmosisClient, google, osmosis } from '../../src'; -import { generateMnemonic } from '../src'; import { calcShareOutAmount, transferIbcTokens } from '../src'; describe('Pool testing over IBC tokens', () => { diff --git a/packages/osmojs/starship/__tests__/staking.test.ts b/packages/osmojs/starship/__tests__/staking.test.ts index e45b41f1..3f1da04d 100644 --- a/packages/osmojs/starship/__tests__/staking.test.ts +++ b/packages/osmojs/starship/__tests__/staking.test.ts @@ -4,10 +4,9 @@ import './setup.test'; import { DirectSecp256k1HdWallet } from '@cosmjs/proto-signing'; import { assertIsDeliverTxSuccess } from '@cosmjs/stargate'; import BigNumber from 'bignumber.js'; -import { useChain } from 'starshipjs'; +import { generateMnemonic,useChain } from 'starshipjs'; import { cosmos, getSigningOsmosisClient } from '../../src'; -import { generateMnemonic } from '../src'; describe('Staking tokens testing', () => { let wallet, denom, address; diff --git a/packages/osmojs/starship/__tests__/token.test.ts b/packages/osmojs/starship/__tests__/token.test.ts index 8ad1f107..97045f66 100644 --- a/packages/osmojs/starship/__tests__/token.test.ts +++ b/packages/osmojs/starship/__tests__/token.test.ts @@ -3,10 +3,9 @@ import './setup.test'; import { DirectSecp256k1HdWallet } from '@cosmjs/proto-signing'; import { assertIsDeliverTxSuccess, StargateClient } from '@cosmjs/stargate'; -import { useChain } from 'starshipjs'; +import { generateMnemonic, useChain } from 'starshipjs'; import { getSigningOsmosisClient, ibc } from '../../src'; -import { generateMnemonic } from '../src'; describe('Token transfers', () => { let wallet, denom, address; diff --git a/packages/osmojs/starship/configs/config.yaml b/packages/osmojs/starship/configs/config.yaml index 5fe5aead..17f66dbc 100644 --- a/packages/osmojs/starship/configs/config.yaml +++ b/packages/osmojs/starship/configs/config.yaml @@ -24,10 +24,10 @@ relayers: - osmosis-1 - cosmos-2 -# explorer: -# enabled: true -# ports: -# rest: 8080 +explorer: + enabled: true + ports: + rest: 8080 registry: enabled: true diff --git a/packages/osmojs/starship/src/utils.ts b/packages/osmojs/starship/src/utils.ts index db288c05..3448cbb8 100644 --- a/packages/osmojs/starship/src/utils.ts +++ b/packages/osmojs/starship/src/utils.ts @@ -1,17 +1,12 @@ // @ts-nocheck import { ChainInfo } from "@chain-registry/client"; -import { Bip39, Random } from "@cosmjs/crypto"; import { Coin, DirectSecp256k1HdWallet, OfflineSigner } from '@cosmjs/proto-signing'; import { assertIsDeliverTxSuccess, SigningStargateClient } from '@cosmjs/stargate'; import BigNumber from 'bignumber.js'; -import { ConfigContext, useChain } from 'starshipjs'; +import { ConfigContext, generateMnemonic, useChain } from 'starshipjs'; import { getSigningIbcClient } from '../../src'; -export function generateMnemonic(): string { - return Bip39.encode(Random.getBytes(16)).toString(); -} - export const calcShareOutAmount = (poolInfo, coinsNeeded) => { return poolInfo.poolAssets .map(({ token }, i) => { diff --git a/yarn.lock b/yarn.lock index a7ffd17a..02ac274f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1888,7 +1888,7 @@ write-pkg "4.0.0" yargs "16.2.0" -"@noble/hashes@^1", "@noble/hashes@^1.0.0": +"@noble/hashes@^1", "@noble/hashes@^1.0.0", "@noble/hashes@^1.2.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== @@ -2516,22 +2516,22 @@ dependencies: "@sinonjs/commons" "^3.0.0" -"@starship-ci/cli@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@starship-ci/cli/-/cli-2.0.2.tgz#f7d429855eaf4e8394f8bb93067a79575c79a6fb" - integrity sha512-CfhiHY553k05uvO3ytFpE5WpiJN00SOpBZxEE8EZ4U7byyXTocBiAWzebTb7AeB7v1iaTEACKq9/4/X0dIuELQ== +"@starship-ci/cli@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@starship-ci/cli/-/cli-2.1.0.tgz#4e469edf6dceea42fe9a9ed92e4f35b167438e82" + integrity sha512-rngL4hWQyHwJjnMd1UfsP2IcCKsBJUw7zHf2V1cwq8NRS7g7FRkWSSbyCN1F6LjIEbuP216eI1/qwnNDd56bwQ== dependencies: - "@starship-ci/client" "^2.0.2" + "@starship-ci/client" "^2.1.0" chalk "^4.1.0" deepmerge "^4.3.1" inquirerer "^1.9.0" js-yaml "^4.1.0" minimist "^1.2.8" -"@starship-ci/client@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@starship-ci/client/-/client-2.0.2.tgz#0e432b339b6a2dbb1b6cf20286e99ac8e658ebf7" - integrity sha512-3qiIJqyKyVC7C+EluP5i/fzLOoWgWHlHnu091y9O+2lR/0bOFNJxMtTOTYaREZhdHyQ7gc/6RBZLVm39dIPP6w== +"@starship-ci/client@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@starship-ci/client/-/client-2.1.0.tgz#e316af56a7055c198c71104d9d58df6f02dd80bc" + integrity sha512-n8l+bpSGW86fHKpbmP6JGCJxJ2mDzsF6Dm40YUx9FZW44qrjiFVy4eJ67xL8psQ8e3367mSuduFbvdnNUZvzOQ== dependencies: chalk "^4.1.0" deepmerge "^4.3.1" @@ -3262,6 +3262,13 @@ bin-links@^4.0.1: read-cmd-shim "^4.0.0" write-file-atomic "^5.0.0" +bip39@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.1.0.tgz#c55a418deaf48826a6ceb34ac55b3ee1577e18a3" + integrity sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A== + dependencies: + "@noble/hashes" "^1.2.0" + bl@^4.0.3, bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" @@ -8306,12 +8313,13 @@ stack-utils@^2.0.3: dependencies: escape-string-regexp "^2.0.0" -starshipjs@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/starshipjs/-/starshipjs-2.0.2.tgz#f441ab43b39c3bd2d29ece466375590d341da0be" - integrity sha512-863+4l8Ra6FejYIybkHFltdHIe163fFj3jjx6IKvoFX3E/x2TFrnF7AM9ldbsWQUkPznIAP5QBA0pDDNfW6wJg== +starshipjs@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/starshipjs/-/starshipjs-2.1.0.tgz#6e3462af8d8b3eaadbed37e236c9e00f99f5cfc5" + integrity sha512-z41NLSnBlCZ1yarcwgMFYioJYHiLZ2hMF9qvqmvg0vJ8lyVfWCRYYDYFFtZTcjKsbZgiayW6vP7HLRMqYq1c7g== dependencies: "@chain-registry/client" "1.18.1" + bip39 "^3.1.0" js-yaml "^4.1.0" node-fetch "^2.6.9"