diff --git a/packages/cosmwasm/src/lcdapi/wasm.spec.ts b/packages/cosmwasm/src/lcdapi/wasm.spec.ts index 58d44a99..5e39e07a 100644 --- a/packages/cosmwasm/src/lcdapi/wasm.spec.ts +++ b/packages/cosmwasm/src/lcdapi/wasm.spec.ts @@ -58,6 +58,7 @@ async function uploadContract( wasm_byte_code: toBase64(contract.data), source: contract.source || "", builder: contract.builder || "", + instantiate_permission: null, }, }; const fee: StdFee = { @@ -413,9 +414,6 @@ describe("wasm", () => { jasmine.objectContaining({ code_id: codeId, creator: alice.address0, - init_msg: jasmine.objectContaining({ - beneficiary: beneficiaryAddress, - }), }), ); expect(myInfo.admin).toBeUndefined(); @@ -455,16 +453,14 @@ describe("wasm", () => { // check out history const myHistory = await client.wasm.getContractCodeHistory(myAddress); assert(myHistory); - expect(myHistory).toEqual( - jasmine.objectContaining({ - codeId: codeId, - operation: "Init", - msg: { - verifier: alice.address0, - beneficiary: beneficiaryAddress, - }, - }), - ); + expect(myHistory).toContain({ + code_id: codeId, + operation: "Init", + msg: { + verifier: alice.address0, + beneficiary: beneficiaryAddress, + }, + }); // make sure random addresses don't give useful info const nonExistentAddress = makeRandomAddress(); expect(await client.wasm.getContractCodeHistory(nonExistentAddress)).toBeNull(); diff --git a/packages/cosmwasm/src/msgs.ts b/packages/cosmwasm/src/msgs.ts index c8d02ed0..0110c171 100644 --- a/packages/cosmwasm/src/msgs.ts +++ b/packages/cosmwasm/src/msgs.ts @@ -1,11 +1,17 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { Coin, Msg } from "@cosmjs/sdk38"; +// TODO: implement +/** + * @see https://github.com/CosmWasm/wasmd/blob/v0.10.0-alpha/x/wasm/internal/types/params.go#L68-L71 + */ +export type AccessConfig = never; + /** * Uploads Wasm code to the chain. * A numeric, auto-incrementing code ID will be generated as a result of the execution of this message. * - * @see https://github.com/CosmWasm/wasmd/blob/v0.9.0-alpha4/x/wasm/internal/types/msg.go#L34 + * @see https://github.com/CosmWasm/wasmd/blob/v0.10.0-alpha/x/wasm/internal/types/msg.go#L10-L20 */ export interface MsgStoreCode extends Msg { readonly type: "wasm/MsgStoreCode"; @@ -18,6 +24,7 @@ export interface MsgStoreCode extends Msg { readonly source: string; /** A docker tag. Can be empty. */ readonly builder: string; + readonly instantiate_permission: AccessConfig | null; }; } diff --git a/packages/cosmwasm/src/signingcosmwasmclient.ts b/packages/cosmwasm/src/signingcosmwasmclient.ts index 392327ce..b39b362d 100644 --- a/packages/cosmwasm/src/signingcosmwasmclient.ts +++ b/packages/cosmwasm/src/signingcosmwasmclient.ts @@ -214,6 +214,7 @@ export class SigningCosmWasmClient extends CosmWasmClient { wasm_byte_code: toBase64(compressed), source: source, builder: builder, + instantiate_permission: null, }, }; const result = await this.signAndPost([storeCodeMsg], this.fees.upload, memo); diff --git a/packages/cosmwasm/types/msgs.d.ts b/packages/cosmwasm/types/msgs.d.ts index 8a72e4c9..085bf2af 100644 --- a/packages/cosmwasm/types/msgs.d.ts +++ b/packages/cosmwasm/types/msgs.d.ts @@ -1,9 +1,13 @@ import { Coin, Msg } from "@cosmjs/sdk38"; +/** + * @see https://github.com/CosmWasm/wasmd/blob/v0.10.0-alpha/x/wasm/internal/types/params.go#L68-L71 + */ +export declare type AccessConfig = never; /** * Uploads Wasm code to the chain. * A numeric, auto-incrementing code ID will be generated as a result of the execution of this message. * - * @see https://github.com/CosmWasm/wasmd/blob/v0.9.0-alpha4/x/wasm/internal/types/msg.go#L34 + * @see https://github.com/CosmWasm/wasmd/blob/v0.10.0-alpha/x/wasm/internal/types/msg.go#L10-L20 */ export interface MsgStoreCode extends Msg { readonly type: "wasm/MsgStoreCode"; @@ -16,6 +20,7 @@ export interface MsgStoreCode extends Msg { readonly source: string; /** A docker tag. Can be empty. */ readonly builder: string; + readonly instantiate_permission: AccessConfig | null; }; } export declare function isMsgStoreCode(msg: Msg): msg is MsgStoreCode;