Merge branch '0.31'

This commit is contained in:
Simon Warta 2023-10-25 13:02:07 +02:00
commit 6a877027f6
19 changed files with 67 additions and 17 deletions

View File

@ -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
@ -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

View File

@ -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>"

View File

@ -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>",

View File

@ -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>"

View File

@ -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>",

View File

@ -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>"

View File

@ -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>"

View File

@ -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>",

View File

@ -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>",

View File

@ -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>"

View File

@ -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>"

View File

@ -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>",

View File

@ -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>",

View File

@ -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>"

View File

@ -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",
@ -169,6 +206,7 @@ describe("AminoTypes", () => {
// revision_number omitted
},
// timeout_timestamp omitted
// memo omitted
},
};
const msg = new AminoTypes(createIbcAminoConverters()).fromAmino(aminoMsg);

View File

@ -97,6 +97,7 @@ export function createIbcAminoConverters(): AminoConverters {
receiver,
timeout_height,
timeout_timestamp,
memo,
}: AminoMsgTransfer["value"]): MsgTransfer =>
MsgTransfer.fromPartial({
sourcePort: source_port,
@ -111,6 +112,7 @@ export function createIbcAminoConverters(): AminoConverters {
}
: undefined,
timeoutTimestamp: BigInt(timeout_timestamp || "0"),
memo: memo ?? "",
}),
},
};

View File

@ -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>",

View File

@ -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>",

View File

@ -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>"