Skip to content

Commit 9f776cf

Browse files
authored
Upgrade to cosmjs-types 0.11 (#1910)
* Bump cosmjs-types to 0.11 * Adapt codebase to cosmjs-types 0.11 * Bump cosmjs-types to ^0.11.0
1 parent d314927 commit 9f776cf

File tree

10 files changed

+41
-36
lines changed

10 files changed

+41
-36
lines changed

.pnp.cjs

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.yarn/cache/cosmjs-types-npm-0.10.1-89e1d3ec63-f114cd1a06.zip

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:961a3c388e57aae2fed0924c03413156df24c2f89b2478e0fe85957245a9f9c8
3+
size 8216721

packages/cosmwasm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@cosmjs/stargate": "workspace:^",
5050
"@cosmjs/tendermint-rpc": "workspace:^",
5151
"@cosmjs/utils": "workspace:^",
52-
"cosmjs-types": "^0.10.1"
52+
"cosmjs-types": "^0.11.0"
5353
},
5454
"devDependencies": {
5555
"@istanbuljs/nyc-config-typescript": "^1.0.1",

packages/proto-signing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@cosmjs/encoding": "workspace:^",
4747
"@cosmjs/math": "workspace:^",
4848
"@cosmjs/utils": "workspace:^",
49-
"cosmjs-types": "^0.10.1"
49+
"cosmjs-types": "^0.11.0"
5050
},
5151
"devDependencies": {
5252
"@istanbuljs/nyc-config-typescript": "^1.0.1",

packages/proto-signing/src/decode.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ describe("decode", () => {
5858
body: {
5959
memo: "",
6060
timeoutHeight: BigInt(0),
61+
timeoutTimestamp: undefined,
62+
unordered: false,
6163
messages: [expectedMsg],
6264
extensionOptions: [],
6365
nonCriticalExtensionOptions: [],

packages/stargate/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@cosmjs/stream": "workspace:^",
4848
"@cosmjs/tendermint-rpc": "workspace:^",
4949
"@cosmjs/utils": "workspace:^",
50-
"cosmjs-types": "^0.10.1"
50+
"cosmjs-types": "^0.11.0"
5151
},
5252
"devDependencies": {
5353
"@cosmjs/crypto": "workspace:^",

packages/stargate/src/modules/ibc/aminomessages.spec.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { AminoMsgTransfer, createIbcAminoConverters } from "./aminomessages";
77
describe("AminoTypes", () => {
88
describe("toAmino", () => {
99
it("works for MsgTransfer", () => {
10-
const msg: MsgTransfer = {
10+
const msg = MsgTransfer.fromPartial({
1111
sourcePort: "testport",
1212
sourceChannel: "testchannel",
1313
token: coin(1234, "utest"),
@@ -19,7 +19,7 @@ describe("AminoTypes", () => {
1919
},
2020
timeoutTimestamp: BigInt("789"),
2121
memo: "something something",
22-
};
22+
});
2323
const aminoTypes = new AminoTypes(createIbcAminoConverters());
2424
const aminoMsg = aminoTypes.toAmino({
2525
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
@@ -45,7 +45,7 @@ describe("AminoTypes", () => {
4545
});
4646

4747
it("works for MsgTransfer with empty values", () => {
48-
const msg: MsgTransfer = {
48+
const msg = MsgTransfer.fromPartial({
4949
sourcePort: "testport",
5050
sourceChannel: "testchannel",
5151
token: coin(1234, "utest"),
@@ -57,7 +57,7 @@ describe("AminoTypes", () => {
5757
},
5858
timeoutTimestamp: BigInt(0),
5959
memo: "",
60-
};
60+
});
6161
const aminoTypes = new AminoTypes(createIbcAminoConverters());
6262
const aminoMsg = aminoTypes.toAmino({
6363
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
@@ -147,6 +147,7 @@ describe("AminoTypes", () => {
147147
},
148148
timeoutTimestamp: BigInt("789"),
149149
memo: "",
150+
encoding: "",
150151
};
151152
expect(msg).toEqual({
152153
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
@@ -184,6 +185,7 @@ describe("AminoTypes", () => {
184185
},
185186
timeoutTimestamp: BigInt("789"),
186187
memo: "Hack me",
188+
encoding: "",
187189
};
188190
expect(msg).toEqual({
189191
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
@@ -221,6 +223,7 @@ describe("AminoTypes", () => {
221223
},
222224
timeoutTimestamp: BigInt(0),
223225
memo: "",
226+
encoding: "",
224227
};
225228
expect(msg).toEqual({
226229
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",

packages/stargate/src/modules/ibc/queries.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Any } from "cosmjs-types/google/protobuf/any";
22
import {
33
QueryClientImpl as TransferQuery,
4-
QueryDenomTraceResponse,
5-
QueryDenomTracesResponse,
4+
QueryDenomResponse,
5+
QueryDenomsResponse,
66
QueryParamsResponse as QueryTransferParamsResponse,
77
} from "cosmjs-types/ibc/applications/transfer/v1/query";
88
import {
@@ -157,9 +157,9 @@ export interface IbcExtension {
157157
) => Promise<QueryConnectionConsensusStateResponse>;
158158
};
159159
readonly transfer: {
160-
readonly denomTrace: (hash: string) => Promise<QueryDenomTraceResponse>;
161-
readonly denomTraces: (paginationKey?: Uint8Array) => Promise<QueryDenomTracesResponse>;
162-
readonly allDenomTraces: () => Promise<QueryDenomTracesResponse>;
160+
readonly denomTrace: (hash: string) => Promise<QueryDenomResponse>;
161+
readonly denomTraces: (paginationKey?: Uint8Array) => Promise<QueryDenomsResponse>;
162+
readonly allDenomTraces: () => Promise<QueryDenomsResponse>;
163163
readonly params: () => Promise<QueryTransferParamsResponse>;
164164
};
165165
};
@@ -460,24 +460,24 @@ export function setupIbcExtension(base: QueryClient): IbcExtension {
460460
),
461461
},
462462
transfer: {
463-
denomTrace: async (hash: string) => transferQueryService.DenomTrace({ hash: hash }),
463+
denomTrace: async (hash: string) => transferQueryService.Denom({ hash: hash }),
464464
denomTraces: async (paginationKey?: Uint8Array) =>
465-
transferQueryService.DenomTraces({
465+
transferQueryService.Denoms({
466466
pagination: createPagination(paginationKey),
467467
}),
468468
allDenomTraces: async () => {
469469
const denomTraces = [];
470-
let response: QueryDenomTracesResponse;
470+
let response: QueryDenomsResponse;
471471
let key: Uint8Array | undefined;
472472
do {
473-
response = await transferQueryService.DenomTraces({
473+
response = await transferQueryService.Denoms({
474474
pagination: createPagination(key),
475475
});
476-
denomTraces.push(...response.denomTraces);
476+
denomTraces.push(...response.denoms);
477477
key = response.pagination?.nextKey;
478478
} while (key && key.length);
479-
return QueryDenomTracesResponse.fromPartial({
480-
denomTraces: denomTraces,
479+
return QueryDenomsResponse.fromPartial({
480+
denoms: denomTraces,
481481
});
482482
},
483483
params: async () => transferQueryService.Params({}),

yarn.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ __metadata:
243243
"@types/karma-jasmine": "npm:^4"
244244
"@types/karma-jasmine-html-reporter": "npm:^1"
245245
"@types/node": "npm:*"
246-
cosmjs-types: "npm:^0.10.1"
246+
cosmjs-types: "npm:^0.11.0"
247247
glob: "npm:^11"
248248
jasmine: "npm:^4"
249249
jasmine-spec-reporter: "npm:^6"
@@ -499,7 +499,7 @@ __metadata:
499499
"@types/karma-jasmine": "npm:^4"
500500
"@types/karma-jasmine-html-reporter": "npm:^1"
501501
"@types/node": "npm:*"
502-
cosmjs-types: "npm:^0.10.1"
502+
cosmjs-types: "npm:^0.11.0"
503503
glob: "npm:^11"
504504
jasmine: "npm:^4"
505505
jasmine-spec-reporter: "npm:^6"
@@ -571,7 +571,7 @@ __metadata:
571571
"@types/karma-jasmine": "npm:^4"
572572
"@types/karma-jasmine-html-reporter": "npm:^1"
573573
"@types/node": "npm:*"
574-
cosmjs-types: "npm:^0.10.1"
574+
cosmjs-types: "npm:^0.11.0"
575575
glob: "npm:^11"
576576
jasmine: "npm:^4"
577577
jasmine-spec-reporter: "npm:^6"
@@ -2975,10 +2975,10 @@ __metadata:
29752975
languageName: unknown
29762976
linkType: soft
29772977

2978-
"cosmjs-types@npm:^0.10.1":
2979-
version: 0.10.1
2980-
resolution: "cosmjs-types@npm:0.10.1"
2981-
checksum: 10c0/f114cd1a0636034d93b97f61b049c5dc4929c81ff63855c6e56b0335be2b2d35475eee862ea5bd504288b33d3a918952dab11d4b6bed6bc2829f401cb5e6c797
2978+
"cosmjs-types@npm:^0.11.0":
2979+
version: 0.11.0
2980+
resolution: "cosmjs-types@npm:0.11.0"
2981+
checksum: 10c0/35b792ec7758c51efff7b2df9bd5d2c749eae82910349d711704582276c3262a1a9112a45f42070ba96b7e4c4d0869ee0bbd74a7c7f656cf3bf535107280c74f
29822982
languageName: node
29832983
linkType: hard
29842984

0 commit comments

Comments
 (0)