Update backend and contracts

This commit is contained in:
Simon Warta 2021-08-02 11:21:57 +02:00
parent 737c5c7ac9
commit b87358f237
12 changed files with 35 additions and 30 deletions

View File

@ -309,12 +309,12 @@ describe("CosmWasmClient", () => {
it("works for instance with IBC port ID", async () => {
pendingWithoutWasmd();
const client = await CosmWasmClient.connect(wasmd.endpoint);
const contract = await client.getContract(deployedIbcReflect.instances[0]);
const contract = await client.getContract(deployedIbcReflect.instances[0].address);
expect(contract).toEqual(
jasmine.objectContaining({
address: deployedIbcReflect.instances[0],
address: deployedIbcReflect.instances[0].address,
codeId: deployedIbcReflect.codeId,
ibcPortId: "wasm.wasm1vjecguu37pmd577339wrdp208ddzymku8yy0te",
ibcPortId: deployedIbcReflect.instances[0].ibcPortId,
}),
);
});

View File

@ -151,7 +151,7 @@ describe("WasmExtension", () => {
assertIsBroadcastTxSuccess(instantiateResult);
hackatomContractAddress = JSON.parse(instantiateResult.rawLog!)[0]
.events.find((event: any) => event.type === "message")
.attributes.find((attribute: any) => attribute.key === "contract_address").value;
.attributes.find((attribute: any) => attribute.key === "_contract_address").value;
}
});
@ -204,7 +204,7 @@ describe("WasmExtension", () => {
assertIsBroadcastTxSuccess(result);
const myAddress = JSON.parse(result.rawLog!)[0]
.events.find((event: any) => event.type === "message")
.attributes!.find((attribute: any) => attribute.key === "contract_address").value;
.attributes!.find((attribute: any) => attribute.key === "_contract_address").value;
const { contracts: newContracts } = await client.wasm.listContractsByCodeId(hackatomCodeId);
assert(newContracts);
@ -248,7 +248,7 @@ describe("WasmExtension", () => {
const myAddress = JSON.parse(result.rawLog!)[0]
.events.find((event: any) => event.type === "message")
.attributes!.find((attribute: any) => attribute.key === "contract_address").value;
.attributes!.find((attribute: any) => attribute.key === "_contract_address").value;
const history = await client.wasm.getContractCodeHistory(myAddress);
assert(history.entries);
@ -393,7 +393,7 @@ describe("WasmExtension", () => {
const result = await instantiateContract(wallet, codeId, beneficiaryAddress, funds);
assertIsBroadcastTxSuccess(result);
const parsedLogs = logs.parseLogs(logs.parseRawLog(result.rawLog));
const contractAddressAttr = logs.findAttribute(parsedLogs, "message", "contract_address");
const contractAddressAttr = logs.findAttribute(parsedLogs, "message", "_contract_address");
contractAddress = contractAddressAttr.value;
const amountAttr = logs.findAttribute(parsedLogs, "transfer", "amount");
expect(amountAttr.value).toEqual("1234ucosm,321ustake");

View File

@ -253,7 +253,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
throw new Error(createBroadcastTxErrorMessage(result));
}
const parsedLogs = logs.parseRawLog(result.rawLog);
const contractAddressAttr = logs.findAttribute(parsedLogs, "message", "contract_address");
const contractAddressAttr = logs.findAttribute(parsedLogs, "message", "_contract_address");
return {
contractAddress: contractAddressAttr.value,
logs: parsedLogs,

File diff suppressed because one or more lines are too long

View File

@ -118,21 +118,21 @@ export const validator = {
/** Deployed as part of scripts/wasmd/init.sh */
export const deployedHackatom = {
codeId: 1,
checksum: "a32acdcfe15a2b3c8ba6963cf1e4ab63347725cc35a0f2434696dd492d63fb5f",
checksum: "841f5aa187a26018fee0f3398ecba404b3367af03f71e2b938bdc433328e14e9",
instances: [
{
beneficiary: alice.address0,
address: "wasm18vd8fpwxzck93qlwghaj6arh4p7c5n89k7fvsl",
address: "wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujgqwg3",
label: "From deploy_hackatom.js (0)",
},
{
beneficiary: alice.address1,
address: "wasm1hqrdl6wstt8qzshwc6mrumpjk9338k0lffu40x",
address: "wasm1suhgf5svhu4usrurvxzlgn54ksxmn8glszahxx",
label: "From deploy_hackatom.js (1)",
},
{
beneficiary: alice.address2,
address: "wasm18r5szma8hm93pvx6lwpjwyxruw27e0k5kjkyan",
address: "wasm1yyca08xqdgvjz0psg56z67ejh9xms6l49ntww0",
label: "From deploy_hackatom.js (2)",
},
],
@ -141,7 +141,12 @@ export const deployedHackatom = {
/** Deployed as part of scripts/wasmd/init.sh */
export const deployedIbcReflect = {
codeId: 2,
instances: ["wasm1vjecguu37pmd577339wrdp208ddzymku8yy0te"],
instances: [
{
address: "wasm1aakfpghcanxtc45gpqlx8j3rq0zcpyf4duy76f",
ibcPortId: "wasm.wasm1aakfpghcanxtc45gpqlx8j3rq0zcpyf4duy76f",
},
],
};
/** Deployed as part of scripts/wasmd/init.sh */

View File

@ -1,4 +1,4 @@
775f9f8fe7d2ca1ac33ec47799e9b8fd25aa1bf3cf97961f49f091b99e62f85b cw1_subkeys.wasm
3e3ea92c4ec35d90aa0bef344bdb0a94939120fce57265d5ff81bf8e8caec7e9 cw3_fixed_multisig.wasm
a32acdcfe15a2b3c8ba6963cf1e4ab63347725cc35a0f2434696dd492d63fb5f hackatom.wasm
089598e3cab468aff26233bc7363c713529124a0f7fd50320461cb58881a2da7 ibc_reflect.wasm
37f868eda7a723a769f6ff77cc27435455c3cff7b14481a114895d3d93cf8326 cw1_subkeys.wasm
203ceb9ffa61fdcb34b859a4d1249bec517112ecbaf9a9092b3787dc8199dde6 cw3_fixed_multisig.wasm
841f5aa187a26018fee0f3398ecba404b3367af03f71e2b938bdc433328e14e9 hackatom.wasm
70ec2710cd406f6496f165ca4939f921da5b95e708bd82e732dd790c1e8288a4 ibc_reflect.wasm

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

Binary file not shown.

Binary file not shown.

View File

@ -2,8 +2,8 @@
# This must get from 2-3 different repos, fix the versions here:
COSMWASM_VERSION="v0.14.0"
PLUS_VERSION="v0.6.0"
COSMWASM_VERSION="v0.16.0-rc5"
PLUS_VERSION="v0.8.0-rc1"
curl -L -O "https://github.com/CosmWasm/cosmwasm/releases/download/${COSMWASM_VERSION}/hackatom.wasm"
curl -L -O "https://github.com/CosmWasm/cosmwasm/releases/download/${COSMWASM_VERSION}/ibc_reflect.wasm"

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

Binary file not shown.

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

Binary file not shown.

View File

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