mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
cosmwasm-stargate: Use cosmjs-types
This commit is contained in:
parent
2f5983c9ea
commit
fc9afd28c1
@ -1,6 +1,14 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { fromBase64, toUtf8 } from "@cosmjs/encoding";
|
||||
import { AminoTypes, coins } from "@cosmjs/stargate";
|
||||
import {
|
||||
MsgClearAdmin,
|
||||
MsgExecuteContract,
|
||||
MsgInstantiateContract,
|
||||
MsgMigrateContract,
|
||||
MsgStoreCode,
|
||||
MsgUpdateAdmin,
|
||||
} from "cosmjs-types/cosmwasm/wasm/v1beta1/tx";
|
||||
import Long from "long";
|
||||
|
||||
import {
|
||||
@ -12,14 +20,6 @@ import {
|
||||
AminoMsgUpdateAdmin,
|
||||
cosmWasmTypes,
|
||||
} from "./aminotypes";
|
||||
import {
|
||||
MsgClearAdmin,
|
||||
MsgExecuteContract,
|
||||
MsgInstantiateContract,
|
||||
MsgMigrateContract,
|
||||
MsgStoreCode,
|
||||
MsgUpdateAdmin,
|
||||
} from "./codec/cosmwasm/wasm/v1beta1/tx";
|
||||
|
||||
describe("AminoTypes", () => {
|
||||
describe("toAmino", () => {
|
||||
|
@ -1,8 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@cosmjs/encoding";
|
||||
import { AminoConverter, Coin } from "@cosmjs/stargate";
|
||||
import Long from "long";
|
||||
|
||||
import {
|
||||
MsgClearAdmin,
|
||||
MsgExecuteContract,
|
||||
@ -10,7 +8,8 @@ import {
|
||||
MsgMigrateContract,
|
||||
MsgStoreCode,
|
||||
MsgUpdateAdmin,
|
||||
} from "./codec/cosmwasm/wasm/v1beta1/tx";
|
||||
} from "cosmjs-types/cosmwasm/wasm/v1beta1/tx";
|
||||
import Long from "long";
|
||||
|
||||
// TODO: implement
|
||||
/**
|
||||
|
@ -17,8 +17,8 @@ import {
|
||||
isBroadcastTxSuccess,
|
||||
isMsgSendEncodeObject,
|
||||
} from "@cosmjs/stargate";
|
||||
import { TxRaw } from "@cosmjs/stargate/build/codec/cosmos/tx/v1beta1/tx";
|
||||
import { assert, sleep } from "@cosmjs/utils";
|
||||
import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
|
||||
import { CosmWasmClient } from "./cosmwasmclient";
|
||||
import {
|
||||
|
@ -12,8 +12,8 @@ import {
|
||||
TxBodyEncodeObject,
|
||||
} from "@cosmjs/proto-signing";
|
||||
import { assertIsBroadcastTxSuccess, coins, logs, MsgSendEncodeObject, StdFee } from "@cosmjs/stargate";
|
||||
import { TxRaw } from "@cosmjs/stargate/build/codec/cosmos/tx/v1beta1/tx";
|
||||
import { assert, sleep } from "@cosmjs/utils";
|
||||
import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
import { ReadonlyDate } from "readonly-date";
|
||||
|
||||
import { CosmWasmClient, PrivateCosmWasmClient } from "./cosmwasmclient";
|
||||
|
@ -30,9 +30,9 @@ import {
|
||||
} from "@cosmjs/stargate";
|
||||
import { Tendermint34Client, toRfc3339WithNanoseconds } from "@cosmjs/tendermint-rpc";
|
||||
import { assert, sleep } from "@cosmjs/utils";
|
||||
import { CodeInfoResponse } from "cosmjs-types/cosmwasm/wasm/v1beta1/query";
|
||||
import { ContractCodeHistoryOperationType } from "cosmjs-types/cosmwasm/wasm/v1beta1/types";
|
||||
|
||||
import { CodeInfoResponse } from "./codec/cosmwasm/wasm/v1beta1/query";
|
||||
import { ContractCodeHistoryOperationType } from "./codec/cosmwasm/wasm/v1beta1/types";
|
||||
import { setupWasmExtension, WasmExtension } from "./queries";
|
||||
|
||||
// Those types can be copied over to allow them to evolve independently of @cosmjs/cosmwasm-launchpad.
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { EncodeObject } from "@cosmjs/proto-signing";
|
||||
|
||||
import {
|
||||
MsgClearAdmin,
|
||||
MsgExecuteContract,
|
||||
@ -7,7 +6,7 @@ import {
|
||||
MsgMigrateContract,
|
||||
MsgStoreCode,
|
||||
MsgUpdateAdmin,
|
||||
} from "./codec/cosmwasm/wasm/v1beta1/tx";
|
||||
} from "cosmjs-types/cosmwasm/wasm/v1beta1/tx";
|
||||
|
||||
export interface MsgStoreCodeEncodeObject extends EncodeObject {
|
||||
readonly typeUrl: "/cosmwasm.wasm.v1beta1.MsgStoreCode";
|
||||
|
@ -13,10 +13,14 @@ import {
|
||||
StdFee,
|
||||
} from "@cosmjs/stargate";
|
||||
import { assert } from "@cosmjs/utils";
|
||||
import {
|
||||
MsgExecuteContract,
|
||||
MsgInstantiateContract,
|
||||
MsgStoreCode,
|
||||
} from "cosmjs-types/cosmwasm/wasm/v1beta1/tx";
|
||||
import { ContractCodeHistoryOperationType } from "cosmjs-types/cosmwasm/wasm/v1beta1/types";
|
||||
import Long from "long";
|
||||
|
||||
import { MsgExecuteContract, MsgInstantiateContract, MsgStoreCode } from "../codec/cosmwasm/wasm/v1beta1/tx";
|
||||
import { ContractCodeHistoryOperationType } from "../codec/cosmwasm/wasm/v1beta1/types";
|
||||
import {
|
||||
MsgExecuteContractEncodeObject,
|
||||
MsgInstantiateContractEncodeObject,
|
||||
|
@ -2,8 +2,6 @@
|
||||
import { JsonObject } from "@cosmjs/cosmwasm-launchpad";
|
||||
import { fromUtf8, toAscii } from "@cosmjs/encoding";
|
||||
import { createPagination, createProtobufRpcClient, QueryClient } from "@cosmjs/stargate";
|
||||
import Long from "long";
|
||||
|
||||
import {
|
||||
QueryAllContractStateResponse,
|
||||
QueryClientImpl,
|
||||
@ -13,7 +11,8 @@ import {
|
||||
QueryContractInfoResponse,
|
||||
QueryContractsByCodeResponse,
|
||||
QueryRawContractStateResponse,
|
||||
} from "../codec/cosmwasm/wasm/v1beta1/query";
|
||||
} from "cosmjs-types/cosmwasm/wasm/v1beta1/query";
|
||||
import Long from "long";
|
||||
|
||||
export interface WasmExtension {
|
||||
readonly wasm: {
|
||||
|
@ -14,16 +14,16 @@ import {
|
||||
MsgDelegateEncodeObject,
|
||||
MsgSendEncodeObject,
|
||||
} from "@cosmjs/stargate";
|
||||
import { DeepPartial, MsgSend } from "@cosmjs/stargate/build/codec/cosmos/bank/v1beta1/tx";
|
||||
import { Coin } from "@cosmjs/stargate/build/codec/cosmos/base/v1beta1/coin";
|
||||
import { MsgDelegate } from "@cosmjs/stargate/build/codec/cosmos/staking/v1beta1/tx";
|
||||
import { AuthInfo, TxBody, TxRaw } from "@cosmjs/stargate/build/codec/cosmos/tx/v1beta1/tx";
|
||||
import { assert, sleep } from "@cosmjs/utils";
|
||||
import { DeepPartial, MsgSend } from "cosmjs-types/cosmos/bank/v1beta1/tx";
|
||||
import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
|
||||
import { MsgDelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx";
|
||||
import { AuthInfo, TxBody, TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
import { MsgStoreCode } from "cosmjs-types/cosmwasm/wasm/v1beta1/tx";
|
||||
import Long from "long";
|
||||
import pako from "pako";
|
||||
import protobuf from "protobufjs/minimal";
|
||||
|
||||
import { MsgStoreCode } from "./codec/cosmwasm/wasm/v1beta1/tx";
|
||||
import { MsgStoreCodeEncodeObject } from "./encodeobjects";
|
||||
import { SigningCosmWasmClient } from "./signingcosmwasmclient";
|
||||
import {
|
||||
|
@ -44,16 +44,12 @@ import {
|
||||
SignerData,
|
||||
StdFee,
|
||||
} from "@cosmjs/stargate";
|
||||
import { MsgWithdrawDelegatorReward } from "@cosmjs/stargate/build/codec/cosmos/distribution/v1beta1/tx";
|
||||
import { MsgDelegate, MsgUndelegate } from "@cosmjs/stargate/build/codec/cosmos/staking/v1beta1/tx";
|
||||
import { SignMode } from "@cosmjs/stargate/build/codec/cosmos/tx/signing/v1beta1/signing";
|
||||
import { TxRaw } from "@cosmjs/stargate/build/codec/cosmos/tx/v1beta1/tx";
|
||||
import { Tendermint34Client } from "@cosmjs/tendermint-rpc";
|
||||
import { assert } from "@cosmjs/utils";
|
||||
import Long from "long";
|
||||
import pako from "pako";
|
||||
|
||||
import { cosmWasmTypes } from "./aminotypes";
|
||||
import { MsgWithdrawDelegatorReward } from "cosmjs-types/cosmos/distribution/v1beta1/tx";
|
||||
import { MsgDelegate, MsgUndelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx";
|
||||
import { SignMode } from "cosmjs-types/cosmos/tx/signing/v1beta1/signing";
|
||||
import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
import {
|
||||
MsgClearAdmin,
|
||||
MsgExecuteContract,
|
||||
@ -61,7 +57,11 @@ import {
|
||||
MsgMigrateContract,
|
||||
MsgStoreCode,
|
||||
MsgUpdateAdmin,
|
||||
} from "./codec/cosmwasm/wasm/v1beta1/tx";
|
||||
} from "cosmjs-types/cosmwasm/wasm/v1beta1/tx";
|
||||
import Long from "long";
|
||||
import pako from "pako";
|
||||
|
||||
import { cosmWasmTypes } from "./aminotypes";
|
||||
import { CosmWasmClient } from "./cosmwasmclient";
|
||||
import {
|
||||
MsgClearAdminEncodeObject,
|
||||
|
@ -16,9 +16,9 @@ import {
|
||||
setupAuthExtension,
|
||||
setupBankExtension,
|
||||
} from "@cosmjs/stargate";
|
||||
import { SignMode } from "@cosmjs/stargate/build/codec/cosmos/tx/signing/v1beta1/signing";
|
||||
import { AuthInfo, SignDoc, TxBody } from "@cosmjs/stargate/build/codec/cosmos/tx/v1beta1/tx";
|
||||
import { Tendermint34Client } from "@cosmjs/tendermint-rpc";
|
||||
import { SignMode } from "cosmjs-types/cosmos/tx/signing/v1beta1/signing";
|
||||
import { AuthInfo, SignDoc, TxBody } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
||||
|
||||
import { setupWasmExtension, WasmExtension } from "./queries";
|
||||
import hackatom from "./testdata/contract.json";
|
||||
|
Loading…
x
Reference in New Issue
Block a user