Skip to content

Commit

Permalink
Merge branch '0.31'
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Oct 25, 2023
2 parents 08200ae + bb0ef98 commit 6a87702
Show file tree
Hide file tree
Showing 19 changed files with 67 additions and 17 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ and this project adheres to
- @cosmjs/tendermint-rpc: `CometClient` should be used instead of
`TendermintClient`.

## [0.31.3] - 2023-10-25

### Fixed

- @cosmjs/stargate: Add missing memo field to `fromAmino` implementation for
`MsgTransfer`. ([#1493])

[#1493]: https://github.com/cosmos/cosmjs/issues/1493

## [0.31.2] - 2023-10-24

### Fixed
Expand Down Expand Up @@ -1325,7 +1334,8 @@ CHANGELOG entries missing. Please see [the diff][0.24.1].
`FeeTable`. @cosmjs/cosmwasm has its own `FeeTable` with those properties.
- @cosmjs/sdk38: Rename package to @cosmjs/launchpad.

[unreleased]: https://github.com/cosmos/cosmjs/compare/v0.31.2...HEAD
[unreleased]: https://github.com/cosmos/cosmjs/compare/v0.31.3...HEAD
[0.31.3]: https://github.com/cosmos/cosmjs/compare/v0.31.2...v0.31.3
[0.31.2]: https://github.com/cosmos/cosmjs/compare/v0.31.1...v0.31.2
[0.31.1]: https://github.com/cosmos/cosmjs/compare/v0.31.0...v0.31.1
[0.31.0]: https://github.com/cosmos/cosmjs/compare/v0.30.1...v0.31.0
Expand Down
2 changes: 1 addition & 1 deletion packages/amino/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/amino",
"version": "0.31.2",
"version": "0.31.3",
"description": "Helpers for Amino based signing.",
"contributors": [
"Simon Warta <webmaster128@users.noreply.github.com>"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/cli",
"version": "0.31.2",
"version": "0.31.3",
"description": "Command line interface",
"contributors": [
"IOV SAS <admin@iov.one>",
Expand Down
2 changes: 1 addition & 1 deletion packages/cosmwasm-stargate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/cosmwasm-stargate",
"version": "0.31.2",
"version": "0.31.3",
"description": "CosmWasm SDK",
"contributors": [
"Will Clark <willclarktech@users.noreply.github.com>"
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/crypto",
"version": "0.31.2",
"version": "0.31.3",
"description": "Cryptography resources for blockchain projects",
"contributors": [
"IOV SAS <admin@iov.one>",
Expand Down
2 changes: 1 addition & 1 deletion packages/encoding/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/encoding",
"version": "0.31.2",
"version": "0.31.3",
"description": "Encoding helpers for blockchain projects",
"contributors": [
"IOV SAS <admin@iov.one>"
Expand Down
2 changes: 1 addition & 1 deletion packages/faucet-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/faucet-client",
"version": "0.31.2",
"version": "0.31.3",
"description": "The faucet client",
"contributors": [
"Will Clark <willclarktech@users.noreply.github.com>"
Expand Down
2 changes: 1 addition & 1 deletion packages/faucet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/faucet",
"version": "0.31.2",
"version": "0.31.3",
"description": "The faucet",
"contributors": [
"Ethan Frey <ethanfrey@users.noreply.github.com>",
Expand Down
2 changes: 1 addition & 1 deletion packages/json-rpc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/json-rpc",
"version": "0.31.2",
"version": "0.31.3",
"description": "Framework for implementing a JSON-RPC 2.0 API",
"contributors": [
"IOV SAS <admin@iov.one>",
Expand Down
2 changes: 1 addition & 1 deletion packages/ledger-amino/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/ledger-amino",
"version": "0.31.2",
"version": "0.31.3",
"description": "A library for signing Amino-encoded transactions using Ledger devices",
"contributors": [
"Will Clark <willclarktech@users.noreply.github.com>"
Expand Down
2 changes: 1 addition & 1 deletion packages/math/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/math",
"version": "0.31.2",
"version": "0.31.3",
"description": "Math helpers for blockchain projects",
"contributors": [
"IOV SAS <admin@iov.one>"
Expand Down
2 changes: 1 addition & 1 deletion packages/proto-signing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/proto-signing",
"version": "0.31.2",
"version": "0.31.3",
"description": "Utilities for protobuf based signing (Cosmos SDK 0.40+)",
"contributors": [
"Will Clark <willclarktech@users.noreply.github.com>",
Expand Down
2 changes: 1 addition & 1 deletion packages/socket/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/socket",
"version": "0.31.2",
"version": "0.31.3",
"description": "Utility functions for working with WebSockets",
"contributors": [
"IOV SAS <admin@iov.one>",
Expand Down
2 changes: 1 addition & 1 deletion packages/stargate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/stargate",
"version": "0.31.2",
"version": "0.31.3",
"description": "Utilities for Cosmos SDK 0.40",
"contributors": [
"Simon Warta <webmaster128@users.noreply.github.com>"
Expand Down
38 changes: 38 additions & 0 deletions packages/stargate/src/modules/ibc/aminomessages.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,43 @@ describe("AminoTypes", () => {
});
});

it("works for MsgTransfer with memo", () => {
const aminoMsg: AminoMsgTransfer = {
type: "cosmos-sdk/MsgTransfer",
value: {
source_port: "testport",
source_channel: "testchannel",
token: coin(1234, "utest"),
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
receiver: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
timeout_height: {
revision_height: "123",
revision_number: "456",
},
timeout_timestamp: "789",
memo: "Hack me",
},
};
const msg = new AminoTypes(createIbcAminoConverters()).fromAmino(aminoMsg);
const expectedValue: MsgTransfer = {
sourcePort: "testport",
sourceChannel: "testchannel",
token: coin(1234, "utest"),
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
receiver: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
timeoutHeight: {
revisionHeight: BigInt("123"),
revisionNumber: BigInt("456"),
},
timeoutTimestamp: BigInt("789"),
memo: "Hack me",
};
expect(msg).toEqual({
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
value: expectedValue,
});
});

it("works for MsgTransfer with default values", () => {
const aminoMsg: AminoMsgTransfer = {
type: "cosmos-sdk/MsgTransfer",
Expand All @@ -169,6 +206,7 @@ describe("AminoTypes", () => {
// revision_number omitted
},
// timeout_timestamp omitted
// memo omitted
},
};
const msg = new AminoTypes(createIbcAminoConverters()).fromAmino(aminoMsg);
Expand Down
2 changes: 2 additions & 0 deletions packages/stargate/src/modules/ibc/aminomessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export function createIbcAminoConverters(): AminoConverters {
receiver,
timeout_height,
timeout_timestamp,
memo,
}: AminoMsgTransfer["value"]): MsgTransfer =>
MsgTransfer.fromPartial({
sourcePort: source_port,
Expand All @@ -111,6 +112,7 @@ export function createIbcAminoConverters(): AminoConverters {
}
: undefined,
timeoutTimestamp: BigInt(timeout_timestamp || "0"),
memo: memo ?? "",
}),
},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/stream/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/stream",
"version": "0.31.2",
"version": "0.31.3",
"description": "Utility functions for producing and consuming streams",
"contributors": [
"IOV SAS <admin@iov.one>",
Expand Down
2 changes: 1 addition & 1 deletion packages/tendermint-rpc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/tendermint-rpc",
"version": "0.31.2",
"version": "0.31.3",
"description": "Tendermint RPC clients",
"contributors": [
"IOV SAS <admin@iov.one>",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmjs/utils",
"version": "0.31.2",
"version": "0.31.3",
"description": "Utility tools, primarily for testing code",
"contributors": [
"IOV SAS <admin@iov.one>"
Expand Down

0 comments on commit 6a87702

Please sign in to comment.