Skip to content

Commit

Permalink
add queryDexParams
Browse files Browse the repository at this point in the history
  • Loading branch information
jcompagni10 committed Jun 13, 2024
1 parent 3c4f6c9 commit 623bddc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/cosmos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ import {
ParamsContractmanagerResponse,
ParamsCronResponse,
ParamsTokenfactoryResponse,
Strategy, TransferParamsResponse,
Strategy,
TransferParamsResponse,
} from './types';
import { DEBUG_SUBMIT_TX, getContractBinary, getHeight } from './env';
import { Message } from '@bufbuild/protobuf';
Expand Down Expand Up @@ -213,12 +214,9 @@ export class CosmosWrapper {
}

async queryTransferParams(): Promise<TransferParamsResponse> {
const req = await axios.get(
`${this.sdk.url}/ibc/apps/transfer/v1/params`,
);
const req = await axios.get(`${this.sdk.url}/ibc/apps/transfer/v1/params`);

return req.data;

}

async queryFeeburnerParams(): Promise<ParamsFeeburnerResponse> {
Expand Down Expand Up @@ -249,6 +247,12 @@ export class CosmosWrapper {
return req.data;
}

async queryDexParams(): Promise<ParamsDexResponse> {
const req = await axios.get(`${this.sdk.url}/neutron/dex/params`);

return req.data;
}

async queryTokenfactoryParams(): Promise<ParamsTokenfactoryResponse> {
const req = await axios.get(
`${this.sdk.url}/osmosis/tokenfactory/v1beta1/params`,
Expand Down
5 changes: 5 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import bech32 from 'bech32';
import {
ParamsContractmanagerInfo,
ParamsCronInfo,
ParamsDexInfo,
ParamsFeeburnerInfo,
ParamsFeerefunderInfo,
ParamsInterchainqueriesInfo,
Expand Down Expand Up @@ -345,6 +346,10 @@ export type ParamsCronResponse = {
params: ParamsCronInfo;
};

export type ParamsDexResponse = {
params: ParamsDexInfo;
};

export type ParamsFeerefunderResponse = {
params: ParamsFeerefunderInfo;
};
Expand Down

0 comments on commit 623bddc

Please sign in to comment.