Skip to content

Commit

Permalink
utils
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Apr 26, 2024
1 parent 61cdc67 commit 7871610
Show file tree
Hide file tree
Showing 26 changed files with 21 additions and 932 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ jobs:
- name: osmojs
run: cd ./packages/osmojs && yarn test
- name: math
run: cd ./packages/math && yarn test
run: cd ./packages/math && yarn test
- name: utils
run: cd ./packages/utils && yarn test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ Make sure to create a `fee` object in addition to your message.
For most messages, you can use the predefined fee objects.

```ts
import { FEES } from 'osmojs';
import { FEES } from '@osmonauts/utils';

const fee = FEES.osmosis.swapExactAmountIn();
```
Expand Down
2 changes: 1 addition & 1 deletion packages/osmo-query/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Make sure to create a `fee` object in addition to your message.
For most messages, you can use the predefined fee objects.

```ts
import { FEES } from 'osmojs';
import { FEES } from '@osmonauts/utils';

const fee = FEES.osmosis.swapExactAmountIn();
```
Expand Down
2 changes: 1 addition & 1 deletion packages/osmojs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Make sure to create a `fee` object in addition to your message.
For most messages, you can use the predefined fee objects.

```ts
import { FEES } from 'osmojs';
import { FEES } from '@osmonauts/utils';

const fee = FEES.osmosis.swapExactAmountIn();
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`messages 1`] = `
{
"typeUrl": "/osmosis.gamm.v1beta1.MsgJoinPool",
"value": {
"poolId": "606",
"poolId": 606n,
"sender": "osmo1f4vxvvvvvvvvvv3luuddddddddddcccccccccc",
"shareOutAmount": "101010101",
"tokenInMaxs": [
Expand All @@ -25,7 +25,7 @@ exports[`messages.scoped 1`] = `
{
"typeUrl": "/osmosis.gamm.v1beta1.MsgJoinPool",
"value": {
"poolId": "606",
"poolId": 606n,
"sender": "osmo1f4vxvvvvvvvvvv3luuddddddddddcccccccccc",
"shareOutAmount": "101010101",
"tokenInMaxs": [
Expand Down
4 changes: 2 additions & 2 deletions packages/osmojs/__tests__/unit/aminos.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { coin } from '@cosmjs/amino';

import { osmosis } from '../../src/codegen';
import { AminoConverter } from '../../src/codegen/osmosis/gamm/v1beta1/tx.amino';
import { osmosis } from '../../src';
import { AminoConverter } from '../../src/osmosis/gamm/v1beta1/tx.amino';

it('AminoConverter', async () => {
const msg = AminoConverter['/osmosis.gamm.v1beta1.MsgJoinPool'].toAmino(
Expand Down
8 changes: 4 additions & 4 deletions packages/osmojs/__tests__/unit/encoded.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { coin } from '@cosmjs/amino';
import { MsgJoinPool } from '../../src/codegen/osmosis/gamm/v1beta1/tx';
import { MessageComposer } from '../../src/codegen/osmosis/gamm/v1beta1/tx.registry';
import { osmosis } from '../../src/codegen';
import { MsgJoinPool } from '../../src/osmosis/gamm/v1beta1/tx';
import { MessageComposer } from '../../src/osmosis/gamm/v1beta1/tx.registry';
import { osmosis } from '../../src';

it('encoded', async () => {
const msg = MessageComposer.encoded.joinPool({
Expand All @@ -27,7 +27,7 @@ it('encoded', async () => {
});

it('encoded.scoped', async () => {
const msg = osmosis.gamm.v1beta1.MessageComposer.encoded.joinPool({
const msg = osmosis.gamm.v1beta1.MessageComposer.encoded.joinPool({
poolId: BigInt('606'),
sender: 'osmo1f4vxvvvvvvvvvv3luuddddddddddcccccccccc',
shareOutAmount: '101010101',
Expand Down
4 changes: 2 additions & 2 deletions packages/osmojs/__tests__/unit/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { coin } from '@cosmjs/amino';

import { osmosis } from '../../src/codegen';
import { MsgJoinPool } from '../../src/codegen/osmosis/gamm/v1beta1/tx';
import { osmosis } from '../../src';
import { MsgJoinPool } from '../../src/osmosis/gamm/v1beta1/tx';

it('fromPartial', async () => {
expect(
Expand Down
4 changes: 2 additions & 2 deletions packages/osmojs/__tests__/unit/messages.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { coin } from '@cosmjs/amino';

import { osmosis } from '../../src/codegen';
import { MessageComposer } from '../../src/codegen/osmosis/gamm/v1beta1/tx.registry';
import { osmosis } from '../../src';
import { MessageComposer } from '../../src/osmosis/gamm/v1beta1/tx.registry';

it('messages', async () => {
expect(
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

69 changes: 0 additions & 69 deletions packages/osmojs/__tests__/unit/messages/lock.test.ts

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions packages/osmojs/__tests__/unit/messages/v1beta.test.ts

This file was deleted.

Loading

0 comments on commit 7871610

Please sign in to comment.