Skip to content

Commit

Permalink
readmed
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Jun 22, 2023
1 parent 47065b3 commit 20f800e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ npm install osmojs
- [Advanced Usage](#advanced-usage)
- [Developing](#developing)
- [Credits](#credits)
- [Related](#related)

## Usage

Expand Down Expand Up @@ -452,11 +453,16 @@ yarn publish

🛠 Built by Cosmology — if you like our tools, please consider delegating to [our validator ⚛️](https://cosmology.tech/validator)

Code built with the help of these related projects:
## Related

Checkout these related projects:

* [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) for generated CosmWasm contract Typescript classes
* [@osmonauts/telescope](https://github.com/osmosis-labs/telescope) a "babel for the Cosmos", Telescope is a TypeScript Transpiler for Cosmos Protobufs.
* [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) for generated CosmWasm contract Typescript classes
* [chain-registry](https://github.com/cosmology-tech/chain-registry) an npm module for the official Cosmos chain-registry.
* [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit) A wallet connector for the Cosmos ⚛️
* [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-app) set up a modern Cosmos app by running one command.
* [starship](https://github.com/cosmology-tech/starship) a k8s-based unified development environment for Cosmos Ecosystem

## Disclaimer

Expand Down
24 changes: 19 additions & 5 deletions packages/osmojs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OsmoJS
# OsmoJS

<p align="center">
<a href="https://github.com/osmosis-labs/osmojs">
Expand Down Expand Up @@ -48,6 +48,7 @@ npm install osmojs
- [Advanced Usage](#advanced-usage)
- [Developing](#developing)
- [Credits](#credits)
- [Related](#related)

## Usage

Expand All @@ -69,7 +70,7 @@ const response = await client.osmosis.gamm.v1beta1.pools();
// currently Pools need to be decoded
response.pools.map(({ typeUrl, value }) => {
console.log(osmosis.gamm.v1beta1.Pool.decode(value));
})
})
```

** Every RPC endpoint is available! Simply use vscode or another tool to visually explore through autocomplete all of the RPC endpoints available on the `RPCQueryClient`!
Expand Down Expand Up @@ -376,7 +377,7 @@ If you want to manually construct a stargate client
import { OfflineSigner, GeneratedType, Registry } from "@cosmjs/proto-signing";
import { AminoTypes, SigningStargateClient } from "@cosmjs/stargate";

import {
import {
cosmosAminoConverters,
cosmosProtoRegistry,
cosmwasmAminoConverters,
Expand Down Expand Up @@ -423,6 +424,12 @@ yarn bootstrap
yarn build
```

And then get all submodules if necessary:

```
git submodule update --init
```

### Codegen

Contract schemas live in `./contracts`, and protos in `./proto`. Look inside of `scripts/codegen.js` and configure the settings for bundling your SDK and contracts into `osmojs`:
Expand All @@ -431,6 +438,8 @@ Contract schemas live in `./contracts`, and protos in `./proto`. Look inside of
yarn codegen
```

Note: please get all sub-modules before generating code, since some proto files within default config are included in sub-modules.

### Publishing

Build the types and then publish:
Expand All @@ -444,11 +453,16 @@ yarn publish

🛠 Built by Cosmology — if you like our tools, please consider delegating to [our validator ⚛️](https://cosmology.tech/validator)

Code built with the help of these related projects:
## Related

Checkout these related projects:

* [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) for generated CosmWasm contract Typescript classes
* [@osmonauts/telescope](https://github.com/osmosis-labs/telescope) a "babel for the Cosmos", Telescope is a TypeScript Transpiler for Cosmos Protobufs.
* [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) for generated CosmWasm contract Typescript classes
* [chain-registry](https://github.com/cosmology-tech/chain-registry) an npm module for the official Cosmos chain-registry.
* [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit) A wallet connector for the Cosmos ⚛️
* [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-app) set up a modern Cosmos app by running one command.
* [starship](https://github.com/cosmology-tech/starship) a k8s-based unified development environment for Cosmos Ecosystem

## Disclaimer

Expand Down
6 changes: 3 additions & 3 deletions packages/osmojs/starship/__tests__/gov.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ describe('Governance tests for osmosis', () => {
expect(result.proposal.proposalId.toString()).toEqual(proposalId);
}, 10000);

it.todo('vote on proposal from genesis address', async () => {
xit('vote on proposal from genesis address', async () => {
// create genesis address signing client
const mnemonic = await getGenesisMnemonic();
const genesisWallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, {
Expand Down Expand Up @@ -153,7 +153,7 @@ describe('Governance tests for osmosis', () => {
assertIsDeliverTxSuccess(result);
}, 10000);

it.todo('verify vote', async () => {
xit('verify vote', async () => {
const { vote } = await queryClient.cosmos.gov.v1beta1.vote({
proposalId: Long.fromString(proposalId),
voter: genesisAddress
Expand All @@ -173,7 +173,7 @@ describe('Governance tests for osmosis', () => {
await expect(waitUntil(proposal.votingEndTime)).resolves.not.toThrow();
}, 200000);

it.todo('verify proposal passed', async () => {
xit('verify proposal passed', async () => {
const { proposal } = await queryClient.cosmos.gov.v1beta1.proposal({
proposalId: Long.fromString(proposalId)
});
Expand Down

0 comments on commit 20f800e

Please sign in to comment.