Merge pull request #901 from cosmos/upgrade-wasmd-to-0.20

Upgrade wasmd to 0.20 for testing @cosmjs/cosmwasm-stargate
This commit is contained in:
Simon Warta 2021-10-12 14:29:43 +02:00 committed by GitHub
commit 2d1600b4f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 23 additions and 19 deletions

View File

@ -6,11 +6,11 @@ An SDK to build CosmWasm clients.
## Compatibility ## Compatibility
| CosmWasm | x/wasm | @cosmjs/cosmwasm-stargate | | CosmWasm | x/wasm | @cosmjs/cosmwasm-stargate |
| -------- | --------- | ------------------------- | | --------------- | --------- | ------------------------- |
| 0.16 | 0.18 | `^0.26.0` | | 0.16-1.0.0-beta | 0.18-0.20 | `^0.26.0` |
| 0.14 | 0.16 | `^0.25.0` | | 0.14 | 0.16 | `^0.25.0` |
| 0.13 | 0.14-0.15 | `^0.24.0` | | 0.13 | 0.14-0.15 | `^0.24.0` |
## Development ## Development
@ -18,7 +18,7 @@ Updating Hackatom development contract in `src/testdata/contract.json`:
```sh ```sh
cd packages/cosmwasm-stargate cd packages/cosmwasm-stargate
export HACKATOM_URL=https://github.com/CosmWasm/cosmwasm/releases/download/v0.14.0/hackatom.wasm export HACKATOM_URL=https://github.com/CosmWasm/cosmwasm/releases/download/v1.0.0-beta/hackatom.wasm
echo "{\"// source\": \"$HACKATOM_URL\", \"data\": \"$(curl -sS --location $HACKATOM_URL | base64 | tr -d '[:space:]')\" }" | jq > src/testdata/contract.json echo "{\"// source\": \"$HACKATOM_URL\", \"data\": \"$(curl -sS --location $HACKATOM_URL | base64 | tr -d '[:space:]')\" }" | jq > src/testdata/contract.json
``` ```

View File

@ -271,9 +271,13 @@ describe("CosmWasmClient", () => {
it("works", async () => { it("works", async () => {
pendingWithoutWasmd(); pendingWithoutWasmd();
const client = await CosmWasmClient.connect(wasmd.endpoint); const client = await CosmWasmClient.connect(wasmd.endpoint);
const result = await client.getContracts(1); const result = await client.getContracts(deployedHackatom.codeId);
const expectedAddresses = deployedHackatom.instances.map((info) => info.address); const expectedAddresses = deployedHackatom.instances.map((info) => info.address);
expect(result).toEqual(expectedAddresses);
// Test first 3 instances we get from scripts/wasmd/init.sh. There may me more than that in the result.
expect(result[0]).toEqual(expectedAddresses[0]);
expect(result[1]).toEqual(expectedAddresses[1]);
expect(result[2]).toEqual(expectedAddresses[2]);
}); });
}); });

File diff suppressed because one or more lines are too long

View File

@ -118,7 +118,7 @@ export const validator = {
/** Deployed as part of scripts/wasmd/init.sh */ /** Deployed as part of scripts/wasmd/init.sh */
export const deployedHackatom = { export const deployedHackatom = {
codeId: 1, codeId: 1,
checksum: "716a97b1c086e0d7769ae7887edaa0e34faba2d7b8cda07f741f9fbf95706e8c", checksum: "13a1fc994cc6d1c81b746ee0c0ff6f90043875e0bf1d9be6b7d779fc978dc2a5",
instances: [ instances: [
{ {
beneficiary: alice.address0, beneficiary: alice.address0,

View File

@ -1,2 +1,2 @@
716a97b1c086e0d7769ae7887edaa0e34faba2d7b8cda07f741f9fbf95706e8c hackatom.wasm 13a1fc994cc6d1c81b746ee0c0ff6f90043875e0bf1d9be6b7d779fc978dc2a5 hackatom.wasm
0a127c6e04c8aad95dd3d50177e95b6116606546f0a4fc894ba82a29ce3b6fc1 ibc_reflect.wasm 1da6c16de2cbaf7ad8cbb66f0925ba33f5c278cb2491762d04658c1480ea229b ibc_reflect.wasm

View File

@ -2,7 +2,7 @@
# This must get from 2-3 different repos, fix the versions here: # This must get from 2-3 different repos, fix the versions here:
COSMWASM_VERSION="v0.16.0" COSMWASM_VERSION="v1.0.0-beta"
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}/hackatom.wasm"
curl -sS -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}/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 # Choose from https://hub.docker.com/r/cosmwasm/wasmd/tags
REPOSITORY="cosmwasm/wasmd" REPOSITORY="cosmwasm/wasmd"
VERSION="v0.18.0" VERSION="v0.20.0"
CONTAINER_NAME="wasmd" CONTAINER_NAME="wasmd"