diff --git a/packages/cosmwasm-stargate/src/cosmwasmclient.spec.ts b/packages/cosmwasm-stargate/src/cosmwasmclient.spec.ts index a531293d..1fc1bae7 100644 --- a/packages/cosmwasm-stargate/src/cosmwasmclient.spec.ts +++ b/packages/cosmwasm-stargate/src/cosmwasmclient.spec.ts @@ -359,9 +359,9 @@ describe("CosmWasmClient", () => { const raw = await client.queryContractRaw(contract.address, configKey); assert(raw, "must get result"); expect(JSON.parse(fromAscii(raw))).toEqual({ - verifier: toBase64(Bech32.decode(contract.initMsg.verifier).data), - beneficiary: toBase64(Bech32.decode(contract.initMsg.beneficiary).data), - funder: toBase64(Bech32.decode(alice.address0).data), + verifier: contract.initMsg.verifier, + beneficiary: contract.initMsg.beneficiary, + funder: alice.address0, }); }); @@ -420,7 +420,7 @@ describe("CosmWasmClient", () => { const client = await CosmWasmClient.connect(wasmd.endpoint); await expectAsync(client.queryContractSmart(contract.address, { broken: {} })).toBeRejectedWithError( - /Error parsing into type hackatom::contract::QueryMsg: unknown variant/i, + /Error parsing into type hackatom::msg::QueryMsg: unknown variant/i, ); }); diff --git a/packages/cosmwasm-stargate/src/queries/wasm.spec.ts b/packages/cosmwasm-stargate/src/queries/wasm.spec.ts index e0f2dfc3..30a3ba2d 100644 --- a/packages/cosmwasm-stargate/src/queries/wasm.spec.ts +++ b/packages/cosmwasm-stargate/src/queries/wasm.spec.ts @@ -295,8 +295,8 @@ describe("WasmExtension", () => { const data = models[0]; expect(data.key).toEqual(hackatomConfigKey); const value = JSON.parse(fromAscii(data.value)); - expect(value.verifier).toMatch(base64Matcher); - expect(value.beneficiary).toMatch(base64Matcher); + expect(value.verifier).toMatch(bech32AddressMatcher); + expect(value.beneficiary).toMatch(bech32AddressMatcher); }); it("rejects for non-existent address", async () => { @@ -317,8 +317,8 @@ describe("WasmExtension", () => { const raw = await client.wasm.queryContractRaw(hackatomContractAddress, hackatomConfigKey); assert(raw.data, "must get result"); const model = JSON.parse(fromAscii(raw.data)); - expect(model.verifier).toMatch(base64Matcher); - expect(model.beneficiary).toMatch(base64Matcher); + expect(model.verifier).toMatch(bech32AddressMatcher); + expect(model.beneficiary).toMatch(bech32AddressMatcher); }); it("returns empty for missing key", async () => { @@ -356,7 +356,7 @@ describe("WasmExtension", () => { const request = { nosuchkey: {} }; await expectAsync( client.wasm.queryContractSmart(hackatomContractAddress, request), - ).toBeRejectedWithError(/Error parsing into type hackatom::contract::QueryMsg: unknown variant/i); + ).toBeRejectedWithError(/Error parsing into type hackatom::msg::QueryMsg: unknown variant/i); }); it("throws for non-existent address", async () => { diff --git a/packages/cosmwasm-stargate/src/testutils.spec.ts b/packages/cosmwasm-stargate/src/testutils.spec.ts index a6de5881..d7dec31b 100644 --- a/packages/cosmwasm-stargate/src/testutils.spec.ts +++ b/packages/cosmwasm-stargate/src/testutils.spec.ts @@ -90,21 +90,21 @@ export const validator = { * `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: "AoSRL8/aA1oDkHPd0IMtLpozhGdgFafzMCKmmOQ0olJn", + type: "/cosmos.crypto.secp256k1.PubKey", + key: "AjOB0SSyyLVBcOe0GK0TuLmXlCVWY/h8cnhKvwbnbdII", }, /** * 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", + delegatorAddress: "wasm1tjgue6r5kqj5dets24pwaa9u7wuzucpwuva0rv", /** * 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", + validatorAddress: "wasmvaloper1tjgue6r5kqj5dets24pwaa9u7wuzucpwfsgndk", accountNumber: 0, sequence: 1, }; @@ -114,7 +114,7 @@ export const deployedHackatom = { codeId: 1, source: "https://crates.io/api/v1/crates/hackatom/not-yet-released/download", builder: "cosmwasm/rust-optimizer:0.10.8", - checksum: "08537c4f191980bc835f08ecb9077bb60df1097c1c0793312e0f21cbfca868d2", + checksum: "3da31e1978e492d041a60905319f454f21b381beac274d07081aee390d0a63d7", instances: [ { beneficiary: alice.address0,