Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update wasmd to v0.31.0 #NTRN-438 #56

Merged
merged 86 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
52ecb85
Close test dbs
alpe Nov 29, 2022
f7be3ba
fix: sort coins in ConvertWasmCoinsToSdkCoins
apollo-sturdy Dec 2, 2022
bc00a6b
Add proposal instantiate 2 (#1106)
GNaD13 Dec 2, 2022
c5a7e5e
Merge pull request #1113 from CosmWasm/close-test-dbs
alpe Dec 5, 2022
ef12d4b
Merge pull request #1117 from apollo-sturdy/main
alpe Dec 5, 2022
299d422
Enable key name usage for admin (#1103)
pinosu Dec 6, 2022
c5abd33
Add gov proposal simulations (#1107)
pinosu Dec 9, 2022
f3ebd92
Remove genesis msgs (#1104)
pinosu Dec 9, 2022
e7b0a53
Bump actions/checkout from 3.1.0 to 3.2.0
dependabot[bot] Dec 13, 2022
effe21c
Merge pull request #1123 from CosmWasm/dependabot/github_actions/acti…
alpe Dec 13, 2022
b8c5724
Bump bufbuild/buf-setup-action from 1.9.0 to 1.10.0 (#1124)
dependabot[bot] Dec 16, 2022
cb6b854
add proposal annotations
pyramation Dec 18, 2022
204db58
Update changelog for v0.30.0
alpe Dec 19, 2022
0084796
Merge pull request #1133 from CosmWasm/changelogv030b
alpe Dec 19, 2022
db566a2
Merge pull request #1131 from cosmology-tech/main
alpe Dec 20, 2022
14c2daa
Add UpdateInstantiateConfig command (#1121)
pinosu Dec 20, 2022
3ab7e76
Update config.yml
faddat Dec 21, 2022
547d3c1
Merge pull request #1135 from faddat/patch-8
alpe Dec 22, 2022
ca0f545
Setup feature branch support (#1137)
alpe Dec 22, 2022
8160dc6
Bump bufbuild/buf-setup-action from 1.10.0 to 1.11.0 (#1138)
dependabot[bot] Dec 23, 2022
0888758
Bump github.com/cosmos/cosmos-proto from 1.0.0-alpha8 to 1.0.0-beta.1…
dependabot[bot] Dec 23, 2022
b1b21d9
Bump actions/checkout from 3.2.0 to 3.3.0
dependabot[bot] Jan 6, 2023
1037cee
Merge pull request #1146 from CosmWasm/dependabot/github_actions/acti…
alpe Jan 6, 2023
558147d
Address cli behaviour on tx and query errors (#1125)
pinosu Jan 10, 2023
f490595
Bump bufbuild/buf-setup-action from 1.11.0 to 1.12.0
dependabot[bot] Jan 13, 2023
c386f32
Merge pull request #1151 from CosmWasm/dependabot/github_actions/bufb…
alpe Jan 13, 2023
38d466a
fix msg format in EVENTS.md
llllllluc Jan 22, 2023
962d550
Merge pull request #1167 from llllllluc/main
alpe Jan 23, 2023
a925a9e
Better to sdk coin convertion (#1164)
alpe Jan 24, 2023
957b38e
Integrate wasmvm v1.2.0 (#1161)
alpe Jan 25, 2023
7382e97
Bump cosmos-sdk version
alpe Jan 24, 2023
b6aaac0
Use informal fork for tendermint
alpe Jan 24, 2023
8991633
Disallow only address permission (#1163)
alpe Jan 25, 2023
f9fa04e
Merge pull request #1171 from CosmWasm/sdk-upgrade04512
alpe Jan 26, 2023
d522e54
Bump ibc-go version; remove channel hack
alpe Jan 26, 2023
c7670fa
Merge pull request #1180 from CosmWasm/ibcgo_430
alpe Jan 26, 2023
ffa0e5e
Bump bufbuild/buf-setup-action from 1.12.0 to 1.13.0
dependabot[bot] Jan 27, 2023
c88b819
Fix typos
alpe Jan 27, 2023
2067e23
Merge pull request #1181 from CosmWasm/dependabot/github_actions/bufb…
alpe Jan 27, 2023
c9e7830
Emit events for setContractAdmin + setAccessConfig (#1179)
alpe Jan 27, 2023
8918e28
Move helper method out of generated file
alpe Jan 28, 2023
d348100
Run make proto-all
alpe Jan 28, 2023
de27e7f
Bump bufbuild/buf-setup-action from 1.13.0 to 1.13.1
dependabot[bot] Jan 30, 2023
0c719f7
Bump ica version
alpe Jan 30, 2023
327bb06
update interface proto annotations (#1156)
pyramation Jan 30, 2023
522bf50
Merge pull request #1189 from CosmWasm/move_method
alpe Jan 30, 2023
86dda23
Merge pull request #1192 from CosmWasm/ica_026
alpe Jan 30, 2023
96dcbea
Merge pull request #1191 from CosmWasm/dependabot/github_actions/bufb…
alpe Jan 30, 2023
88e01a9
Merge pull request #1185 from CosmWasm/fix_typos
alpe Jan 30, 2023
2ccffed
list-contract-by-code bugfix
nik-suri Feb 13, 2023
fd03235
fix: stargate querier does not reset the state
dadamu Feb 23, 2023
6d8018a
test: add unit test
dadamu Feb 24, 2023
5c0c526
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#1211)
dependabot[bot] Mar 1, 2023
f3fc31c
Bump bufbuild/buf-setup-action from 1.13.1 to 1.14.0 (#1200)
dependabot[bot] Mar 1, 2023
768e092
Bump SDK version to v0.45.14
alpe Mar 2, 2023
40b4e6e
Merge pull request #1201 from wormhole-foundation/list-contract-code-…
alpe Mar 2, 2023
e5fab3d
Bump bufbuild/buf-setup-action from 1.14.0 to 1.15.0
dependabot[bot] Mar 2, 2023
dc9a920
Merge pull request #1208 from dadamu/paul/fix-stargate-querier
alpe Mar 2, 2023
257552f
Merge pull request #1221 from CosmWasm/sdk4514
alpe Mar 2, 2023
5ca322f
Bump github.com/cosmos/cosmos-proto from 1.0.0-beta.1 to 1.0.0-beta.2
dependabot[bot] Mar 2, 2023
8a20779
Add Windows client support (#1197)
pinosu Mar 3, 2023
ab35207
Merge pull request #1222 from CosmWasm/dependabot/github_actions/bufb…
alpe Mar 3, 2023
0c01842
Merge pull request #1205 from CosmWasm/dependabot/go_modules/github.c…
alpe Mar 3, 2023
c225c86
Bump github.com/cosmos/gogoproto from 1.4.3 to 1.4.6
dependabot[bot] Mar 3, 2023
85cf161
Configure sonarcloud analysis
alpe Nov 22, 2022
32aebb8
Merge pull request #1204 from CosmWasm/dependabot/go_modules/github.c…
alpe Mar 3, 2023
de09c7f
Rename windows client binary
alpe Mar 3, 2023
4f1c57f
Return IBC packet sequence number (#1225)
pinosu Mar 6, 2023
3160256
Merge pull request #1231 from CosmWasm/315_rename
alpe Mar 6, 2023
a52e604
Test rust panic for regression
alpe Mar 6, 2023
cb17a41
Merge pull request #1236 from CosmWasm/rust_panic
alpe Mar 6, 2023
1a8019b
Fix client checksum verification (#1234)
alpe Mar 6, 2023
a52bf7e
Merge pull request #1105 from CosmWasm/sonarcloud
alpe Mar 6, 2023
b64fa07
Make `CaptureIbcEvents` in ibctesting public.
0xekez Mar 9, 2023
730ea5a
Bump bufbuild/buf-setup-action from 1.15.0 to 1.15.1
dependabot[bot] Mar 9, 2023
753e059
Merge pull request #1251 from CosmWasm/dependabot/github_actions/bufb…
alpe Mar 9, 2023
90739a9
Merge pull request #1248 from 0xekez/main
alpe Mar 9, 2023
850f901
Upgrade to wasmvm 1.2.1 (#1245)
alpe Mar 9, 2023
bc0e817
Add changelog for v0.31.0 (#1188)
alpe Mar 13, 2023
dbf7e26
Merge tag 'v0.31.0' into HEAD
faddat Mar 21, 2023
04b385c
Merge branch 'v0.31.0-for-neutron' of github.com:notional-labs/wasmd …
swelf19 Apr 13, 2023
3eeba1b
Merge branch 'notional-labs-v0.31.0-for-neutron' into upd/neutron-0.31
swelf19 Apr 13, 2023
004da14
Revert "Remove genesis msgs (#1104)"
swelf19 Apr 13, 2023
1930903
remove hasContract info check in execute subcommand for gen-wasm-mess…
pr0n00gler Apr 5, 2023
6f50535
remove unused hasContract function
pr0n00gler Apr 6, 2023
0547db5
remove hasAccountBalance check
pr0n00gler Apr 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

lint:
docker:
- image: golangci/golangci-lint:v1.46.2
- image: golangci/golangci-lint:v1.50.1
steps:
- checkout
- run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.3.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/proto-buf-publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: bufbuild/buf-setup-action@v1.9.0
- uses: actions/checkout@v3.3.0
- uses: bufbuild/buf-setup-action@v1.15.1

# lint checks
- uses: bufbuild/buf-lint-action@v1
Expand Down
14 changes: 14 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
queue_rules:
- name: default
conditions:
- "#approved-reviews-by>0"

pull_request_rules:
- name: backport patches to sdk47 feature branch
conditions:
- base=main
- label=backport/sdk47-dev
actions:
backport:
branches:
- develop_sdk47
5 changes: 5 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# see https://docs.sonarcloud.io/advanced-setup/automatic-analysis/
sonar.sources=.
sonar.exclusions=**/tests/**,**/benchmarks/**,**/ibctesting/**,**/wasmtesting/**,**/simulation/**,**/testdata/**,**/*.pb.go,**/*.pb.gw.go,**/*.test.go,**/test_*.go,**/*_fixtures.go,**/mock_*.go,**/*_mock.go

sonar.tests=.
44 changes: 41 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,49 @@

## [Unreleased](https://github.com/CosmWasm/wasmd/tree/HEAD)

[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.30.0...HEAD)
[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.31.0...HEAD)

## [v0.31.0](https://github.com/CosmWasm/wasmd/tree/v0.31.0) (2023-03-13)

[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.30.0...v0.31.0)

- Upgrade wasmvm to v1.2.1 [\#1245](https://github.com/CosmWasm/wasmd/pull/1245), see [wasmvm v1.2.1](https://github.com/CosmWasm/wasmvm/releases/tag/v1.2.1)
- Fix checksum check for zipped gov store proposals [\#1232](https://github.com/CosmWasm/wasmd/issues/1232)
- Return IBC packet sequence number in the handler plugin [\#1154](https://github.com/CosmWasm/wasmd/issues/1154)
- Add Windows client-side support [\#1169](https://github.com/CosmWasm/wasmd/issues/1169)
- Upgrade Cosmos-SDK to [v0.45.14](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.14)
- Add missing events for admin-related methods [\#1173](https://github.com/CosmWasm/wasmd/issues/1173)
- Disallow storing new codes with ACCESS\_TYPE\_ONLY\_ADDRESS [\#1144](https://github.com/CosmWasm/wasmd/issues/1144)
- Support builds without CGO [\#1129](https://github.com/CosmWasm/wasmd/issues/1129)
- Wasmd does not sort coins when converting from CosmWasm Coins to SDK
Coins [\#1118](https://github.com/CosmWasm/wasmd/issues/1118)
- Add InstantiateContract2Proposal [\#1062](https://github.com/CosmWasm/wasmd/issues/1062)
- CLI: Allow using key name for --admin [\#1039](https://github.com/CosmWasm/wasmd/issues/1039)
- More gov proposal simulations [\#1107](https://github.com/CosmWasm/wasmd/pull/1107)
- Remove genesis messages [\#987](https://github.com/CosmWasm/wasmd/issues/987)
- Update instantiate config command [\#843](https://github.com/CosmWasm/wasmd/issues/843)
- Upgrade IBC-go to [v4.3.0](https://github.com/cosmos/ibc-go/releases/tag/v4.3.0) [\#1180](https://github.com/CosmWasm/wasmd/pull/1180)
- Upgrade ICA to [v0.2.6](https://github.com/cosmos/interchain-accounts-demo/releases/tag/v0.2.6) [\#1192](https://github.com/CosmWasm/wasmd/pull/1192)

### Notable changes:
- Genesis messages were deprecated before and are removed with this release
- New `cosmwasm_1_2` [capability](https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md) to
enable new features:
- Support for `gov.MsgVoteWeighted`, `wasm.Instantiate2` messages
- code info query for contracts
- See "State Machine Breaking" changes in [IBC-go](https://github.com/cosmos/ibc-go/releases/tag/v4.3.0)
- See notes about the "store fix" in [Cosmos-sdk](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.12)
- Wasmd can now be used as a library without CGO
- Wasmd client can now be used on Windows

### Migration notes:
- This release does not include any state migrations but breaking changes that require a coordinated chain upgrade

## [v0.30.0](https://github.com/CosmWasm/wasmd/tree/v0.30.0) (2022-12-02)

[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.29.2...v0.30.0)
* Provide source, builder and codehash information in store code proposal message[\#1072](https://github.com/CosmWasm/wasmd/pull/1072)
- Provide source, builder and codehash information in store code proposal message[\#1072](https://github.com/CosmWasm/wasmd/pull/1072)
- Add new CLI query/ endpoint to get contracts by creator address [\#998](https://github.com/CosmWasm/wasmd/pull/998)
- Upgrade to Go v1.19 [\#1044](https://github.com/CosmWasm/wasmd/pull/1044)
- Upgrade to Cosmos-sdk to v0.45.11 [/#1096](https://github.com/CosmWasm/wasmd/pull/1096/)
- Upgrade to IBC v4.2.0 with interchain-accounts v0.2.4 [\#1088](https://github.com/CosmWasm/wasmd/pull/1088)
Expand All @@ -20,9 +57,10 @@
- IBC fee middleware is setup in `app.go`. Please note that it can be enabled with new channels only. A nice read is this [article](https://medium.com/the-interchain-foundation/ibc-relaying-as-a-service-the-in-protocol-incentivization-story-2c008861a957).
- Authz for wasm contracts can be granted via `wasmd tx wasm grant` and executed via `wasmd tx authz exec` command
- Go v1.19 required to prevent a mixed chain setup with older versions. Just to be on the safe side.
- Store code proposal types have new metadata fields added that can help to build client side tooling to verify the wasm contract in the proposal
- Store code proposal types have new metadata fields added that can help to build client side tooling to verify the wasm contract in the proposal

### Migration notes:
- The wasmd module version was bumped and a [state migration](https://github.com/CosmWasm/wasmd/pull/1021/files#diff-4357c2137e24f583b8f852cc210320cb71af18e2fdfb8c21b55d8667cfe54690R20) registered.
- See ibc-go [migration notes](https://github.com/cosmos/ibc-go/blob/v4.2.0/docs/migrations)
- See interchain-accounts [`MsgRegisterAccount.Version` field](https://github.com/cosmos/interchain-accounts-demo/compare/v0.1.0...v0.2.4#diff-ac8bca25810de6d3eef95f74fc9acf2223f3687822e6227b584e0d3b40db6566). Full diff [v0.1.0 to v0.2.4](https://github.com/cosmos/interchain-accounts-demo/compare/v0.1.0...v0.2.4)

Expand Down
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ RUN apk add git

WORKDIR /code
COPY . /code/

# See https://github.com/CosmWasm/wasmvm/releases
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 9ecb037336bd56076573dc18c26631a9d2099a7f2b40dc04b6cae31ffb4c8f9a
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 6e4de7ba9bad4ae9679c7f9ecf7e283dd0160e71567c6a7be6ae47c81ebe7f32
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.2.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.2.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 86bc5fdc0f01201481c36e17cd3dfed6e9650d22e1c5c8983a5b78c231789ee0
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep a00700aa19f5bfe0f46290ddf69bf51eb03a6dfcd88b905e1081af2e42dbbafc

# Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc`
RUN cp /lib/libwasmvm_muslc.${arch}.a /lib/libwasmvm_muslc.a
Expand Down
40 changes: 20 additions & 20 deletions EVENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,34 +166,34 @@ sdk.NewEvent(
sdk.NewEvent(
"instantiate",
sdk.NewAttribute("code_id", fmt.Sprintf("%d", msg.CodeID)),
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
)

// Execute Contract
sdk.NewEvent(
"execute",
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
)

// Migrate Contract
sdk.NewEvent(
"migrate",
// Note: this is the new code id that is being migrated to
sdk.NewAttribute("code_id", fmt.Sprintf("%d", msg.CodeID)),
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
)

// Set new admin
sdk.NewEvent(
"update_admin",
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
sdk.NewAttribute("admin", msg.NewAdmin),
)

// Clear admin
sdk.NewEvent(
"clear_admin",
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
)

// Pin Code
Expand All @@ -211,7 +211,7 @@ sdk.NewEvent(
// Emitted when processing a submessage reply
sdk.NewEvent(
"reply",
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
// If the submessage was successful, and reply is processing the success case
sdk.NewAttribute("mode", "handle_success"),
// If the submessage returned an error that was "caught" by the reply block
Expand All @@ -221,12 +221,12 @@ sdk.NewEvent(
// Emitted when handling sudo
sdk.NewEvent(
"sudo",
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
)
```

Note that every event that affects a contract (not store code, pin or unpin) will return the contract_addr as
`_contract_addr`. The events that are related to a particular wasm code (store code, instantiate, pin, unpin, and migrate)
Note that every event that affects a contract (not store code, pin or unpin) will return the contract_address as
`_contract_address`. The events that are related to a particular wasm code (store code, instantiate, pin, unpin, and migrate)
will emit that as `code_id`. All attributes prefixed with `_` are reserved and may not be emitted by a smart contract,
so we use the underscore prefix consistently with attributes that may be injected into custom events.

Expand All @@ -247,14 +247,14 @@ an eg. `transfer` event from the bank module. The output here may look like:
```go
sdk.NewEvent(
"wasm-promote"
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
sdk.NewAttribute("batch_id", "6"),
sdk.NewAttribute("address", "cosmos1234567"),
sdk.NewAttribute("address", "cosmos1765432"),
),
sdk.NewEvent(
"wasm-promote"
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
sdk.NewAttribute("batch_id", "7"),
sdk.NewAttribute("address", "cosmos19875632"),
)
Expand All @@ -267,7 +267,7 @@ more than flattening them all into one event like:
```go
sdk.NewEvent(
"wasm"
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
sdk.NewAttribute("action", "promote"),
sdk.NewAttribute("batch_id", "6"),
sdk.NewAttribute("address", "cosmos1234567"),
Expand Down Expand Up @@ -338,36 +338,36 @@ sdk.NewEvent(
// top-level exection call
sdk.NewEvent(
"execute",
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
),
sdk.NewEvent(
"wasm",
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
sdk.NewAttribute("custom", "from contract"),
),

// instantiating contract (first dipatched message)
sdk.NewEvent(
"instantiate",
sdk.NewAttribute("code_id", fmt.Sprintf("%d", msg.CodeID)),
sdk.NewAttribute("_contract_addr", newContract.String()),
sdk.NewAttribute("_contract_address", newContract.String()),
)
// didn't emit any attributes, but one event
sdk.NewEvent(
"wasm-custom",
sdk.NewAttribute("_contract_addr", newContract.String()),
sdk.NewAttribute("_contract_address", newContract.String()),
sdk.NewAttribute("foobar", "baz"),
),

// handling the reply (this doesn't emit a message event as it never goes through the message server)
sdk.NewEvent(
"reply",
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
sdk.NewAttribute("mode", "handle_success"),
),
sdk.NewEvent(
"wasm",
sdk.NewAttribute("_contract_addr", contractAddr.String()),
sdk.NewAttribute("_contract_address", contractAddr.String()),
sdk.NewAttribute("custom", "from contract"),
),

Expand All @@ -389,11 +389,11 @@ field, and the following in the `events` field:
sdk.NewEvent(
"instantiate",
sdk.NewAttribute("code_id", fmt.Sprintf("%d", msg.CodeID)),
sdk.NewAttribute("_contract_addr", newContract.String()),
sdk.NewAttribute("_contract_address", newContract.String()),
)
sdk.NewEvent(
"wasm-custom",
sdk.NewAttribute("_contract_addr", newContract.String()),
sdk.NewAttribute("_contract_address", newContract.String()),
sdk.NewAttribute("foobar", "baz"),
),
```
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,15 @@ all: install lint test

build: go.sum
ifeq ($(OS),Windows_NT)
$(error wasmd server not supported. Use "make build-windows-client" for client)
exit 1
else
go build -mod=readonly $(BUILD_FLAGS) -o build/wasmd ./cmd/wasmd
endif

build-windows-client: go.sum
GOOS=windows GOARCH=amd64 go build -mod=readonly $(BUILD_FLAGS) -o build/wasmd.exe ./cmd/wasmd

build-contract-tests-hooks:
ifeq ($(OS),Windows_NT)
go build -mod=readonly $(BUILD_FLAGS) -o build/contract_tests.exe ./cmd/contract_tests
Expand Down Expand Up @@ -193,4 +197,4 @@ proto-check-breaking:
.PHONY: all install install-debug \
go-mod-cache draw-deps clean build format \
test test-all test-build test-cover test-unit test-race \
test-sim-import-export \
test-sim-import-export build-windows-client \
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Wasm Zone

[![CircleCI](https://circleci.com/gh/CosmWasm/wasmd/tree/main.svg?style=shield)](https://circleci.com/gh/CosmWasm/wasmd/tree/main)
Expand Down Expand Up @@ -26,6 +27,7 @@ compatibility list:

| wasmd | wasmvm | cosmwasm-vm | cosmwasm-std |
|-------|--------------|-------------|--------------|
| 0.31 | v1.2.0 | | 1.0-1.2 |
| 0.30 | v1.1.0 | | 1.0-1.1 |
| 0.29 | v1.1.0 | | 1.0-1.1 |
| 0.28 | v1.0.0 | | 1.0-1.1 |
Expand Down Expand Up @@ -116,6 +118,7 @@ The protobuf files for this project are published automatically to the [buf repo

| wasmd version | buf tag |
|---------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| 0.31.x | [e0e5a6fa433449e695af692478c86fb5](https://buf.build/cosmwasm/wasmd/tree/e0e5a6fa433449e695af692478c86fb5:cosmwasm/wasm/v1) |
| 0.30.x | [6508ee062011440c907de6f5c40398ea](https://buf.build/cosmwasm/wasmd/tree/6508ee062011440c907de6f5c40398ea:cosmwasm/wasm/v1) |
| 0.29.x | [51931206dbe09529c1819a8a2863d291035a2549](https://buf.build/cosmwasm/wasmd/tree/51931206dbe09529c1819a8a2863d291035a2549:cosmwasm/wasm/v1) |

Expand Down
3 changes: 2 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,8 @@ func NewWasmApp(

// The last arguments can contain custom message handlers, and custom query handlers,
// if we want to allow any custom callbacks
availableCapabilities := "iterator,staking,stargate,cosmwasm_1_1"
// See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md
availableCapabilities := "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2"
app.WasmKeeper = wasm.NewKeeper(
appCodec,
keys[wasm.StoreKey],
Expand Down
16 changes: 11 additions & 5 deletions app/params/weights.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@ const (
DefaultWeightMsgClearAdmin int = 10
DefaultWeightMsgMigrateContract int = 50

DefaultWeightStoreCodeProposal int = 5
DefaultWeightInstantiateContractProposal int = 5
DefaultWeightUpdateAdminProposal int = 5
DefaultWeightExecuteContractProposal int = 5
DefaultWeightClearAdminProposal int = 5
DefaultWeightStoreCodeProposal int = 5
DefaultWeightInstantiateContractProposal int = 5
DefaultWeightUpdateAdminProposal int = 5
DefaultWeightExecuteContractProposal int = 5
DefaultWeightClearAdminProposal int = 5
DefaultWeightMigrateContractProposal int = 5
DefaultWeightSudoContractProposal int = 5
DefaultWeightPinCodesProposal int = 5
DefaultWeightUnpinCodesProposal int = 5
DefaultWeightUpdateInstantiateConfigProposal int = 5
DefaultWeightStoreAndInstantiateContractProposal int = 5
)
2 changes: 2 additions & 0 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ func setup(t testing.TB, withGenesis bool, invCheckPeriod uint, opts ...wasm.Opt
snapshotDir := filepath.Join(nodeHome, "data", "snapshots")
snapshotDB, err := sdk.NewLevelDB("metadata", snapshotDir)
require.NoError(t, err)
t.Cleanup(func() { snapshotDB.Close() })
snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir)
require.NoError(t, err)
baseAppOpts := []func(*bam.BaseApp){bam.SetSnapshotStore(snapshotStore), bam.SetSnapshotKeepRecent(2)}
db := dbm.NewMemDB()
t.Cleanup(func() { db.Close() })
app := NewWasmApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, nodeHome, invCheckPeriod, MakeEncodingConfig(), wasm.EnableAllProposals, EmptyBaseAppOptions{}, opts, baseAppOpts...)
if withGenesis {
return app, NewDefaultGenesisState()
Expand Down
28 changes: 0 additions & 28 deletions contrib/local/00-genesis.sh

This file was deleted.

Loading