Merge pull request #866 from cosmos/wasmd-v0.18.0-rc2
Upgrade all Cosmwasm 0.16 / wasmd 0.18 components
This commit is contained in:
commit
c35c8242d6
@ -141,16 +141,16 @@ describe("WasmExtension", () => {
|
||||
const result = await uploadContract(wallet, hackatom);
|
||||
assertIsBroadcastTxSuccess(result);
|
||||
hackatomCodeId = Number.parseInt(
|
||||
JSON.parse(result.rawLog!)[0].events[0].attributes.find(
|
||||
(attribute: any) => attribute.key === "code_id",
|
||||
).value,
|
||||
JSON.parse(result.rawLog!)[0]
|
||||
.events.find((event: any) => event.type === "store_code")
|
||||
.attributes.find((attribute: any) => attribute.key === "code_id").value,
|
||||
10,
|
||||
);
|
||||
|
||||
const instantiateResult = await instantiateContract(wallet, hackatomCodeId, makeRandomAddress());
|
||||
assertIsBroadcastTxSuccess(instantiateResult);
|
||||
hackatomContractAddress = JSON.parse(instantiateResult.rawLog!)[0]
|
||||
.events.find((event: any) => event.type === "message")
|
||||
.events.find((event: any) => event.type === "instantiate")
|
||||
.attributes.find((attribute: any) => attribute.key === "_contract_address").value;
|
||||
}
|
||||
});
|
||||
@ -203,7 +203,7 @@ describe("WasmExtension", () => {
|
||||
const result = await instantiateContract(wallet, hackatomCodeId, beneficiaryAddress, funds);
|
||||
assertIsBroadcastTxSuccess(result);
|
||||
const myAddress = JSON.parse(result.rawLog!)[0]
|
||||
.events.find((event: any) => event.type === "message")
|
||||
.events.find((event: any) => event.type === "instantiate")
|
||||
.attributes!.find((attribute: any) => attribute.key === "_contract_address").value;
|
||||
|
||||
const { contracts: newContracts } = await client.wasm.listContractsByCodeId(hackatomCodeId);
|
||||
@ -247,7 +247,7 @@ describe("WasmExtension", () => {
|
||||
assertIsBroadcastTxSuccess(result);
|
||||
|
||||
const myAddress = JSON.parse(result.rawLog!)[0]
|
||||
.events.find((event: any) => event.type === "message")
|
||||
.events.find((event: any) => event.type === "instantiate")
|
||||
.attributes!.find((attribute: any) => attribute.key === "_contract_address").value;
|
||||
|
||||
const history = await client.wasm.getContractCodeHistory(myAddress);
|
||||
@ -378,12 +378,12 @@ describe("WasmExtension", () => {
|
||||
const result = await uploadContract(wallet, getHackatom());
|
||||
assertIsBroadcastTxSuccess(result);
|
||||
const parsedLogs = logs.parseLogs(logs.parseRawLog(result.rawLog));
|
||||
const codeIdAttr = logs.findAttribute(parsedLogs, "message", "code_id");
|
||||
const codeIdAttr = logs.findAttribute(parsedLogs, "store_code", "code_id");
|
||||
codeId = Number.parseInt(codeIdAttr.value, 10);
|
||||
expect(codeId).toBeGreaterThanOrEqual(1);
|
||||
expect(codeId).toBeLessThanOrEqual(200);
|
||||
const actionAttr = logs.findAttribute(parsedLogs, "message", "action");
|
||||
expect(actionAttr.value).toEqual("store-code");
|
||||
const actionAttr = logs.findAttribute(parsedLogs, "message", "module");
|
||||
expect(actionAttr.value).toEqual("wasm");
|
||||
}
|
||||
|
||||
let contractAddress: string;
|
||||
@ -393,12 +393,12 @@ 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, "instantiate", "_contract_address");
|
||||
contractAddress = contractAddressAttr.value;
|
||||
const amountAttr = logs.findAttribute(parsedLogs, "transfer", "amount");
|
||||
expect(amountAttr.value).toEqual("1234ucosm,321ustake");
|
||||
const actionAttr = logs.findAttribute(parsedLogs, "message", "action");
|
||||
expect(actionAttr.value).toEqual("instantiate");
|
||||
const actionAttr = logs.findAttribute(parsedLogs, "message", "module");
|
||||
expect(actionAttr.value).toEqual("wasm");
|
||||
|
||||
const balanceUcosm = await client.bank.balance(contractAddress, "ucosm");
|
||||
expect(balanceUcosm).toEqual(funds[0]);
|
||||
|
||||
@ -217,7 +217,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
|
||||
throw new Error(createBroadcastTxErrorMessage(result));
|
||||
}
|
||||
const parsedLogs = logs.parseRawLog(result.rawLog);
|
||||
const codeIdAttr = logs.findAttribute(parsedLogs, "message", "code_id");
|
||||
const codeIdAttr = logs.findAttribute(parsedLogs, "store_code", "code_id");
|
||||
return {
|
||||
originalSize: wasmCode.length,
|
||||
originalChecksum: toHex(sha256(wasmCode)),
|
||||
@ -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, "instantiate", "_contract_address");
|
||||
return {
|
||||
contractAddress: contractAddressAttr.value,
|
||||
logs: parsedLogs,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -118,7 +118,7 @@ export const validator = {
|
||||
/** Deployed as part of scripts/wasmd/init.sh */
|
||||
export const deployedHackatom = {
|
||||
codeId: 1,
|
||||
checksum: "841f5aa187a26018fee0f3398ecba404b3367af03f71e2b938bdc433328e14e9",
|
||||
checksum: "716a97b1c086e0d7769ae7887edaa0e34faba2d7b8cda07f741f9fbf95706e8c",
|
||||
instances: [
|
||||
{
|
||||
beneficiary: alice.address0,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
37f868eda7a723a769f6ff77cc27435455c3cff7b14481a114895d3d93cf8326 cw1_subkeys.wasm
|
||||
203ceb9ffa61fdcb34b859a4d1249bec517112ecbaf9a9092b3787dc8199dde6 cw3_fixed_multisig.wasm
|
||||
841f5aa187a26018fee0f3398ecba404b3367af03f71e2b938bdc433328e14e9 hackatom.wasm
|
||||
70ec2710cd406f6496f165ca4939f921da5b95e708bd82e732dd790c1e8288a4 ibc_reflect.wasm
|
||||
716a97b1c086e0d7769ae7887edaa0e34faba2d7b8cda07f741f9fbf95706e8c hackatom.wasm
|
||||
0a127c6e04c8aad95dd3d50177e95b6116606546f0a4fc894ba82a29ce3b6fc1 ibc_reflect.wasm
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
|
||||
# This must get from 2-3 different repos, fix the versions here:
|
||||
|
||||
COSMWASM_VERSION="v0.16.0-rc5"
|
||||
COSMWASM_VERSION="v0.16.0"
|
||||
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"
|
||||
curl -sS -L -O "https://github.com/CosmWasm/cosmwasm/releases/download/${COSMWASM_VERSION}/hackatom.wasm"
|
||||
curl -sS -L -O "https://github.com/CosmWasm/cosmwasm/releases/download/${COSMWASM_VERSION}/ibc_reflect.wasm"
|
||||
|
||||
curl -L -O "https://github.com/CosmWasm/cosmwasm-plus/releases/download/${PLUS_VERSION}/cw1_subkeys.wasm"
|
||||
curl -L -O "https://github.com/CosmWasm/cosmwasm-plus/releases/download/${PLUS_VERSION}/cw3_fixed_multisig.wasm"
|
||||
curl -sS -L -O "https://github.com/CosmWasm/cosmwasm-plus/releases/download/${PLUS_VERSION}/cw1_subkeys.wasm"
|
||||
curl -sS -L -O "https://github.com/CosmWasm/cosmwasm-plus/releases/download/${PLUS_VERSION}/cw3_fixed_multisig.wasm"
|
||||
|
||||
sha256sum *.wasm >checksums.sha256
|
||||
|
||||
BIN
scripts/wasmd/contracts/hackatom.wasm
(Stored with Git LFS)
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)
BIN
scripts/wasmd/contracts/ibc_reflect.wasm
(Stored with Git LFS)
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
# Choose from https://hub.docker.com/r/cosmwasm/wasmd/tags
|
||||
REPOSITORY="cosmwasm/wasmd"
|
||||
VERSION="v0.18.0-rc1"
|
||||
VERSION="v0.18.0"
|
||||
|
||||
CONTAINER_NAME="wasmd"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user