Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Jun 7, 2024
1 parent ee6dc8e commit aa0b9cf
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions packages/osmojs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions packages/osmojs/starship/__tests__/gov.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions packages/osmojs/starship/__tests__/pools.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
3 changes: 1 addition & 2 deletions packages/osmojs/starship/__tests__/staking.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions packages/osmojs/starship/__tests__/token.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions packages/osmojs/starship/configs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ relayers:
- osmosis-1
- cosmos-2

# explorer:
# enabled: true
# ports:
# rest: 8080
explorer:
enabled: true
ports:
rest: 8080

registry:
enabled: true
Expand Down
7 changes: 1 addition & 6 deletions packages/osmojs/starship/src/utils.ts
Original file line number Diff line number Diff line change
@@ -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) => {
Expand Down
36 changes: 22 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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==
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit aa0b9cf

Please sign in to comment.