-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from hyperweb-io/anmol/update-boilerplate
feature: upgrade boilerplate to hyperweb
- Loading branch information
Showing
19 changed files
with
8,960 additions
and
1,067 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,10 +31,10 @@ jobs: | |
|
||
- name: Set Up Starship Infrastructure | ||
id: starship-infra | ||
uses: cosmology-tech/[email protected].7 | ||
uses: cosmology-tech/[email protected].9 | ||
with: | ||
config: configs/ci.yaml | ||
cli-version: 2.10.2 | ||
cli-version: 3.3.0 | ||
|
||
- name: Run E2E Tests | ||
run: yarn test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,27 @@ | ||
import path from "path"; | ||
// @ts-nocheck | ||
import path from 'path'; | ||
|
||
import { SigningClient } from "@interchainjs/cosmos/signing-client"; | ||
import { DirectGenericOfflineSigner } from "@interchainjs/cosmos/types/wallet"; | ||
import { Secp256k1HDWallet } from "@interchainjs/cosmos/wallets/secp256k1hd"; | ||
import { | ||
ConfigContext, | ||
generateMnemonic, | ||
useChain, | ||
useRegistry, | ||
} from "starshipjs"; | ||
import { StargateClient } from '@cosmjs/stargate'; | ||
|
||
import { ConfigContext, useChain, useRegistry } from 'starshipjs'; | ||
|
||
beforeAll(async () => { | ||
const configFile = path.join(__dirname, "..", "configs", "local.yaml"); | ||
const configFile = path.join(__dirname, '..', 'configs', 'local.yaml'); | ||
ConfigContext.setConfigFile(configFile); | ||
ConfigContext.setRegistry(await useRegistry(configFile)); | ||
}); | ||
|
||
describe("Test clients", () => { | ||
let client: SigningClient; | ||
describe('Test clients', () => { | ||
let client; | ||
|
||
beforeAll(async () => { | ||
const { getRpcEndpoint, chainInfo } = useChain("hyperweb"); | ||
|
||
const commonPrefix = chainInfo?.chain?.bech32_prefix; | ||
const cosmosHdPath = "m/44'/118'/0'/0/0"; | ||
|
||
const directWallet = Secp256k1HDWallet.fromMnemonic(generateMnemonic(), [ | ||
{ | ||
prefix: commonPrefix, | ||
hdPath: cosmosHdPath, | ||
}, | ||
]); | ||
const directSigner = directWallet.toOfflineDirectSigner(); | ||
|
||
client = await SigningClient.connectWithSigner( | ||
await getRpcEndpoint(), | ||
new DirectGenericOfflineSigner(directSigner), | ||
{ | ||
signerOptions: { | ||
prefix: commonPrefix, | ||
}, | ||
} | ||
); | ||
const { getRpcEndpoint } = useChain('hyperweb'); | ||
client = await StargateClient.connect(await getRpcEndpoint()); | ||
}); | ||
|
||
it("check chain height", async () => { | ||
const { header } = await client.getBlock(1); | ||
it('check chain height', async () => { | ||
const height = await client.getHeight(); | ||
|
||
expect(header.height).toBeGreaterThan(0); | ||
expect(height).toBeGreaterThan(0); | ||
}); | ||
}); |
Oops, something went wrong.