Merge pull request #701 from cosmos/upgrade-to-wasmd-0.16

Upgrade client to support Comso SDK 0.42 and wasmd 0.16
This commit is contained in:
Simon Warta 2021-03-11 15:38:12 +01:00 committed by GitHub
commit 1a1ebaf83e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 691 additions and 385 deletions

View File

@ -1,5 +1,16 @@
# CHANGELOG
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Changed
- @cosmjs/cosmwasm-stargate: Codec adapted to support wasmd 0.16. Older versions
of wasmd are not supported anymore.
## [0.24.0] - 2021-03-11
- @cosmjs/cosmwasm: This package is now deprecated. The same functionality is
@ -242,4 +253,5 @@
`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.24.0...HEAD
[0.24.0]: https://github.com/cosmos/cosmjs/compare/v0.23.0...v0.24.0

View File

@ -37,7 +37,7 @@
"coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet",
"pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js",
"preget-proto": "shx rm -rf proto",
"get-proto": "WASM_REF=v0.14.0 COSMOS_REF=v0.40.0 ./scripts/get-proto.sh",
"get-proto": "WASM_REF=v0.16.0-alpha1 COSMOS_SDK_REF=v0.42.0 ./scripts/get-proto.sh",
"define-proto": "./scripts/define-proto.sh",
"postdefine-proto": "prettier --write \"src/codec/**/*.ts\""
},

View File

@ -7,8 +7,8 @@ PROTO_DIR="./proto"
COSMOS_DIR="$PROTO_DIR/cosmos"
COSMOS_SDK_DIR="$COSMOS_DIR/cosmos-sdk"
COSMOS_SDK_ZIP_FILE="$COSMOS_DIR/tmp.zip"
COSMOS_REF=${COSMOS_REF:-"master"}
COSMOS_SUFFIX=${COSMOS_REF}
COSMOS_SDK_REF=${COSMOS_SDK_REF:-"master"}
COSMOS_SUFFIX=${COSMOS_SDK_REF}
[[ $COSMOS_SUFFIX =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.+)?$ ]] && COSMOS_SUFFIX=${COSMOS_SUFFIX#v}
COSMWASM_DIR="$PROTO_DIR/cosmwasm"
@ -19,7 +19,7 @@ WASM_SUFFIX=${WASM_REF}
[[ $WASM_SUFFIX =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.+)?$ ]] && WASM_SUFFIX=${WASM_SUFFIX#v}
mkdir -p "$COSMOS_DIR"
wget -qO "$COSMOS_SDK_ZIP_FILE" "https://github.com/cosmos/cosmos-sdk/archive/$COSMOS_REF.zip"
wget -qO "$COSMOS_SDK_ZIP_FILE" "https://github.com/cosmos/cosmos-sdk/archive/$COSMOS_SDK_REF.zip"
unzip "$COSMOS_SDK_ZIP_FILE" "*.proto" -d "$COSMOS_DIR"
mv "$COSMOS_SDK_DIR-$COSMOS_SUFFIX" "$COSMOS_SDK_DIR"
rm "$COSMOS_SDK_ZIP_FILE"

View File

@ -1,18 +1,18 @@
/* eslint-disable @typescript-eslint/naming-convention */
import {
MsgClearAdmin as LaunchpadMsgClearAdmin,
MsgExecuteContract as LaunchpadMsgExecuteContract,
MsgInstantiateContract as LaunchpadMsgInstantiateContract,
MsgMigrateContract as LaunchpadMsgMigrateContract,
MsgStoreCode as LaunchpadMsgStoreCode,
MsgUpdateAdmin as LaunchpadMsgUpdateAdmin,
} from "@cosmjs/cosmwasm-launchpad";
import { fromBase64, toUtf8 } from "@cosmjs/encoding";
import { coins } from "@cosmjs/launchpad";
import { AminoTypes } from "@cosmjs/stargate";
import Long from "long";
import { cosmWasmTypes } from "./aminotypes";
import {
AminoMsgClearAdmin,
AminoMsgExecuteContract,
AminoMsgInstantiateContract,
AminoMsgMigrateContract,
AminoMsgStoreCode,
AminoMsgUpdateAdmin,
cosmWasmTypes,
} from "./aminotypes";
import {
MsgClearAdmin,
MsgExecuteContract,
@ -36,7 +36,7 @@ describe("AminoTypes", () => {
typeUrl: "/cosmwasm.wasm.v1beta1.MsgStoreCode",
value: msg,
});
const expected: LaunchpadMsgStoreCode = {
const expected: AminoMsgStoreCode = {
type: "wasm/MsgStoreCode",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
@ -58,14 +58,14 @@ describe("AminoTypes", () => {
foo: "bar",
}),
),
initFunds: coins(1234, "ucosm"),
funds: coins(1234, "ucosm"),
admin: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
};
const aminoMsg = new AminoTypes({ additions: cosmWasmTypes }).toAmino({
typeUrl: "/cosmwasm.wasm.v1beta1.MsgInstantiateContract",
value: msg,
});
const expected: LaunchpadMsgInstantiateContract = {
const expected: AminoMsgInstantiateContract = {
type: "wasm/MsgInstantiateContract",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
@ -74,7 +74,7 @@ describe("AminoTypes", () => {
init_msg: {
foo: "bar",
},
init_funds: coins(1234, "ucosm"),
funds: coins(1234, "ucosm"),
admin: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
},
};
@ -91,7 +91,7 @@ describe("AminoTypes", () => {
typeUrl: "/cosmwasm.wasm.v1beta1.MsgUpdateAdmin",
value: msg,
});
const expected: LaunchpadMsgUpdateAdmin = {
const expected: AminoMsgUpdateAdmin = {
type: "wasm/MsgUpdateAdmin",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
@ -111,7 +111,7 @@ describe("AminoTypes", () => {
typeUrl: "/cosmwasm.wasm.v1beta1.MsgClearAdmin",
value: msg,
});
const expected: LaunchpadMsgClearAdmin = {
const expected: AminoMsgClearAdmin = {
type: "wasm/MsgClearAdmin",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
@ -130,13 +130,13 @@ describe("AminoTypes", () => {
foo: "bar",
}),
),
sentFunds: coins(1234, "ucosm"),
funds: coins(1234, "ucosm"),
};
const aminoMsg = new AminoTypes({ additions: cosmWasmTypes }).toAmino({
typeUrl: "/cosmwasm.wasm.v1beta1.MsgExecuteContract",
value: msg,
});
const expected: LaunchpadMsgExecuteContract = {
const expected: AminoMsgExecuteContract = {
type: "wasm/MsgExecuteContract",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
@ -144,7 +144,7 @@ describe("AminoTypes", () => {
msg: {
foo: "bar",
},
sent_funds: coins(1234, "ucosm"),
funds: coins(1234, "ucosm"),
},
};
expect(aminoMsg).toEqual(expected);
@ -165,7 +165,7 @@ describe("AminoTypes", () => {
typeUrl: "/cosmwasm.wasm.v1beta1.MsgMigrateContract",
value: msg,
});
const expected: LaunchpadMsgMigrateContract = {
const expected: AminoMsgMigrateContract = {
type: "wasm/MsgMigrateContract",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
@ -182,7 +182,7 @@ describe("AminoTypes", () => {
describe("fromAmino", () => {
it("works for MsgStoreCode", () => {
const aminoMsg: LaunchpadMsgStoreCode = {
const aminoMsg: AminoMsgStoreCode = {
type: "wasm/MsgStoreCode",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
@ -206,7 +206,7 @@ describe("AminoTypes", () => {
});
it("works for MsgInstantiateContract", () => {
const aminoMsg: LaunchpadMsgInstantiateContract = {
const aminoMsg: AminoMsgInstantiateContract = {
type: "wasm/MsgInstantiateContract",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
@ -215,7 +215,7 @@ describe("AminoTypes", () => {
init_msg: {
foo: "bar",
},
init_funds: coins(1234, "ucosm"),
funds: coins(1234, "ucosm"),
admin: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
},
};
@ -229,7 +229,7 @@ describe("AminoTypes", () => {
foo: "bar",
}),
),
initFunds: coins(1234, "ucosm"),
funds: coins(1234, "ucosm"),
admin: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
};
expect(msg).toEqual({
@ -239,7 +239,7 @@ describe("AminoTypes", () => {
});
it("works for MsgUpdateAdmin", () => {
const aminoMsg: LaunchpadMsgUpdateAdmin = {
const aminoMsg: AminoMsgUpdateAdmin = {
type: "wasm/MsgUpdateAdmin",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
@ -260,7 +260,7 @@ describe("AminoTypes", () => {
});
it("works for MsgClearAdmin", () => {
const aminoMsg: LaunchpadMsgClearAdmin = {
const aminoMsg: AminoMsgClearAdmin = {
type: "wasm/MsgClearAdmin",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
@ -279,7 +279,7 @@ describe("AminoTypes", () => {
});
it("works for MsgExecuteContract", () => {
const aminoMsg: LaunchpadMsgExecuteContract = {
const aminoMsg: AminoMsgExecuteContract = {
type: "wasm/MsgExecuteContract",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
@ -287,7 +287,7 @@ describe("AminoTypes", () => {
msg: {
foo: "bar",
},
sent_funds: coins(1234, "ucosm"),
funds: coins(1234, "ucosm"),
},
};
const msg = new AminoTypes({ additions: cosmWasmTypes }).fromAmino(aminoMsg);
@ -299,7 +299,7 @@ describe("AminoTypes", () => {
foo: "bar",
}),
),
sentFunds: coins(1234, "ucosm"),
funds: coins(1234, "ucosm"),
};
expect(msg).toEqual({
typeUrl: "/cosmwasm.wasm.v1beta1.MsgExecuteContract",
@ -308,7 +308,7 @@ describe("AminoTypes", () => {
});
it("works for MsgMigrateContract", () => {
const aminoMsg: LaunchpadMsgMigrateContract = {
const aminoMsg: AminoMsgMigrateContract = {
type: "wasm/MsgMigrateContract",
value: {
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",

View File

@ -1,13 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */
import {
MsgClearAdmin as LaunchpadMsgClearAdmin,
MsgExecuteContract as LaunchpadMsgExecuteContract,
MsgInstantiateContract as LaunchpadMsgInstantiateContract,
MsgMigrateContract as LaunchpadMsgMigrateContract,
MsgStoreCode as LaunchpadMsgStoreCode,
MsgUpdateAdmin as LaunchpadMsgUpdateAdmin,
} from "@cosmjs/cosmwasm-launchpad";
import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@cosmjs/encoding";
import { Coin } from "@cosmjs/launchpad";
import { AminoConverter, coinFromProto } from "@cosmjs/stargate";
import { assertDefinedAndNotNull } from "@cosmjs/utils";
import Long from "long";
@ -21,10 +14,121 @@ import {
MsgUpdateAdmin,
} from "./codec/x/wasm/internal/types/tx";
// TODO: implement
/**
* @see https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/types.proto#L30-L35
*/
type AccessConfig = never;
/**
* The Amino JSON representation of
* https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L28-L40
*/
export interface AminoMsgStoreCode {
type: "wasm/MsgStoreCode";
value: {
/** Bech32 account address */
readonly sender: string;
/** Base64 encoded Wasm */
readonly wasm_byte_code: string;
/** A valid URI reference to the contract's source code. Can be empty. */
readonly source: string;
/** A docker tag. Can be empty. */
readonly builder: string;
readonly instantiate_permission?: AccessConfig;
};
}
/**
* The Amino JSON representation of
* https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L70-L80
*/
export interface AminoMsgExecuteContract {
type: "wasm/MsgExecuteContract";
value: {
/** Bech32 account address */
readonly sender: string;
/** Bech32 account address */
readonly contract: string;
/** Handle message as JavaScript object */
readonly msg: any;
readonly funds: readonly Coin[];
};
}
/**
* The Amino JSON representation of
* https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61
*/
export interface AminoMsgInstantiateContract {
type: "wasm/MsgInstantiateContract";
value: {
/** Bech32 account address */
readonly sender: string;
/** ID of the Wasm code that was uploaded before */
readonly code_id: string;
/** Human-readable label for this contract */
readonly label: string;
/** Init message as JavaScript object */
readonly init_msg: any;
readonly funds: readonly Coin[];
/** Bech32-encoded admin address */
readonly admin?: string;
};
}
/**
* The Amino JSON representation of
* https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L88-L98
*/
export interface AminoMsgMigrateContract {
type: "wasm/MsgMigrateContract";
value: {
/** Bech32 account address */
readonly sender: string;
/** Bech32 account address */
readonly contract: string;
/** The new code */
readonly code_id: string;
/** Migrate message as JavaScript object */
readonly msg: any;
};
}
/**
* The Amino JSON representation of
* https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L107-L115
*/
export interface AminoMsgUpdateAdmin {
type: "wasm/MsgUpdateAdmin";
value: {
/** Bech32-encoded sender address. This must be the old admin. */
readonly sender: string;
/** Bech32-encoded contract address to be updated */
readonly contract: string;
/** Bech32-encoded address of the new admin */
readonly new_admin: string;
};
}
/**
* The Amino JSON representation of
* https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L120-L126
*/
export interface AminoMsgClearAdmin {
type: "wasm/MsgClearAdmin";
value: {
/** Bech32-encoded sender address. This must be the old admin. */
readonly sender: string;
/** Bech32-encoded contract address to be updated */
readonly contract: string;
};
}
export const cosmWasmTypes: Record<string, AminoConverter> = {
"/cosmwasm.wasm.v1beta1.MsgStoreCode": {
aminoType: "wasm/MsgStoreCode",
toAmino: ({ sender, wasmByteCode, source, builder }: MsgStoreCode): LaunchpadMsgStoreCode["value"] => {
toAmino: ({ sender, wasmByteCode, source, builder }: MsgStoreCode): AminoMsgStoreCode["value"] => {
assertDefinedAndNotNull(sender, "missing sender");
assertDefinedAndNotNull(wasmByteCode, "missing wasmByteCode");
assertDefinedAndNotNull(source, "missing source");
@ -36,12 +140,7 @@ export const cosmWasmTypes: Record<string, AminoConverter> = {
builder: builder,
};
},
fromAmino: ({
sender,
wasm_byte_code,
source,
builder,
}: LaunchpadMsgStoreCode["value"]): MsgStoreCode => ({
fromAmino: ({ sender, wasm_byte_code, source, builder }: AminoMsgStoreCode["value"]): MsgStoreCode => ({
sender: sender,
wasmByteCode: fromBase64(wasm_byte_code),
source: source,
@ -56,20 +155,20 @@ export const cosmWasmTypes: Record<string, AminoConverter> = {
codeId,
label,
initMsg,
initFunds,
funds,
admin,
}: MsgInstantiateContract): LaunchpadMsgInstantiateContract["value"] => {
}: MsgInstantiateContract): AminoMsgInstantiateContract["value"] => {
assertDefinedAndNotNull(sender, "missing sender");
assertDefinedAndNotNull(codeId, "missing codeId");
assertDefinedAndNotNull(label, "missing label");
assertDefinedAndNotNull(initMsg, "missing initMsg");
assertDefinedAndNotNull(initFunds, "missing initFunds");
assertDefinedAndNotNull(funds, "missing funds");
return {
sender: sender,
code_id: codeId.toString(),
label: label,
init_msg: JSON.parse(fromUtf8(initMsg)),
init_funds: initFunds.map(coinFromProto),
funds: funds.map(coinFromProto),
admin: admin ?? undefined,
};
},
@ -78,20 +177,20 @@ export const cosmWasmTypes: Record<string, AminoConverter> = {
code_id,
label,
init_msg,
init_funds,
funds,
admin,
}: LaunchpadMsgInstantiateContract["value"]): MsgInstantiateContract => ({
}: AminoMsgInstantiateContract["value"]): MsgInstantiateContract => ({
sender: sender,
codeId: Long.fromString(code_id),
label: label,
initMsg: toUtf8(JSON.stringify(init_msg)),
initFunds: [...init_funds],
funds: [...funds],
admin: admin ?? "",
}),
},
"/cosmwasm.wasm.v1beta1.MsgUpdateAdmin": {
aminoType: "wasm/MsgUpdateAdmin",
toAmino: ({ sender, newAdmin, contract }: MsgUpdateAdmin): LaunchpadMsgUpdateAdmin["value"] => {
toAmino: ({ sender, newAdmin, contract }: MsgUpdateAdmin): AminoMsgUpdateAdmin["value"] => {
assertDefinedAndNotNull(sender, "missing sender");
assertDefinedAndNotNull(newAdmin, "missing newAdmin");
assertDefinedAndNotNull(contract, "missing contract");
@ -101,7 +200,7 @@ export const cosmWasmTypes: Record<string, AminoConverter> = {
contract: contract,
};
},
fromAmino: ({ sender, new_admin, contract }: LaunchpadMsgUpdateAdmin["value"]): MsgUpdateAdmin => ({
fromAmino: ({ sender, new_admin, contract }: AminoMsgUpdateAdmin["value"]): MsgUpdateAdmin => ({
sender: sender,
newAdmin: new_admin,
contract: contract,
@ -109,7 +208,7 @@ export const cosmWasmTypes: Record<string, AminoConverter> = {
},
"/cosmwasm.wasm.v1beta1.MsgClearAdmin": {
aminoType: "wasm/MsgClearAdmin",
toAmino: ({ sender, contract }: MsgClearAdmin): LaunchpadMsgClearAdmin["value"] => {
toAmino: ({ sender, contract }: MsgClearAdmin): AminoMsgClearAdmin["value"] => {
assertDefinedAndNotNull(sender, "missing sender");
assertDefinedAndNotNull(contract, "missing contract");
return {
@ -117,40 +216,30 @@ export const cosmWasmTypes: Record<string, AminoConverter> = {
contract: contract,
};
},
fromAmino: ({ sender, contract }: LaunchpadMsgClearAdmin["value"]): MsgClearAdmin => ({
fromAmino: ({ sender, contract }: AminoMsgClearAdmin["value"]): MsgClearAdmin => ({
sender: sender,
contract: contract,
}),
},
"/cosmwasm.wasm.v1beta1.MsgExecuteContract": {
aminoType: "wasm/MsgExecuteContract",
toAmino: ({
sender,
contract,
msg,
sentFunds,
}: MsgExecuteContract): LaunchpadMsgExecuteContract["value"] => {
toAmino: ({ sender, contract, msg, funds }: MsgExecuteContract): AminoMsgExecuteContract["value"] => {
assertDefinedAndNotNull(sender, "missing sender");
assertDefinedAndNotNull(contract, "missing contract");
assertDefinedAndNotNull(msg, "missing msg");
assertDefinedAndNotNull(sentFunds, "missing sentFunds");
assertDefinedAndNotNull(funds, "missing funds");
return {
sender: sender,
contract: contract,
msg: JSON.parse(fromUtf8(msg)),
sent_funds: sentFunds.map(coinFromProto),
funds: funds.map(coinFromProto),
};
},
fromAmino: ({
sender,
contract,
msg,
sent_funds,
}: LaunchpadMsgExecuteContract["value"]): MsgExecuteContract => ({
fromAmino: ({ sender, contract, msg, funds }: AminoMsgExecuteContract["value"]): MsgExecuteContract => ({
sender: sender,
contract: contract,
msg: toUtf8(JSON.stringify(msg)),
sentFunds: [...sent_funds],
funds: [...funds],
}),
},
"/cosmwasm.wasm.v1beta1.MsgMigrateContract": {
@ -160,7 +249,7 @@ export const cosmWasmTypes: Record<string, AminoConverter> = {
contract,
codeId,
migrateMsg,
}: MsgMigrateContract): LaunchpadMsgMigrateContract["value"] => {
}: MsgMigrateContract): AminoMsgMigrateContract["value"] => {
assertDefinedAndNotNull(sender, "missing sender");
assertDefinedAndNotNull(contract, "missing contract");
assertDefinedAndNotNull(codeId, "missing codeId");
@ -177,7 +266,7 @@ export const cosmWasmTypes: Record<string, AminoConverter> = {
contract,
code_id,
msg,
}: LaunchpadMsgMigrateContract["value"]): MsgMigrateContract => ({
}: AminoMsgMigrateContract["value"]): MsgMigrateContract => ({
sender: sender,
contract: contract,
codeId: Long.fromString(code_id),

View File

@ -38,14 +38,16 @@ export interface MsgInstantiateContract {
label: string;
/** InitMsg json encoded message to be passed to the contract on instantiation */
initMsg: Uint8Array;
/** InitFunds coins that are transferred to the contract on instantiation */
initFunds: Coin[];
/** Funds coins that are transferred to the contract on instantiation */
funds: Coin[];
}
/** MsgInstantiateContractResponse return instantiation result data */
export interface MsgInstantiateContractResponse {
/** Address is the bech32 address of the new contract instance. */
address: string;
/** Data contains base64-encoded bytes to returned from the contract */
data: Uint8Array;
}
/** MsgExecuteContract submits the given message data to a smart contract */
@ -56,8 +58,8 @@ export interface MsgExecuteContract {
contract: string;
/** Msg json encoded message to be passed to the contract */
msg: Uint8Array;
/** SentFunds coins that are transferred to the contract on execution */
sentFunds: Coin[];
/** Funds coins that are transferred to the contract on execution */
funds: Coin[];
}
/** MsgExecuteContractResponse returns execution result data. */
@ -312,7 +314,7 @@ export const MsgInstantiateContract = {
if (message.initMsg.length !== 0) {
writer.uint32(42).bytes(message.initMsg);
}
for (const v of message.initFunds) {
for (const v of message.funds) {
Coin.encode(v!, writer.uint32(50).fork()).ldelim();
}
return writer;
@ -322,7 +324,7 @@ export const MsgInstantiateContract = {
const reader = input instanceof Uint8Array ? new _m0.Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseMsgInstantiateContract } as MsgInstantiateContract;
message.initFunds = [];
message.funds = [];
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@ -342,7 +344,7 @@ export const MsgInstantiateContract = {
message.initMsg = reader.bytes();
break;
case 6:
message.initFunds.push(Coin.decode(reader, reader.uint32()));
message.funds.push(Coin.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
@ -354,7 +356,7 @@ export const MsgInstantiateContract = {
fromJSON(object: any): MsgInstantiateContract {
const message = { ...baseMsgInstantiateContract } as MsgInstantiateContract;
message.initFunds = [];
message.funds = [];
if (object.sender !== undefined && object.sender !== null) {
message.sender = String(object.sender);
} else {
@ -378,9 +380,9 @@ export const MsgInstantiateContract = {
if (object.initMsg !== undefined && object.initMsg !== null) {
message.initMsg = bytesFromBase64(object.initMsg);
}
if (object.initFunds !== undefined && object.initFunds !== null) {
for (const e of object.initFunds) {
message.initFunds.push(Coin.fromJSON(e));
if (object.funds !== undefined && object.funds !== null) {
for (const e of object.funds) {
message.funds.push(Coin.fromJSON(e));
}
}
return message;
@ -394,17 +396,17 @@ export const MsgInstantiateContract = {
message.label !== undefined && (obj.label = message.label);
message.initMsg !== undefined &&
(obj.initMsg = base64FromBytes(message.initMsg !== undefined ? message.initMsg : new Uint8Array()));
if (message.initFunds) {
obj.initFunds = message.initFunds.map((e) => (e ? Coin.toJSON(e) : undefined));
if (message.funds) {
obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined));
} else {
obj.initFunds = [];
obj.funds = [];
}
return obj;
},
fromPartial(object: DeepPartial<MsgInstantiateContract>): MsgInstantiateContract {
const message = { ...baseMsgInstantiateContract } as MsgInstantiateContract;
message.initFunds = [];
message.funds = [];
if (object.sender !== undefined && object.sender !== null) {
message.sender = object.sender;
} else {
@ -430,9 +432,9 @@ export const MsgInstantiateContract = {
} else {
message.initMsg = new Uint8Array();
}
if (object.initFunds !== undefined && object.initFunds !== null) {
for (const e of object.initFunds) {
message.initFunds.push(Coin.fromPartial(e));
if (object.funds !== undefined && object.funds !== null) {
for (const e of object.funds) {
message.funds.push(Coin.fromPartial(e));
}
}
return message;
@ -446,6 +448,9 @@ export const MsgInstantiateContractResponse = {
if (message.address !== "") {
writer.uint32(10).string(message.address);
}
if (message.data.length !== 0) {
writer.uint32(18).bytes(message.data);
}
return writer;
},
@ -459,6 +464,9 @@ export const MsgInstantiateContractResponse = {
case 1:
message.address = reader.string();
break;
case 2:
message.data = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
@ -474,12 +482,17 @@ export const MsgInstantiateContractResponse = {
} else {
message.address = "";
}
if (object.data !== undefined && object.data !== null) {
message.data = bytesFromBase64(object.data);
}
return message;
},
toJSON(message: MsgInstantiateContractResponse): unknown {
const obj: any = {};
message.address !== undefined && (obj.address = message.address);
message.data !== undefined &&
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
return obj;
},
@ -490,6 +503,11 @@ export const MsgInstantiateContractResponse = {
} else {
message.address = "";
}
if (object.data !== undefined && object.data !== null) {
message.data = object.data;
} else {
message.data = new Uint8Array();
}
return message;
},
};
@ -507,7 +525,7 @@ export const MsgExecuteContract = {
if (message.msg.length !== 0) {
writer.uint32(26).bytes(message.msg);
}
for (const v of message.sentFunds) {
for (const v of message.funds) {
Coin.encode(v!, writer.uint32(42).fork()).ldelim();
}
return writer;
@ -517,7 +535,7 @@ export const MsgExecuteContract = {
const reader = input instanceof Uint8Array ? new _m0.Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseMsgExecuteContract } as MsgExecuteContract;
message.sentFunds = [];
message.funds = [];
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@ -531,7 +549,7 @@ export const MsgExecuteContract = {
message.msg = reader.bytes();
break;
case 5:
message.sentFunds.push(Coin.decode(reader, reader.uint32()));
message.funds.push(Coin.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
@ -543,7 +561,7 @@ export const MsgExecuteContract = {
fromJSON(object: any): MsgExecuteContract {
const message = { ...baseMsgExecuteContract } as MsgExecuteContract;
message.sentFunds = [];
message.funds = [];
if (object.sender !== undefined && object.sender !== null) {
message.sender = String(object.sender);
} else {
@ -557,9 +575,9 @@ export const MsgExecuteContract = {
if (object.msg !== undefined && object.msg !== null) {
message.msg = bytesFromBase64(object.msg);
}
if (object.sentFunds !== undefined && object.sentFunds !== null) {
for (const e of object.sentFunds) {
message.sentFunds.push(Coin.fromJSON(e));
if (object.funds !== undefined && object.funds !== null) {
for (const e of object.funds) {
message.funds.push(Coin.fromJSON(e));
}
}
return message;
@ -571,17 +589,17 @@ export const MsgExecuteContract = {
message.contract !== undefined && (obj.contract = message.contract);
message.msg !== undefined &&
(obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array()));
if (message.sentFunds) {
obj.sentFunds = message.sentFunds.map((e) => (e ? Coin.toJSON(e) : undefined));
if (message.funds) {
obj.funds = message.funds.map((e) => (e ? Coin.toJSON(e) : undefined));
} else {
obj.sentFunds = [];
obj.funds = [];
}
return obj;
},
fromPartial(object: DeepPartial<MsgExecuteContract>): MsgExecuteContract {
const message = { ...baseMsgExecuteContract } as MsgExecuteContract;
message.sentFunds = [];
message.funds = [];
if (object.sender !== undefined && object.sender !== null) {
message.sender = object.sender;
} else {
@ -597,9 +615,9 @@ export const MsgExecuteContract = {
} else {
message.msg = new Uint8Array();
}
if (object.sentFunds !== undefined && object.sentFunds !== null) {
for (const e of object.sentFunds) {
message.sentFunds.push(Coin.fromPartial(e));
if (object.funds !== undefined && object.funds !== null) {
for (const e of object.funds) {
message.funds.push(Coin.fromPartial(e));
}
}
return message;

View File

@ -122,7 +122,7 @@ export interface Params {
/** CodeInfo is data for the uploaded contract WASM code */
export interface CodeInfo {
/** CodeHash is the unique CodeID */
/** CodeHash is the unique identifier created by wasmvm */
codeHash: Uint8Array;
/** Creator address who initially stored the code */
creator: string;
@ -149,6 +149,7 @@ export interface ContractInfo {
* This data should kept internal and not be exposed via query results. Just use for sorting
*/
created?: AbsoluteTxPosition;
ibcPortId: string;
}
/** ContractCodeHistoryEntry metadata to a contract. */
@ -523,7 +524,7 @@ export const CodeInfo = {
},
};
const baseContractInfo: object = { codeId: Long.UZERO, creator: "", admin: "", label: "" };
const baseContractInfo: object = { codeId: Long.UZERO, creator: "", admin: "", label: "", ibcPortId: "" };
export const ContractInfo = {
encode(message: ContractInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
@ -542,6 +543,9 @@ export const ContractInfo = {
if (message.created !== undefined) {
AbsoluteTxPosition.encode(message.created, writer.uint32(42).fork()).ldelim();
}
if (message.ibcPortId !== "") {
writer.uint32(50).string(message.ibcPortId);
}
return writer;
},
@ -567,6 +571,9 @@ export const ContractInfo = {
case 5:
message.created = AbsoluteTxPosition.decode(reader, reader.uint32());
break;
case 6:
message.ibcPortId = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
@ -602,6 +609,11 @@ export const ContractInfo = {
} else {
message.created = undefined;
}
if (object.ibcPortId !== undefined && object.ibcPortId !== null) {
message.ibcPortId = String(object.ibcPortId);
} else {
message.ibcPortId = "";
}
return message;
},
@ -613,6 +625,7 @@ export const ContractInfo = {
message.label !== undefined && (obj.label = message.label);
message.created !== undefined &&
(obj.created = message.created ? AbsoluteTxPosition.toJSON(message.created) : undefined);
message.ibcPortId !== undefined && (obj.ibcPortId = message.ibcPortId);
return obj;
},
@ -643,6 +656,11 @@ export const ContractInfo = {
} else {
message.created = undefined;
}
if (object.ibcPortId !== undefined && object.ibcPortId !== null) {
message.ibcPortId = object.ibcPortId;
} else {
message.ibcPortId = "";
}
return message;
},
};

View File

@ -84,7 +84,7 @@ async function instantiateContract(
beneficiary: beneficiaryAddress,
}),
),
initFunds: transferAmount ? [...transferAmount] : [],
funds: transferAmount ? [...transferAmount] : [],
}),
};
const fee: StdFee = {
@ -109,7 +109,7 @@ async function executeContract(
sender: alice.address0,
contract: contractAddress,
msg: toAscii(JSON.stringify(msg)),
sentFunds: [],
funds: [],
}),
};
const fee: StdFee = {
@ -219,6 +219,7 @@ describe("WasmExtension", () => {
creator: alice.address0,
label: "my escrow",
admin: "",
ibcPortId: "",
});
const { contractInfo } = await client.unverified.wasm.getContractInfo(myAddress);
@ -228,6 +229,7 @@ describe("WasmExtension", () => {
creator: alice.address0,
label: "my escrow",
admin: "",
ibcPortId: "",
});
expect(contractInfo.admin).toEqual("");
});
@ -419,9 +421,11 @@ describe("WasmExtension", () => {
assertDefined(result.data);
const msgData = fromOneElementArray(result.data);
expect(msgData.msgType).toEqual("instantiate");
expect(MsgInstantiateContractResponse.decode(msgData.data)).toEqual(
MsgInstantiateContractResponse.fromPartial({ address: contractAddress }),
);
const response = MsgInstantiateContractResponse.decode(msgData.data);
expect({
...response,
data: new Uint8Array(), // workaround for https://github.com/stephenh/ts-proto/issues/237
}).toEqual(MsgInstantiateContractResponse.fromPartial({ address: contractAddress }));
const balanceUcosm = await client.bank.balance(contractAddress, "ucosm");
expect(balanceUcosm).toEqual(transferAmount[0]);

View File

@ -191,7 +191,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
codeId: Long.fromString(new Uint53(codeId).toString()),
label: label,
initMsg: toUtf8(JSON.stringify(initMsg)),
initFunds: [...(options.transferAmount || [])],
funds: [...(options.transferAmount || [])],
admin: options.admin,
}),
};
@ -293,7 +293,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
sender: senderAddress,
contract: contractAddress,
msg: toUtf8(JSON.stringify(handleMsg)),
sentFunds: [...(transferAmount || [])],
funds: [...(transferAmount || [])],
}),
};
const result = await this.signAndBroadcast(senderAddress, [executeMsg], this.fees.exec, memo);

File diff suppressed because one or more lines are too long

View File

@ -83,15 +83,27 @@ export const unused = {
};
export const validator = {
/** From first gentx's auth_info.signer_infos in scripts/wasmd/template/.wasmd/config/genesis.json */
/**
* From first gentx's auth_info.signer_infos in scripts/wasmd/template/.wasmd/config/genesis.json
*
* `jq ".app_state.genutil.gen_txs[0].auth_info.signer_infos[0].public_key" scripts/wasmd/template/.wasmd/config/genesis.json`
*/
pubkey: {
type: "tendermint/PubKeySecp256k1",
value: "AsYCD9IZsnY3BhSrR3k7mf5iaJD0KkQdwqzLLl9PT+05",
value: "AoSRL8/aA1oDkHPd0IMtLpozhGdgFafzMCKmmOQ0olJn",
},
/** delegator_address from /cosmos.staking.v1beta1.MsgCreateValidator in scripts/wasmd/template/.wasmd/config/genesis.json */
delegatorAddress: "wasm1m4vhsgne6u74ff78vf0tvkjq3q4hjf9v84k82s",
/** validator_address from /cosmos.staking.v1beta1.MsgCreateValidator in scripts/wasmd/template/.wasmd/config/genesis.json */
validatorAddress: "wasmvaloper1m4vhsgne6u74ff78vf0tvkjq3q4hjf9vjfrmy2",
/**
* delegator_address from /cosmos.staking.v1beta1.MsgCreateValidator in scripts/wasmd/template/.wasmd/config/genesis.json
*
* `jq ".app_state.genutil.gen_txs[0].body.messages[0].delegator_address" scripts/wasmd/template/.wasmd/config/genesis.json`
*/
delegatorAddress: "wasm1jq32x9gj3n5lj2cgrcksypk3zegxnxgy8vzymc",
/**
* validator_address from /cosmos.staking.v1beta1.MsgCreateValidator in scripts/wasmd/template/.wasmd/config/genesis.json
*
* `jq ".app_state.genutil.gen_txs[0].body.messages[0].validator_address" scripts/wasmd/template/.wasmd/config/genesis.json`
*/
validatorAddress: "wasmvaloper1jq32x9gj3n5lj2cgrcksypk3zegxnxgyjshc4z",
accountNumber: 0,
sequence: 1,
};
@ -100,8 +112,8 @@ export const validator = {
export const deployedHackatom = {
codeId: 1,
source: "https://crates.io/api/v1/crates/hackatom/not-yet-released/download",
builder: "cosmwasm/rust-optimizer:0.9.1",
checksum: "3defc33a41f58c71d38b176d521c411d8e74d26403fde7660486930c7579a016",
builder: "cosmwasm/rust-optimizer:0.10.8",
checksum: "08537c4f191980bc835f08ecb9077bb60df1097c1c0793312e0f21cbfca868d2",
instances: [
{
beneficiary: alice.address0,
@ -121,19 +133,6 @@ export const deployedHackatom = {
],
};
/** Deployed as part of scripts/wasmd/init.sh */
export const deployedErc20 = {
codeId: 2,
source: "https://crates.io/api/v1/crates/cw-erc20/0.7.0/download",
builder: "cosmwasm/rust-optimizer:0.10.4",
checksum: "d04368320ad55089384adb171aaea39e43d710d7608829adba0300ed30aa2988",
instances: [
"wasm1vjecguu37pmd577339wrdp208ddzymku8yy0te", // HASH
"wasm1ym5m5dw7pttft5w430nxx6uat8f84ck4hrew7r", // ISA
"wasm1gv07846a3867ezn3uqkk082c5ftke7hp4rffwt", // JADE
],
};
/** Deployed as part of scripts/wasmd/init.sh */
export const deployedCw3 = {
codeId: 3,
@ -164,16 +163,6 @@ export function pendingWithoutWasmd(): void {
}
}
export function erc20Enabled(): boolean {
return !!process.env.ERC20_ENABLED;
}
export function pendingWithoutErc20(): void {
if (!erc20Enabled()) {
return pending("Set ERC20_ENABLED to enable ERC20-based tests");
}
}
export function cw3Enabled(): boolean {
return !!process.env.CW3_ENABLED;
}

View File

@ -38,7 +38,7 @@
"coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet",
"pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js",
"preget-proto": "shx rm -rf proto",
"get-proto": "REF=v0.40.0 ./scripts/get-proto.sh",
"get-proto": "COSMOS_SDK_REF=v0.42.0 ./scripts/get-proto.sh",
"define-proto": "./scripts/define-proto.sh",
"postdefine-proto": "prettier --write \"src/codec/**/*.ts\""
},

View File

@ -6,14 +6,14 @@ PROTO_DIR="./proto"
COSMOS_DIR="$PROTO_DIR/cosmos"
COSMOS_SDK_DIR="$COSMOS_DIR/cosmos-sdk"
ZIP_FILE="$COSMOS_DIR/tmp.zip"
REF=${REF:-"master"}
SUFFIX=${REF}
COSMOS_SDK_REF=${COSMOS_SDK_REF:-"master"}
SUFFIX=${COSMOS_SDK_REF}
[[ $SUFFIX =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.+)?$ ]] && SUFFIX=${SUFFIX#v}
mkdir -p "$COSMOS_DIR"
wget -qO "$ZIP_FILE" "https://github.com/cosmos/cosmos-sdk/archive/$REF.zip"
wget -qO "$ZIP_FILE" "https://github.com/cosmos/cosmos-sdk/archive/$COSMOS_SDK_REF.zip"
unzip "$ZIP_FILE" "*.proto" -d "$COSMOS_DIR"
mv "$COSMOS_SDK_DIR-$SUFFIX" "$COSMOS_SDK_DIR"
rm "$ZIP_FILE"

View File

@ -37,7 +37,7 @@
"coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet",
"pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js",
"preget-proto": "shx rm -rf proto",
"get-proto": "REF=v0.40.0 ./scripts/get-proto.sh",
"get-proto": "COSMOS_SDK_REF=v0.42.0 ./scripts/get-proto.sh",
"define-proto": "./scripts/define-proto.sh",
"postdefine-proto": "prettier --write \"src/codec/**/*.ts\""
},

View File

@ -6,14 +6,14 @@ PROTO_DIR="./proto"
COSMOS_DIR="$PROTO_DIR/cosmos"
COSMOS_SDK_DIR="$COSMOS_DIR/cosmos-sdk"
ZIP_FILE="$COSMOS_DIR/tmp.zip"
REF=${REF:-"master"}
SUFFIX=${REF}
COSMOS_SDK_REF=${COSMOS_SDK_REF:-"master"}
SUFFIX=${COSMOS_SDK_REF}
[[ $SUFFIX =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.+)?$ ]] && SUFFIX=${SUFFIX#v}
mkdir -p "$COSMOS_DIR"
wget -qO "$ZIP_FILE" "https://github.com/cosmos/cosmos-sdk/archive/$REF.zip"
wget -qO "$ZIP_FILE" "https://github.com/cosmos/cosmos-sdk/archive/$COSMOS_SDK_REF.zip"
unzip "$ZIP_FILE" "*.proto" -d "$COSMOS_DIR"
mv "$COSMOS_SDK_DIR-$SUFFIX" "$COSMOS_SDK_DIR"
rm "$ZIP_FILE"

View File

@ -1,7 +1,7 @@
/* eslint-disable */
import { Coin } from "../../../cosmos/base/v1beta1/coin";
import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination";
import { Params } from "../../../cosmos/bank/v1beta1/bank";
import { Params, Metadata } from "../../../cosmos/bank/v1beta1/bank";
import _m0 from "protobufjs/minimal";
import Long from "long";
@ -75,6 +75,38 @@ export interface QueryParamsResponse {
params?: Params;
}
/** QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. */
export interface QueryDenomsMetadataRequest {
/** pagination defines an optional pagination for the request. */
pagination?: PageRequest;
}
/**
* QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC
* method.
*/
export interface QueryDenomsMetadataResponse {
/** metadata provides the client information for all the registered tokens. */
metadatas: Metadata[];
/** pagination defines the pagination in the response. */
pagination?: PageResponse;
}
/** QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. */
export interface QueryDenomMetadataRequest {
/** denom is the coin denom to query the metadata for. */
denom: string;
}
/**
* QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC
* method.
*/
export interface QueryDenomMetadataResponse {
/** metadata describes and provides all the client information for the requested token. */
metadata?: Metadata;
}
const baseQueryBalanceRequest: object = { address: "", denom: "" };
export const QueryBalanceRequest = {
@ -659,6 +691,253 @@ export const QueryParamsResponse = {
},
};
const baseQueryDenomsMetadataRequest: object = {};
export const QueryDenomsMetadataRequest = {
encode(message: QueryDenomsMetadataRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.pagination !== undefined) {
PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): QueryDenomsMetadataRequest {
const reader = input instanceof Uint8Array ? new _m0.Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseQueryDenomsMetadataRequest } as QueryDenomsMetadataRequest;
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.pagination = PageRequest.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): QueryDenomsMetadataRequest {
const message = { ...baseQueryDenomsMetadataRequest } as QueryDenomsMetadataRequest;
if (object.pagination !== undefined && object.pagination !== null) {
message.pagination = PageRequest.fromJSON(object.pagination);
} else {
message.pagination = undefined;
}
return message;
},
toJSON(message: QueryDenomsMetadataRequest): unknown {
const obj: any = {};
message.pagination !== undefined &&
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
return obj;
},
fromPartial(object: DeepPartial<QueryDenomsMetadataRequest>): QueryDenomsMetadataRequest {
const message = { ...baseQueryDenomsMetadataRequest } as QueryDenomsMetadataRequest;
if (object.pagination !== undefined && object.pagination !== null) {
message.pagination = PageRequest.fromPartial(object.pagination);
} else {
message.pagination = undefined;
}
return message;
},
};
const baseQueryDenomsMetadataResponse: object = {};
export const QueryDenomsMetadataResponse = {
encode(message: QueryDenomsMetadataResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
for (const v of message.metadatas) {
Metadata.encode(v!, writer.uint32(10).fork()).ldelim();
}
if (message.pagination !== undefined) {
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): QueryDenomsMetadataResponse {
const reader = input instanceof Uint8Array ? new _m0.Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseQueryDenomsMetadataResponse } as QueryDenomsMetadataResponse;
message.metadatas = [];
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.metadatas.push(Metadata.decode(reader, reader.uint32()));
break;
case 2:
message.pagination = PageResponse.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): QueryDenomsMetadataResponse {
const message = { ...baseQueryDenomsMetadataResponse } as QueryDenomsMetadataResponse;
message.metadatas = [];
if (object.metadatas !== undefined && object.metadatas !== null) {
for (const e of object.metadatas) {
message.metadatas.push(Metadata.fromJSON(e));
}
}
if (object.pagination !== undefined && object.pagination !== null) {
message.pagination = PageResponse.fromJSON(object.pagination);
} else {
message.pagination = undefined;
}
return message;
},
toJSON(message: QueryDenomsMetadataResponse): unknown {
const obj: any = {};
if (message.metadatas) {
obj.metadatas = message.metadatas.map((e) => (e ? Metadata.toJSON(e) : undefined));
} else {
obj.metadatas = [];
}
message.pagination !== undefined &&
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
return obj;
},
fromPartial(object: DeepPartial<QueryDenomsMetadataResponse>): QueryDenomsMetadataResponse {
const message = { ...baseQueryDenomsMetadataResponse } as QueryDenomsMetadataResponse;
message.metadatas = [];
if (object.metadatas !== undefined && object.metadatas !== null) {
for (const e of object.metadatas) {
message.metadatas.push(Metadata.fromPartial(e));
}
}
if (object.pagination !== undefined && object.pagination !== null) {
message.pagination = PageResponse.fromPartial(object.pagination);
} else {
message.pagination = undefined;
}
return message;
},
};
const baseQueryDenomMetadataRequest: object = { denom: "" };
export const QueryDenomMetadataRequest = {
encode(message: QueryDenomMetadataRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.denom !== "") {
writer.uint32(10).string(message.denom);
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): QueryDenomMetadataRequest {
const reader = input instanceof Uint8Array ? new _m0.Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseQueryDenomMetadataRequest } as QueryDenomMetadataRequest;
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.denom = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): QueryDenomMetadataRequest {
const message = { ...baseQueryDenomMetadataRequest } as QueryDenomMetadataRequest;
if (object.denom !== undefined && object.denom !== null) {
message.denom = String(object.denom);
} else {
message.denom = "";
}
return message;
},
toJSON(message: QueryDenomMetadataRequest): unknown {
const obj: any = {};
message.denom !== undefined && (obj.denom = message.denom);
return obj;
},
fromPartial(object: DeepPartial<QueryDenomMetadataRequest>): QueryDenomMetadataRequest {
const message = { ...baseQueryDenomMetadataRequest } as QueryDenomMetadataRequest;
if (object.denom !== undefined && object.denom !== null) {
message.denom = object.denom;
} else {
message.denom = "";
}
return message;
},
};
const baseQueryDenomMetadataResponse: object = {};
export const QueryDenomMetadataResponse = {
encode(message: QueryDenomMetadataResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.metadata !== undefined) {
Metadata.encode(message.metadata, writer.uint32(10).fork()).ldelim();
}
return writer;
},
decode(input: _m0.Reader | Uint8Array, length?: number): QueryDenomMetadataResponse {
const reader = input instanceof Uint8Array ? new _m0.Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseQueryDenomMetadataResponse } as QueryDenomMetadataResponse;
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.metadata = Metadata.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object: any): QueryDenomMetadataResponse {
const message = { ...baseQueryDenomMetadataResponse } as QueryDenomMetadataResponse;
if (object.metadata !== undefined && object.metadata !== null) {
message.metadata = Metadata.fromJSON(object.metadata);
} else {
message.metadata = undefined;
}
return message;
},
toJSON(message: QueryDenomMetadataResponse): unknown {
const obj: any = {};
message.metadata !== undefined &&
(obj.metadata = message.metadata ? Metadata.toJSON(message.metadata) : undefined);
return obj;
},
fromPartial(object: DeepPartial<QueryDenomMetadataResponse>): QueryDenomMetadataResponse {
const message = { ...baseQueryDenomMetadataResponse } as QueryDenomMetadataResponse;
if (object.metadata !== undefined && object.metadata !== null) {
message.metadata = Metadata.fromPartial(object.metadata);
} else {
message.metadata = undefined;
}
return message;
},
};
/** Query defines the gRPC querier service. */
export interface Query {
/** Balance queries the balance of a single coin for a single account. */
@ -671,6 +950,10 @@ export interface Query {
SupplyOf(request: QuerySupplyOfRequest): Promise<QuerySupplyOfResponse>;
/** Params queries the parameters of x/bank module. */
Params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
/** DenomsMetadata queries the client metadata of a given coin denomination. */
DenomMetadata(request: QueryDenomMetadataRequest): Promise<QueryDenomMetadataResponse>;
/** DenomsMetadata queries the client metadata for all registered coin denominations. */
DenomsMetadata(request: QueryDenomsMetadataRequest): Promise<QueryDenomsMetadataResponse>;
}
export class QueryClientImpl implements Query {
@ -707,6 +990,18 @@ export class QueryClientImpl implements Query {
const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "Params", data);
return promise.then((data) => QueryParamsResponse.decode(new _m0.Reader(data)));
}
DenomMetadata(request: QueryDenomMetadataRequest): Promise<QueryDenomMetadataResponse> {
const data = QueryDenomMetadataRequest.encode(request).finish();
const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomMetadata", data);
return promise.then((data) => QueryDenomMetadataResponse.decode(new _m0.Reader(data)));
}
DenomsMetadata(request: QueryDenomsMetadataRequest): Promise<QueryDenomsMetadataResponse> {
const data = QueryDenomsMetadataRequest.encode(request).finish();
const promise = this.rpc.request("cosmos.bank.v1beta1.Query", "DenomsMetadata", data);
return promise.then((data) => QueryDenomsMetadataResponse.decode(new _m0.Reader(data)));
}
}
interface Rpc {

View File

@ -74,23 +74,33 @@ export interface HistoricalInfo {
* a validator.
*/
export interface CommissionRates {
/** rate is the commission rate charged to delegators, as a fraction. */
rate: string;
/** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */
maxRate: string;
/** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */
maxChangeRate: string;
}
/** Commission defines commission parameters for a given validator. */
export interface Commission {
/** commission_rates defines the initial commission rates to be used for creating a validator. */
commissionRates?: CommissionRates;
/** update_time is the last time the commission rate was changed. */
updateTime?: Date;
}
/** Description defines a validator description. */
export interface Description {
/** moniker defines a human-readable name for the validator. */
moniker: string;
/** identity defines an optional identity signature (ex. UPort or Keybase). */
identity: string;
/** website defines an optional website link. */
website: string;
/** security_contact defines an optional email for security contact. */
securityContact: string;
/** details define other optional details. */
details: string;
}
@ -105,16 +115,27 @@ export interface Description {
* multiplied by exchange rate.
*/
export interface Validator {
/** operator_address defines the address of the validator's operator; bech encoded in JSON. */
operatorAddress: string;
/** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */
consensusPubkey?: Any;
/** jailed defined whether the validator has been jailed from bonded status or not. */
jailed: boolean;
/** status is the validator status (bonded/unbonding/unbonded). */
status: BondStatus;
/** tokens define the delegated tokens (incl. self-delegation). */
tokens: string;
/** delegator_shares defines total shares issued to a validator's delegators. */
delegatorShares: string;
/** description defines the description terms for the validator. */
description?: Description;
/** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */
unbondingHeight: Long;
/** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */
unbondingTime?: Date;
/** commission defines the commission parameters. */
commission?: Commission;
/** min_self_delegation is the validator's self declared minimum self delegation. */
minSelfDelegation: string;
}
@ -161,8 +182,11 @@ export interface DVVTriplets {
* validator.
*/
export interface Delegation {
/** delegator_address is the bech32-encoded address of the delegator. */
delegatorAddress: string;
/** validator_address is the bech32-encoded address of the validator. */
validatorAddress: string;
/** shares define the delegation shares received. */
shares: string;
}
@ -171,25 +195,35 @@ export interface Delegation {
* for a single validator in an time-ordered list.
*/
export interface UnbondingDelegation {
/** delegator_address is the bech32-encoded address of the delegator. */
delegatorAddress: string;
/** validator_address is the bech32-encoded address of the validator. */
validatorAddress: string;
/** unbonding delegation entries */
/** entries are the unbonding delegation entries. */
entries: UnbondingDelegationEntry[];
}
/** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */
export interface UnbondingDelegationEntry {
/** creation_height is the height which the unbonding took place. */
creationHeight: Long;
/** completion_time is the unix time for unbonding completion. */
completionTime?: Date;
/** initial_balance defines the tokens initially scheduled to receive at completion. */
initialBalance: string;
/** balance defines the tokens to receive at completion. */
balance: string;
}
/** RedelegationEntry defines a redelegation object with relevant metadata. */
export interface RedelegationEntry {
/** creation_height defines the height which the redelegation took place. */
creationHeight: Long;
/** completion_time defines the unix time for redelegation completion. */
completionTime?: Date;
/** initial_balance defines the initial balance when redelegation started. */
initialBalance: string;
/** shares_dst is the amount of destination-validator shares created by redelegation. */
sharesDst: string;
}
@ -198,19 +232,27 @@ export interface RedelegationEntry {
* from a particular source validator to a particular destination validator.
*/
export interface Redelegation {
/** delegator_address is the bech32-encoded address of the delegator. */
delegatorAddress: string;
/** validator_src_address is the validator redelegation source operator address. */
validatorSrcAddress: string;
/** validator_dst_address is the validator redelegation destination operator address. */
validatorDstAddress: string;
/** redelegation entries */
/** entries are the redelegation entries. */
entries: RedelegationEntry[];
}
/** Params defines the parameters for the staking module. */
export interface Params {
/** unbonding_time is the time duration of unbonding. */
unbondingTime?: Duration;
/** max_validators is the maximum number of validators. */
maxValidators: number;
/** max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). */
maxEntries: number;
/** historical_entries is the number of historical entries to persist. */
historicalEntries: number;
/** bond_denom defines the bondable coin denomination. */
bondDenom: string;
}

View File

@ -1,5 +1,3 @@
c478a6d9d6303e67f28d7863ea6e07426e9f0082744557d503e723bc1c46ccf8 cw1_subkeys.wasm
1a4a376ef1099ad3edc33aa1d3105e4621bc49e44b1ac0a449d7b6912e40fb0a cw3_fixed_multisig.wasm
ebc2b11e2afa50d5dcd4234840cd581e948a59d888bb8d651598bba3732cd8ee cw-nameservice.wasm
d04368320ad55089384adb171aaea39e43d710d7608829adba0300ed30aa2988 cw_erc20.wasm
3defc33a41f58c71d38b176d521c411d8e74d26403fde7660486930c7579a016 hackatom.wasm
08537c4f191980bc835f08ecb9077bb60df1097c1c0793312e0f21cbfca868d2 hackatom.wasm

Binary file not shown.

BIN
scripts/wasmd/contracts/cw_erc20.wasm (Stored with Git LFS)

Binary file not shown.

BIN
scripts/wasmd/contracts/hackatom.wasm (Stored with Git LFS)

Binary file not shown.

View File

@ -1,168 +0,0 @@
#!/usr/bin/env node
/* eslint-disable @typescript-eslint/naming-convention */
const { DirectSecp256k1HdWallet } = require("@cosmjs/proto-signing");
const { SigningCosmWasmClient } = require("@cosmjs/cosmwasm-stargate");
const fs = require("fs");
const endpoint = "http://localhost:26659";
const alice = {
mnemonic: "enlist hip relief stomach skate base shallow young switch frequent cry park",
address0: "wasm14qemq0vw6y3gc3u3e0aty2e764u4gs5lndxgyk",
address1: "wasm1hhg2rlu9jscacku2wwckws7932qqqu8xm5ca8y",
address2: "wasm1xv9tklw7d82sezh9haa573wufgy59vmwnxhnsl",
address3: "wasm17yg9mssjenmc3jkqth6ulcwj9cxujrxxg9nmzk",
address4: "wasm1f7j7ryulwjfe9ljplvhtcaxa6wqgula3nh873j",
};
const unused = {
address: "wasm1cjsxept9rkggzxztslae9ndgpdyt240842kpxh",
};
const guest = {
address: "wasm17d0jcz59jf68g52vq38tuuncmwwjk42us8fnse",
};
const codeMeta = {
source: "https://crates.io/api/v1/crates/cw-erc20/0.7.0/download",
builder: "cosmwasm/rust-optimizer:0.10.4",
};
const initDataHash = {
admin: undefined,
initMsg: {
decimals: 5,
name: "Hash token",
symbol: "HASH",
initial_balances: [
{
address: alice.address0,
amount: "11",
},
{
address: alice.address1,
amount: "11",
},
{
address: alice.address2,
amount: "11",
},
{
address: alice.address3,
amount: "11",
},
{
address: alice.address4,
amount: "11",
},
{
address: unused.address,
amount: "12812345",
},
{
address: guest.address,
amount: "22004000000",
},
],
},
};
const initDataIsa = {
admin: undefined,
initMsg: {
decimals: 0,
name: "Isa Token",
symbol: "ISA",
initial_balances: [
{
address: alice.address0,
amount: "999999999",
},
{
address: alice.address1,
amount: "999999999",
},
{
address: alice.address2,
amount: "999999999",
},
{
address: alice.address3,
amount: "999999999",
},
{
address: alice.address4,
amount: "999999999",
},
{
address: unused.address,
amount: "42",
},
],
},
};
const initDataJade = {
admin: alice.address1,
initMsg: {
decimals: 18,
name: "Jade Token",
symbol: "JADE",
initial_balances: [
{
address: alice.address0,
amount: "189189189000000000000000000", // 189189189 JADE
},
{
address: alice.address1,
amount: "189189189000000000000000000", // 189189189 JADE
},
{
address: alice.address2,
amount: "189189189000000000000000000", // 189189189 JADE
},
{
address: alice.address3,
amount: "189189189000000000000000000", // 189189189 JADE
},
{
address: alice.address4,
amount: "189189189000000000000000000", // 189189189 JADE
},
{
address: guest.address,
amount: "189500000000000000000", // 189.5 JADE
},
],
},
};
async function main() {
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, "wasm");
const client = await SigningCosmWasmClient.connectWithSigner(endpoint, wallet);
const wasm = fs.readFileSync(__dirname + "/contracts/cw_erc20.wasm");
const uploadReceipt = await client.upload(alice.address0, wasm, codeMeta, "Upload ERC20 contract");
console.info(`Upload succeeded. Receipt: ${JSON.stringify(uploadReceipt)}`);
for (const { initMsg, admin } of [initDataHash, initDataIsa, initDataJade]) {
const { contractAddress } = await client.instantiate(
alice.address0,
uploadReceipt.codeId,
initMsg,
initMsg.symbol,
{
memo: `Create an ERC20 instance for ${initMsg.symbol}`,
admin: admin,
},
);
console.info(`Contract instantiated for ${initMsg.symbol} at ${contractAddress}`);
}
}
main().then(
() => {
console.info("All done, let the coins flow.");
process.exit(0);
},
(error) => {
console.error(error);
process.exit(1);
},
);

View File

@ -17,7 +17,7 @@ const alice = {
const codeMeta = {
source: "https://crates.io/api/v1/crates/hackatom/not-yet-released/download",
builder: "cosmwasm/rust-optimizer:0.9.1",
builder: "cosmwasm/rust-optimizer:0.10.8",
};
const inits = [

View File

@ -1,5 +1,5 @@
# Choose from https://hub.docker.com/r/cosmwasm/wasmd/tags
REPOSITORY="cosmwasm/wasmd"
VERSION="v0.15.1"
VERSION="v0.16.0-alpha1"
CONTAINER_NAME="wasmd"

View File

@ -26,7 +26,5 @@ SCRIPT_DIR="$(realpath "$(dirname "$0")")"
sha256sum --check checksums.sha256
)
"$SCRIPT_DIR/deploy_hackatom.js"
"$SCRIPT_DIR/deploy_erc20.js"
"$SCRIPT_DIR/deploy_cw3.js"
"$SCRIPT_DIR/deploy_cw1.js"
# "$SCRIPT_DIR/deploy_nameservice.js"
# "$SCRIPT_DIR/deploy_cw3.js"
# "$SCRIPT_DIR/deploy_cw1.js"

View File

@ -0,0 +1 @@
eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMS0wMy0xMSAwNzozOTozOS42NDg4NTUxICswMDAwIFVUQyBtPSswLjY5MzgzNzMwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6IkZ1dDBwZ3piWDBnVzh0dE4ifQ.Ko268FeLtKNWdloqDVwFJjYyGBvs_ZF_K6M-2XP49X1DhjXq8Rd4ww.3EvDw48Dnv-mB79H.fMk_gMJjDfv6oe360q1QUZdJ4G1jgJ88zEAlXiqx_BsY_rmTKy9rfF_HU9C6OQIpfB8BBQSZx8ygqO56QNKEgi1IcQXQvN9UoGTd3kcbd954V7IaENQqH4_hlvLAWAbOhC8UyaCxisuNa774m9gDz9ljNfmL1ku6j4ZZIPyZkFSi7LSgs_UCAwzLbcR4KdoEjGQXb_8HcB55JX6wNbiqr3WzPlckDo7yrAJAR6w5fUmoR5dxeoD8ed_c.xXAyQKBSEbRbOuuDzznxGQ

View File

@ -47,7 +47,7 @@ db_backend = "goleveldb"
db_dir = "data"
# Output level for logging, including package level options
log_level = "main:info,state:info,statesync:info,*:error"
log_level = "info"
# Output format: 'plain' (colored text) or 'json'
log_format = "plain"
@ -149,7 +149,7 @@ max_body_bytes = 1000000
max_header_bytes = 1048576
# The path to a file containing certificate that is used to create the HTTPS server.
# Migth be either absolute path or path related to tendermint's config directory.
# Might be either absolute path or path related to Tendermint's config directory.
# If the certificate is signed by a certificate authority,
# the certFile should be the concatenation of the server's certificate, any intermediates,
# and the CA's certificate.
@ -158,8 +158,8 @@ max_header_bytes = 1048576
tls_cert_file = ""
# The path to a file containing matching private key that is used to create the HTTPS server.
# Migth be either absolute path or path related to tendermint's config directory.
# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server.
# Might be either absolute path or path related to Tendermint's config directory.
# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server.
# Otherwise, HTTP server is run.
tls_key_file = ""
@ -240,7 +240,7 @@ handshake_timeout = "20s"
dial_timeout = "3s"
#######################################################
### Mempool Configurattion Option ###
### Mempool Configuration Option ###
#######################################################
[mempool]
@ -259,13 +259,19 @@ max_txs_bytes = 1073741824
# Size of the cache (used to filter transactions we saw earlier) in transactions
cache_size = 10000
# Do not remove invalid transactions from the cache (default: false)
# Set to true if it's not possible for any invalid transaction to become valid
# again in the future.
keep-invalid-txs-in-cache = false
# Maximum size of a single transaction.
# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}.
max_tx_bytes = 1048576
# Maximum size of a batch of transactions to send to a peer
# Including space needed by encoding (one varint per transaction).
max_batch_bytes = 10485760
# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796
max_batch_bytes = 0
#######################################################
### State Sync Configuration Options ###

View File

@ -6,7 +6,7 @@
{
"@type": "/cosmos.auth.v1beta1.BaseAccount",
"account_number": "0",
"address": "wasm1m4vhsgne6u74ff78vf0tvkjq3q4hjf9v84k82s",
"address": "wasm1jq32x9gj3n5lj2cgrcksypk3zegxnxgy8vzymc",
"pub_key": null,
"sequence": "0"
},
@ -412,6 +412,19 @@
}
]
},
{
"address": "wasm1jq32x9gj3n5lj2cgrcksypk3zegxnxgy8vzymc",
"coins": [
{
"amount": "1000000000",
"denom": "ucosm"
},
{
"amount": "1000000000",
"denom": "ustake"
}
]
},
{
"address": "wasm14qemq0vw6y3gc3u3e0aty2e764u4gs5lndxgyk",
"coins": [
@ -529,19 +542,6 @@
}
]
},
{
"address": "wasm1m4vhsgne6u74ff78vf0tvkjq3q4hjf9v84k82s",
"coins": [
{
"amount": "1000000000",
"denom": "ucosm"
},
{
"amount": "1000000000",
"denom": "ustake"
}
]
},
{
"address": "wasm1meeu3jl268txxytwmmrsljk8rawh6n2mhwp76p",
"coins": [
@ -653,7 +653,7 @@
},
"public_key": {
"@type": "/cosmos.crypto.secp256k1.PubKey",
"key": "AsYCD9IZsnY3BhSrR3k7mf5iaJD0KkQdwqzLLl9PT+05"
"key": "AoSRL8/aA1oDkHPd0IMtLpozhGdgFafzMCKmmOQ0olJn"
},
"sequence": "0"
}
@ -661,7 +661,7 @@
},
"body": {
"extension_options": [],
"memo": "a098df5b6cd2e16602120b2247e4696ac00f08bd@172.17.0.2:26656",
"memo": "35c6d5ac272deb6b94487979a508ad2092e0e8bc@172.17.0.2:26656",
"messages": [
{
"@type": "/cosmos.staking.v1beta1.MsgCreateValidator",
@ -670,7 +670,7 @@
"max_rate": "0.200000000000000000",
"rate": "0.100000000000000000"
},
"delegator_address": "wasm1m4vhsgne6u74ff78vf0tvkjq3q4hjf9v84k82s",
"delegator_address": "wasm1jq32x9gj3n5lj2cgrcksypk3zegxnxgy8vzymc",
"description": {
"details": "",
"identity": "",
@ -681,9 +681,9 @@
"min_self_delegation": "1",
"pubkey": {
"@type": "/cosmos.crypto.ed25519.PubKey",
"key": "l7k/BxLwodqWzhOdMzMhTF69d52d5BkwRJAUdNTNfAk="
"key": "ngPVy1v4JClXBkz712hruDsNCVtR8p7AdcbbmJKreoY="
},
"validator_address": "wasmvaloper1m4vhsgne6u74ff78vf0tvkjq3q4hjf9vjfrmy2",
"validator_address": "wasmvaloper1jq32x9gj3n5lj2cgrcksypk3zegxnxgyjshc4z",
"value": {
"amount": "250000000",
"denom": "ustake"
@ -694,7 +694,7 @@
"timeout_height": "0"
},
"signatures": [
"wF5zS8hlYblMh7dQ6GK2BYgYjhK/NtjrupGBieW6SNA//SvKG5NAs6wJXbf5MNsZJv4ywSA13M0iODKTbLAJCw=="
"zm5EzuTaWoKLAwnlxIYrkNdE6JShAqPMSGBJQ9+qUVdsgmf8ov3pqtllN/WzOqGy/IuH9OVE4KOW9fKSd0U2/g=="
]
}
]
@ -728,6 +728,7 @@
"acknowledgements": [],
"channels": [],
"commitments": [],
"next_channel_sequence": "0",
"receipts": [],
"recv_sequences": [],
"send_sequences": []
@ -735,11 +736,20 @@
"client_genesis": {
"clients": [],
"clients_consensus": [],
"create_localhost": false
"clients_metadata": [],
"create_localhost": false,
"next_client_sequence": "0",
"params": {
"allowed_clients": [
"06-solomachine",
"07-tendermint"
]
}
},
"connection_genesis": {
"client_connection_paths": [],
"connections": []
"connections": [],
"next_connection_sequence": "0"
}
},
"mint": {
@ -775,7 +785,7 @@
"last_validator_powers": [],
"params": {
"bond_denom": "ustake",
"historical_entries": 100,
"historical_entries": 10000,
"max_entries": 7,
"max_validators": 100,
"unbonding_time": "1814400s"
@ -797,6 +807,7 @@
"wasm": {
"codes": [],
"contracts": [],
"gen_msgs": [],
"params": {
"code_upload_access": {
"address": "",
@ -813,7 +824,7 @@
"block": {
"max_bytes": "22020096",
"max_gas": "-1",
"time_iota_ms": "1000"
"time_iota_ms": "10"
},
"evidence": {
"max_age_duration": "172800000000000",
@ -827,6 +838,6 @@
},
"version": {}
},
"genesis_time": "2020-11-19T13:29:27.593739645Z",
"genesis_time": "2021-03-11T07:39:38.4466445Z",
"initial_height": "1"
}

View File

@ -0,0 +1 @@
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"node001","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"wasm1jq32x9gj3n5lj2cgrcksypk3zegxnxgy8vzymc","validator_address":"wasmvaloper1jq32x9gj3n5lj2cgrcksypk3zegxnxgyjshc4z","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"ngPVy1v4JClXBkz712hruDsNCVtR8p7AdcbbmJKreoY="},"value":{"denom":"ustake","amount":"250000000"}}],"memo":"35c6d5ac272deb6b94487979a508ad2092e0e8bc@172.17.0.2:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AoSRL8/aA1oDkHPd0IMtLpozhGdgFafzMCKmmOQ0olJn"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["zm5EzuTaWoKLAwnlxIYrkNdE6JShAqPMSGBJQ9+qUVdsgmf8ov3pqtllN/WzOqGy/IuH9OVE4KOW9fKSd0U2/g=="]}

View File

@ -1 +0,0 @@
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"node001","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"wasm1m4vhsgne6u74ff78vf0tvkjq3q4hjf9v84k82s","validator_address":"wasmvaloper1m4vhsgne6u74ff78vf0tvkjq3q4hjf9vjfrmy2","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"l7k/BxLwodqWzhOdMzMhTF69d52d5BkwRJAUdNTNfAk="},"value":{"denom":"ustake","amount":"250000000"}}],"memo":"a098df5b6cd2e16602120b2247e4696ac00f08bd@172.17.0.2:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AsYCD9IZsnY3BhSrR3k7mf5iaJD0KkQdwqzLLl9PT+05"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["wF5zS8hlYblMh7dQ6GK2BYgYjhK/NtjrupGBieW6SNA//SvKG5NAs6wJXbf5MNsZJv4ywSA13M0iODKTbLAJCw=="]}

View File

@ -1 +1 @@
{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"7zvQG/6PzVRBwIo3d9mcpaFeq3dE+ogHPJQh7tGCUCde6IGdbeY9DtemXIxDHgTSBZN+PvzyQmVaSwayPQza8g=="}}
{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"oqsLor7VWzHrqKN7uVh4kk+BkEpMSsbn9tZa68XBjCwchfZqpLmOfsEm9/i/CybCk49EiADcNE3jNrOyq2FGpQ=="}}

View File

@ -1,11 +1,11 @@
{
"address": "AC21D232E4CFA9E1A677F2BA3ADC61D6F6D4B6C1",
"address": "78651C29E659E5D06BA245039C5F44BEB1C01774",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "l7k/BxLwodqWzhOdMzMhTF69d52d5BkwRJAUdNTNfAk="
"value": "ngPVy1v4JClXBkz712hruDsNCVtR8p7AdcbbmJKreoY="
},
"priv_key": {
"type": "tendermint/PrivKeyEd25519",
"value": "tM1IqFe16yrZvNuA2/TL6fTsIyUhKYsnV+hOz9X0NjWXuT8HEvCh2pbOE50zMyFMXr13nZ3kGTBEkBR01M18CQ=="
"value": "WQbL+VCDG5/YJDXrypKeR6b5uhMQgPZVs3CQCYmMKuqeA9XLW/gkKVcGTPvXaGu4Ow0JW1HynsB1xtuYkqt6hg=="
}
}

View File

@ -1 +0,0 @@
eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMS0xOSAxMzoyOToyOC4xODM2MDk2NDIgKzAwMDAgVVRDIG09KzAuNDIwNDAwMzEzIiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiM1RsU0RoaUlNS0dXWG9pWSJ9.hbPLZ6X9Fspma7HTTVYjk4GjnL7ZgC0jWzNGZFg-ik9vVEbd3FzoJg._UpozjaSguAlzUqI.OuLSiZrPedj5bLmriia6hs3q312rl3_x_MjQI1i3wGI7r5UwARTrQ9Gesah7KkdlYkAO9hDid719mHJzaSX4nCb-oUSWuduhN6E43LFuqmfQjyhMHvdI0cWhYqOBa7BrXMwC5Ah6HkdXuucwd1f8hht-O3e_BI_gJWfZ6Nr8AnZ6k9o16xmjD_reFzo6teBEenHLUg6KbdNONZUlmJzW-T55W56l08LRpDcydLqWHAYmlFYkG7IBnZSC.LN1Djg00VqATnUY6Up9_1g

View File

@ -1 +1 @@
$2a$10$KSjG9SdIgna.NzWdSMe8U.5/rLBzf5ilMhlErf2yefBmcfATPLLGq
$2a$10$8FdjyO2zScfgsgxrxjG5s.TMFkpbFZb4H6GQ6hmGep21of6dV8L0O

View File

@ -1 +1 @@
eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMS0xOSAxMzoyOToyOC4xNjQwMDcxNDYgKzAwMDAgVVRDIG09KzAuNDAwNzk3ODAxIiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiS2pfZ3g0WFlLVUtCZ0I5SyJ9.vM-7MB583j8elthp7pH1n5wQ5AOm900bj4NbSdnl0soM3pX0L0YJFA.No61FYUovmNXnTir.ifU4lk3JjsDn2P-IwarQCTe_RytgwIum3UUzt8gPNlwOVZQhnYA5HYwotQH0DJwKbuy8pFK5fbtsFLGUjZFDx7aWmrcUoLKU5_XBwTVcnhq36vH8_HN35ecjLcJAA6RVCGYYx-t7y1WwMetmLPH471HMkV-gy0tbhHNogI06FJA4N_10kqvdyjXFb-s0m-K9_zZswbwB8Kb-2WlJU_HEf3RasjeUxIYsN2m-eeEgVicv5J2SX-6RTWmM-xPG0XIqU4EE1ANf5oNmTQ7Cjl4ASqidKa1zmk-aS2yMobM9tqdPG46aC7J3xApWWL5lX8Ao_2eR7uVCyy_DJQpYlX7e1bJcWzCxICxMVlXOY9gtKSrOxl2u.Nvz5hsPO5WR15WklT8ZmWQ
eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMS0wMy0xMSAwNzozOTozOS42MjMzMjI3ICswMDAwIFVUQyBtPSswLjY2ODMwNTQwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6IkdKQTNLTzNVZzdoLW4xYW0ifQ.XtBGKi7nPRDO2fHP5yN0A7bkvTqvpUIfwewVrp6jle01oMOO12F-6g.Up8OH1fP06oI7bAW.l1syzsMJreyVVPf-VvOtGWTo4ujPkhtlxNPkfMwsJPGz4cMwoRsrlq1yvD6vqU0kVwUjLDKsKuPjciKpL057ssQf4lIArss-k-GIULkZx_pzBSCqHRqXRhvgCAUxqhLteeSw5WIYq_BwdrTTTP7pa41GwLNjHI7-1CiSeh6fluTwp-rfkOikgyTu02UZi6LOcagynkMQ206yPQAG6iCg1r_j2S-UxklwO7U2aYTYnsnOA_wPYlBjPtu5DSWZ4l8gtncwvSEjb8di-3duhbcBHuv17ArcFBbnBrJ4XpOsxoZIFEippjzE6olwojWU8Ge37cLX4VI7E9jSw8BD18_kXlxmzvAWZZcAxP8T3m6TZKYkDyWd.5Dlq3dI0r7cI6y4E78PZCw