diff --git a/Makefile b/Makefile index 93d3c6a049..564365c102 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,11 @@ COMMIT := $(shell git log -1 --format='%H') LEDGER_ENABLED ?= true SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g') +# for dockerized protobuf tools +PROTO_CONTAINER := cosmwasm/prototool-docker:latest +DOCKER_BUF := docker run --rm -v $(shell pwd)/buf.yaml:/workspace/buf.yaml -v $(shell go list -f "{{ .Dir }}" -m github.com/cosmos/cosmos-sdk):/workspace/cosmos_sdk_dir -v $(shell pwd):/workspace/wasmd --workdir /workspace $(PROTO_CONTAINER) +HTTPS_GIT := https://github.com/CosmWasm/wasmd.git + export GO111MODULE = on # process build tags @@ -198,16 +203,19 @@ format: ############################################################################### proto-all: proto-gen proto-lint proto-check-breaking +.PHONY: proto-all -proto-gen: - @./scripts/protocgen.sh +proto-gen: proto-lint + @docker run --rm -v $(shell go list -f "{{ .Dir }}" -m github.com/cosmos/cosmos-sdk):/workspace/cosmos_sdk_dir -v $(shell pwd):/workspace --workdir /workspace --env COSMOS_SDK_DIR=/workspace/cosmos_sdk_dir $(PROTO_CONTAINER) ./scripts/protocgen.sh +.PHONY: proto-gen proto-lint: - @buf check lint --error-format=json + @$(DOCKER_BUF) buf check lint --error-format=json +.PHONY: proto-lint proto-check-breaking: - @buf check breaking --against-input '.git#branch=master' - + @$(DOCKER_BUF) buf check breaking --against-input $(HTTPS_GIT)#branch=master +.PHONY: proto-check-breaking .PHONY: all build-linux install install-debug \ go-mod-cache draw-deps clean build format \ diff --git a/README.md b/README.md index cbd0a1df08..268dbd928e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Wasm Zone -[![CircleCI](https://circleci.com/gh/cosmwasm/wasmd/tree/master.svg?style=shield)](https://circleci.com/gh/cosmwasm/wasmd/tree/master) +[![CircleCI](https://circleci.com/gh/CosmWasm/wasmd/tree/master.svg?style=shield)](https://circleci.com/gh/CosmWasm/wasmd/tree/master) [![codecov](https://codecov.io/gh/cosmwasm/wasmd/branch/master/graph/badge.svg)](https://codecov.io/gh/cosmwasm/wasmd) [![Go Report Card](https://goreportcard.com/badge/github.com/CosmWasm/wasmd)](https://goreportcard.com/report/github.com/CosmWasm/wasmd) -[![license](https://img.shields.io/github/license/cosmwasm/wasmd.svg)](https://github.com/CosmWasm/wasmd/blob/master/LICENSE) -[![LoC](https://tokei.rs/b1/github/cosmwasm/wasmd)](https://github.com/CosmWasm/wasmd) +[![license](https://img.shields.io/github/license/CosmWasm/wasmd.svg)](https://github.com/CosmWasm/wasmd/blob/master/LICENSE) +[![LoC](https://tokei.rs/b1/github/CosmWasm/wasmd)](https://github.com/CosmWasm/wasmd) This repository hosts `Wasmd`, the first implementation of a cosmos zone with wasm smart contracts enabled. @@ -13,7 +13,7 @@ This code was forked from the `cosmos/gaia` repository as a basis and then we ad many gaia-specific files. However, the `wasmd` binary should function just like `gaiad` except for the addition of the `x/wasm` module. -**Note**: Requires [Go 1.14+](https://golang.org/dl/) +**Note**: Requires [Go 1.15+](https://golang.org/dl/) ## Supported Systems @@ -68,24 +68,11 @@ To set up a single node testnet, [look at the deployment documentation](./docs/d If you want to deploy a whole cluster, [look at the network scripts](./networks/README.md). ## Protobuf - -1. Install [protoc](https://github.com/protocolbuffers/protobuf#protocol-compiler-installation) - -2. Install [cosmos-extension](https://github.com/regen-network/cosmos-proto/) for [gogo-protobuf](https://github.com/gogo/protobuf) -```sh -go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos -``` -3. Install [grpc gateway extension](github.com/grpc-ecosystem/grpc-gateway) -```go -go install \ upgrade_stargate_rebased 3a8aa77 ✗ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \ - github.com/golang/protobuf/protoc-gen-go -``` -3. Run generator -```sh - make proto-gen +Generate protobuf +```shell script +make proto-gen ``` +The generators are executed within a Docker [container](./contrib/prototools-docker), now. ## Dockerized diff --git a/buf.yaml b/buf.yaml index 8507c9cd41..97da997731 100644 --- a/buf.yaml +++ b/buf.yaml @@ -1,19 +1,36 @@ +version: v1beta1 build: roots: - - . + # Note: these are not local path. These roots are mounted into the docker container + - wasmd/ + - cosmos_sdk_dir/third_party/proto/ + - cosmos_sdk_dir/proto/ + excludes: +# - cosmos_sdk_dir lint: use: - DEFAULT - - COMMENTS +# - COMMENTS - FILE_LOWER_SNAKE_CASE except: - UNARY_RPC - COMMENT_FIELD + - SERVICE_SUFFIX + - PACKAGE_VERSION_SUFFIX + - RPC_REQUEST_STANDARD_NAME - PACKAGE_DIRECTORY_MATCH ignore: - - third_party + - tendermint + - gogoproto + - cosmos_proto + - google + - confio breaking: use: - FILE ignore: - - third_party + - tendermint + - gogoproto + - cosmos_proto + - google + - confio diff --git a/contrib/prototools-docker/Dockerfile b/contrib/prototools-docker/Dockerfile new file mode 100644 index 0000000000..c3f781d2a6 --- /dev/null +++ b/contrib/prototools-docker/Dockerfile @@ -0,0 +1,51 @@ +FROM golang:1.15.3-alpine3.12 AS build + +#ARG PROTOTOOL_VERSION=1.10.0 +ARG PROTODOC_VERSION=1.3.2 +ARG GRPC_GATEWAY_VERSION=1.16.0 +ARG REGEN_GOGOPROTO_VERSION=0.3.0 +ARG REGEN_PROTOBUF_VERSION=1.3.2-alpha.regen.4 +ARG BUF_VERSION=0.30.0 + +RUN apk --no-cache add --update curl git libc6-compat make upx + +RUN go get -d \ + github.com/gogo/protobuf/gogoproto && \ + mkdir -p /usr/include/google/protobuf/ && \ + mv /go/src/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto /usr/include/google/protobuf/ &&\ + mv /go/src/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto /usr/include/google/protobuf/ + +RUN GO111MODULE=on go get \ + github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \ + github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} && \ + mv /go/bin/protoc-gen-grpc-gateway /usr/local/bin/ &&\ + mv /go/bin/protoc-gen-swagger /usr/local/bin/ + +# Install regen fork of gogo proto +# To install a fix version this can only be done via this go.mod workaround +WORKDIR /work +RUN GO111MODULE=on go mod init foobar && \ + go mod edit -replace github.com/gogo/protobuf=github.com/regen-network/protobuf@v${REGEN_PROTOBUF_VERSION} && \ + go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@v${REGEN_GOGOPROTO_VERSION} && \ + mv /go/bin/protoc-gen-gocosmos* /usr/local/bin/ + +RUN GO111MODULE=on go get \ + github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v${PROTODOC_VERSION} && \ + mv /go/bin/protoc-gen-doc /usr/local/bin/ + +RUN GO111MODULE=on go get \ + github.com/bufbuild/buf/cmd/buf@v${BUF_VERSION} && \ + mv /go/bin/buf /usr/local/bin/ + +RUN upx --lzma /usr/local/bin/* + +FROM golang:1.15.3-alpine3.12 +ENV LD_LIBRARY_PATH=/lib64:/lib + +WORKDIR /work +RUN apk --no-cache add --update curl git libc6-compat make +RUN apk --no-cache add --update ca-certificates libc6-compat protoc + +COPY --from=build /usr/local/bin /usr/local/bin +COPY --from=build /usr/include /usr/include +RUN chmod -R 755 /usr/include diff --git a/contrib/prototools-docker/README.md b/contrib/prototools-docker/README.md new file mode 100644 index 0000000000..600c7024b8 --- /dev/null +++ b/contrib/prototools-docker/README.md @@ -0,0 +1,21 @@ +Prototool Docker Helper +======================= +Docker container for all the protobuf generation... + +Based on the work by @pseudomuto [prototool-docker](https://github.com/charithe/prototool-docker) project: + +Installs generators and tools from: + +* https://github.com/bufbuild/buf +* https://github.com/grpc-ecosystem +* https://github.com/regen-network/cosmos-proto +* https://github.com/pseudomuto/protoc-gen-doc + +### Build +```shell script +docker build -t cosmwasm/prototools-docker -f ./contrib/prototools-docker/Dockerfile . +``` + +```shell script +docker run -it -v $(go list -f "{{ .Dir }}" -m github.com/cosmos/cosmos-sdk):/workspace/cosmos_sdk_dir -v $(pwd):/workspace --workdir /workspace --env COSMOS_SDK_DIR=/cosmos_sdk_dir cosmwasm/prototool-docker sh +``` diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000000..9f3e98c8b0 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,3 @@ +# Generated doc + +Tutorials and project doc is available on https://docs.cosmwasm.com/ diff --git a/doc/proto.md b/doc/proto.md new file mode 100644 index 0000000000..8ca9f0f066 --- /dev/null +++ b/doc/proto.md @@ -0,0 +1,899 @@ +# Protocol Documentation + + +## Table of Contents + +- [x/wasm/internal/types/genesis.proto](#x/wasm/internal/types/genesis.proto) + - [Code](#wasmd.x.wasmd.v1beta1.Code) + - [Contract](#wasmd.x.wasmd.v1beta1.Contract) + - [GenesisState](#wasmd.x.wasmd.v1beta1.GenesisState) + - [Sequence](#wasmd.x.wasmd.v1beta1.Sequence) + +- [x/wasm/internal/types/msg.proto](#x/wasm/internal/types/msg.proto) + - [MsgClearAdmin](#wasmd.x.wasmd.v1beta1.MsgClearAdmin) + - [MsgExecuteContract](#wasmd.x.wasmd.v1beta1.MsgExecuteContract) + - [MsgInstantiateContract](#wasmd.x.wasmd.v1beta1.MsgInstantiateContract) + - [MsgMigrateContract](#wasmd.x.wasmd.v1beta1.MsgMigrateContract) + - [MsgStoreCode](#wasmd.x.wasmd.v1beta1.MsgStoreCode) + - [MsgUpdateAdmin](#wasmd.x.wasmd.v1beta1.MsgUpdateAdmin) + +- [x/wasm/internal/types/proposal.proto](#x/wasm/internal/types/proposal.proto) + - [ClearAdminProposal](#wasmd.x.wasmd.v1beta1.ClearAdminProposal) + - [InstantiateContractProposal](#wasmd.x.wasmd.v1beta1.InstantiateContractProposal) + - [MigrateContractProposal](#wasmd.x.wasmd.v1beta1.MigrateContractProposal) + - [StoreCodeProposal](#wasmd.x.wasmd.v1beta1.StoreCodeProposal) + - [UpdateAdminProposal](#wasmd.x.wasmd.v1beta1.UpdateAdminProposal) + +- [x/wasm/internal/types/query.proto](#x/wasm/internal/types/query.proto) + - [CodeInfoResponse](#wasmd.x.wasmd.v1beta1.CodeInfoResponse) + - [ContractInfoWithAddress](#wasmd.x.wasmd.v1beta1.ContractInfoWithAddress) + - [QueryAllContractStateRequest](#wasmd.x.wasmd.v1beta1.QueryAllContractStateRequest) + - [QueryAllContractStateResponse](#wasmd.x.wasmd.v1beta1.QueryAllContractStateResponse) + - [QueryCodeRequest](#wasmd.x.wasmd.v1beta1.QueryCodeRequest) + - [QueryCodeResponse](#wasmd.x.wasmd.v1beta1.QueryCodeResponse) + - [QueryCodesResponse](#wasmd.x.wasmd.v1beta1.QueryCodesResponse) + - [QueryContractHistoryRequest](#wasmd.x.wasmd.v1beta1.QueryContractHistoryRequest) + - [QueryContractHistoryResponse](#wasmd.x.wasmd.v1beta1.QueryContractHistoryResponse) + - [QueryContractInfoRequest](#wasmd.x.wasmd.v1beta1.QueryContractInfoRequest) + - [QueryContractInfoResponse](#wasmd.x.wasmd.v1beta1.QueryContractInfoResponse) + - [QueryContractsByCodeRequest](#wasmd.x.wasmd.v1beta1.QueryContractsByCodeRequest) + - [QueryContractsByCodeResponse](#wasmd.x.wasmd.v1beta1.QueryContractsByCodeResponse) + - [QueryRawContractStateRequest](#wasmd.x.wasmd.v1beta1.QueryRawContractStateRequest) + - [QueryRawContractStateResponse](#wasmd.x.wasmd.v1beta1.QueryRawContractStateResponse) + - [QuerySmartContractStateRequest](#wasmd.x.wasmd.v1beta1.QuerySmartContractStateRequest) + - [QuerySmartContractStateResponse](#wasmd.x.wasmd.v1beta1.QuerySmartContractStateResponse) + + - [Query](#wasmd.x.wasmd.v1beta1.Query) + +- [x/wasm/internal/types/types.proto](#x/wasm/internal/types/types.proto) + - [AbsoluteTxPosition](#wasmd.x.wasmd.v1beta1.AbsoluteTxPosition) + - [AccessConfig](#wasmd.x.wasmd.v1beta1.AccessConfig) + - [AccessTypeParam](#wasmd.x.wasmd.v1beta1.AccessTypeParam) + - [CodeInfo](#wasmd.x.wasmd.v1beta1.CodeInfo) + - [ContractCodeHistoryEntry](#wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry) + - [ContractHistory](#wasmd.x.wasmd.v1beta1.ContractHistory) + - [ContractInfo](#wasmd.x.wasmd.v1beta1.ContractInfo) + - [Model](#wasmd.x.wasmd.v1beta1.Model) + - [Params](#wasmd.x.wasmd.v1beta1.Params) + + - [AccessType](#wasmd.x.wasmd.v1beta1.AccessType) + - [ContractCodeHistoryOperationType](#wasmd.x.wasmd.v1beta1.ContractCodeHistoryOperationType) + +- [Scalar Value Types](#scalar-value-types) + + + + +
+ +## x/wasm/internal/types/genesis.proto + + + + + +### Code +Code struct encompasses CodeInfo and CodeBytes + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code_id | [uint64](#uint64) | | | +| code_info | [CodeInfo](#wasmd.x.wasmd.v1beta1.CodeInfo) | | | +| code_bytes | [bytes](#bytes) | | | + + + + + + + + +### Contract +Contract struct encompasses ContractAddress, ContractInfo, and ContractState + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| contract_address | [bytes](#bytes) | | | +| contract_info | [ContractInfo](#wasmd.x.wasmd.v1beta1.ContractInfo) | | | +| contract_state | [Model](#wasmd.x.wasmd.v1beta1.Model) | repeated | | + + + + + + + + +### GenesisState +GenesisState - genesis state of x/wasm + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| params | [Params](#wasmd.x.wasmd.v1beta1.Params) | | | +| codes | [Code](#wasmd.x.wasmd.v1beta1.Code) | repeated | | +| contracts | [Contract](#wasmd.x.wasmd.v1beta1.Contract) | repeated | | +| sequences | [Sequence](#wasmd.x.wasmd.v1beta1.Sequence) | repeated | | + + + + + + + + +### Sequence +Sequence id and value of a counter + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id_key | [bytes](#bytes) | | | +| value | [uint64](#uint64) | | | + + + + + + + + + + + + + + + + + + +## x/wasm/internal/types/msg.proto + + + + + +### MsgClearAdmin + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sender | [bytes](#bytes) | | | +| contract | [bytes](#bytes) | | | + + + + + + + + +### MsgExecuteContract + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sender | [bytes](#bytes) | | | +| contract | [bytes](#bytes) | | | +| msg | [bytes](#bytes) | | | +| sent_funds | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + + + + + + + + +### MsgInstantiateContract + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sender | [bytes](#bytes) | | | +| admin | [bytes](#bytes) | | Admin is an optional address that can execute migrations | +| code_id | [uint64](#uint64) | | | +| label | [string](#string) | | | +| init_msg | [bytes](#bytes) | | | +| init_funds | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + + + + + + + + +### MsgMigrateContract + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sender | [bytes](#bytes) | | | +| contract | [bytes](#bytes) | | | +| code_id | [uint64](#uint64) | | | +| migrate_msg | [bytes](#bytes) | | | + + + + + + + + +### MsgStoreCode + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sender | [bytes](#bytes) | | | +| wasm_byte_code | [bytes](#bytes) | | WASMByteCode can be raw or gzip compressed | +| source | [string](#string) | | Source is a valid absolute HTTPS URI to the contract's source code, optional | +| builder | [string](#string) | | Builder is a valid docker image name with tag, optional | +| instantiate_permission | [AccessConfig](#wasmd.x.wasmd.v1beta1.AccessConfig) | | InstantiatePermission to apply on contract creation, optional | + + + + + + + + +### MsgUpdateAdmin + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sender | [bytes](#bytes) | | | +| new_admin | [bytes](#bytes) | | | +| contract | [bytes](#bytes) | | | + + + + + + + + + + + + + + + + + + +## x/wasm/internal/types/proposal.proto + + + + + +### ClearAdminProposal +ClearAdminProposal gov proposal content type to clear the admin of a contract. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| title | [string](#string) | | | +| description | [string](#string) | | | +| contract | [bytes](#bytes) | | | + + + + + + + + +### InstantiateContractProposal +InstantiateContractProposal gov proposal content type to instantiate a contract. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| title | [string](#string) | | | +| description | [string](#string) | | | +| run_as | [bytes](#bytes) | | RunAs is the address that is passed to the contract's environment as sender | +| admin | [bytes](#bytes) | | Admin is an optional address that can execute migrations | +| code_id | [uint64](#uint64) | | | +| label | [string](#string) | | | +| init_msg | [bytes](#bytes) | | | +| init_funds | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + + + + + + + + +### MigrateContractProposal +MigrateContractProposal gov proposal content type to migrate a contract. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| title | [string](#string) | | | +| description | [string](#string) | | | +| run_as | [bytes](#bytes) | | RunAs is the address that is passed to the contract's environment as sender | +| contract | [bytes](#bytes) | | | +| code_id | [uint64](#uint64) | | | +| migrate_msg | [bytes](#bytes) | | | + + + + + + + + +### StoreCodeProposal + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| title | [string](#string) | | | +| description | [string](#string) | | | +| run_as | [bytes](#bytes) | | RunAs is the address that is passed to the contract's environment as sender | +| wasm_byte_code | [bytes](#bytes) | | WASMByteCode can be raw or gzip compressed | +| source | [string](#string) | | Source is a valid absolute HTTPS URI to the contract's source code, optional | +| builder | [string](#string) | | Builder is a valid docker image name with tag, optional | +| instantiate_permission | [AccessConfig](#wasmd.x.wasmd.v1beta1.AccessConfig) | | InstantiatePermission to apply on contract creation, optional | + + + + + + + + +### UpdateAdminProposal +UpdateAdminProposal gov proposal content type to set an admin for a contract. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| title | [string](#string) | | | +| description | [string](#string) | | | +| new_admin | [bytes](#bytes) | | | +| contract | [bytes](#bytes) | | | + + + + + + + + + + + + + + + + + + +## x/wasm/internal/types/query.proto + + + + + +### CodeInfoResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code_id | [uint64](#uint64) | | id for legacy support | +| creator | [bytes](#bytes) | | | +| data_hash | [bytes](#bytes) | | | +| source | [string](#string) | | | +| builder | [string](#string) | | | + + + + + + + + +### ContractInfoWithAddress +ContractInfoWithAddress adds the address (key) to the ContractInfo representation + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [bytes](#bytes) | | | +| contract_info | [ContractInfo](#wasmd.x.wasmd.v1beta1.ContractInfo) | | | + + + + + + + + +### QueryAllContractStateRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [bytes](#bytes) | | address is the address of the contract | + + + + + + + + +### QueryAllContractStateResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| models | [Model](#wasmd.x.wasmd.v1beta1.Model) | repeated | | + + + + + + + + +### QueryCodeRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code_id | [uint64](#uint64) | | grpc-gateway_out does not support Go style CodID | + + + + + + + + +### QueryCodeResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code_info | [CodeInfoResponse](#wasmd.x.wasmd.v1beta1.CodeInfoResponse) | | | +| data | [bytes](#bytes) | | | + + + + + + + + +### QueryCodesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code_infos | [CodeInfoResponse](#wasmd.x.wasmd.v1beta1.CodeInfoResponse) | repeated | | + + + + + + + + +### QueryContractHistoryRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [bytes](#bytes) | | address is the address of the contract to query | + + + + + + + + +### QueryContractHistoryResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| entries | [ContractCodeHistoryEntry](#wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry) | repeated | | + + + + + + + + +### QueryContractInfoRequest +QueryContractInfoRequest is the request type for the Query/ContractInfo RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [bytes](#bytes) | | address is the address of the contract to query | + + + + + + + + +### QueryContractInfoResponse +QueryContractInfoResponse is the response type for the Query/ContractInfo RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [bytes](#bytes) | | address is the address of the contract | +| contract_info | [ContractInfo](#wasmd.x.wasmd.v1beta1.ContractInfo) | | | + + + + + + + + +### QueryContractsByCodeRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code_id | [uint64](#uint64) | | grpc-gateway_out does not support Go style CodID | + + + + + + + + +### QueryContractsByCodeResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| contract_infos | [ContractInfoWithAddress](#wasmd.x.wasmd.v1beta1.ContractInfoWithAddress) | repeated | | + + + + + + + + +### QueryRawContractStateRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [bytes](#bytes) | | address is the address of the contract | +| query_data | [bytes](#bytes) | | | + + + + + + + + +### QueryRawContractStateResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [bytes](#bytes) | | | + + + + + + + + +### QuerySmartContractStateRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [bytes](#bytes) | | address is the address of the contract | +| query_data | [bytes](#bytes) | | | + + + + + + + + +### QuerySmartContractStateResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [bytes](#bytes) | | | + + + + + + + + + + + + + + +### Query +Query provides defines the gRPC querier service + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| ContractInfo | [QueryContractInfoRequest](#wasmd.x.wasmd.v1beta1.QueryContractInfoRequest) | [QueryContractInfoResponse](#wasmd.x.wasmd.v1beta1.QueryContractInfoResponse) | | +| ContractHistory | [QueryContractHistoryRequest](#wasmd.x.wasmd.v1beta1.QueryContractHistoryRequest) | [QueryContractHistoryResponse](#wasmd.x.wasmd.v1beta1.QueryContractHistoryResponse) | | +| ContractsByCode | [QueryContractsByCodeRequest](#wasmd.x.wasmd.v1beta1.QueryContractsByCodeRequest) | [QueryContractsByCodeResponse](#wasmd.x.wasmd.v1beta1.QueryContractsByCodeResponse) | | +| AllContractState | [QueryAllContractStateRequest](#wasmd.x.wasmd.v1beta1.QueryAllContractStateRequest) | [QueryAllContractStateResponse](#wasmd.x.wasmd.v1beta1.QueryAllContractStateResponse) | | +| RawContractState | [QueryRawContractStateRequest](#wasmd.x.wasmd.v1beta1.QueryRawContractStateRequest) | [QueryRawContractStateResponse](#wasmd.x.wasmd.v1beta1.QueryRawContractStateResponse) | | +| SmartContractState | [QuerySmartContractStateRequest](#wasmd.x.wasmd.v1beta1.QuerySmartContractStateRequest) | [QuerySmartContractStateResponse](#wasmd.x.wasmd.v1beta1.QuerySmartContractStateResponse) | | +| Code | [QueryCodeRequest](#wasmd.x.wasmd.v1beta1.QueryCodeRequest) | [QueryCodeResponse](#wasmd.x.wasmd.v1beta1.QueryCodeResponse) | | +| Codes | [.google.protobuf.Empty](#google.protobuf.Empty) | [QueryCodesResponse](#wasmd.x.wasmd.v1beta1.QueryCodesResponse) | | + + + + + + + + +## x/wasm/internal/types/types.proto + + + + + +### AbsoluteTxPosition +AbsoluteTxPosition can be used to sort contracts + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| block_height | [int64](#int64) | | BlockHeight is the block the contract was created at | +| tx_index | [uint64](#uint64) | | TxIndex is a monotonic counter within the block (actual transaction index, or gas consumed) | + + + + + + + + +### AccessConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| permission | [AccessType](#wasmd.x.wasmd.v1beta1.AccessType) | | | +| address | [bytes](#bytes) | | | + + + + + + + + +### AccessTypeParam + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| value | [AccessType](#wasmd.x.wasmd.v1beta1.AccessType) | | | + + + + + + + + +### CodeInfo +CodeInfo is data for the uploaded contract WASM code + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code_hash | [bytes](#bytes) | | | +| creator | [bytes](#bytes) | | | +| source | [string](#string) | | | +| builder | [string](#string) | | | +| instantiate_config | [AccessConfig](#wasmd.x.wasmd.v1beta1.AccessConfig) | | | + + + + + + + + +### ContractCodeHistoryEntry +ContractCodeHistoryEntry stores code updates to a contract. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| operation | [ContractCodeHistoryOperationType](#wasmd.x.wasmd.v1beta1.ContractCodeHistoryOperationType) | | | +| code_id | [uint64](#uint64) | | | +| updated | [AbsoluteTxPosition](#wasmd.x.wasmd.v1beta1.AbsoluteTxPosition) | | | +| msg | [bytes](#bytes) | | | + + + + + + + + +### ContractHistory + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code_history_entries | [ContractCodeHistoryEntry](#wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry) | repeated | | + + + + + + + + +### ContractInfo +ContractInfo stores a WASM contract instance + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code_id | [uint64](#uint64) | | | +| creator | [bytes](#bytes) | | | +| admin | [bytes](#bytes) | | | +| label | [string](#string) | | | +| created | [AbsoluteTxPosition](#wasmd.x.wasmd.v1beta1.AbsoluteTxPosition) | | never show this in query results, just use for sorting (Note: when using json tag "-" amino refused to serialize it...) | + + + + + + + + +### Model +Model is a struct that holds a KV pair + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [bytes](#bytes) | | hex-encode key to read it better (this is often ascii) | +| value | [bytes](#bytes) | | base64-encode raw value | + + + + + + + + +### Params +Params defines the set of wasm parameters. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code_upload_access | [AccessConfig](#wasmd.x.wasmd.v1beta1.AccessConfig) | | | +| instantiate_default_permission | [AccessType](#wasmd.x.wasmd.v1beta1.AccessType) | | | +| max_wasm_code_size | [uint64](#uint64) | | | + + + + + + + + + + +### AccessType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| ACCESS_TYPE_UNSPECIFIED | 0 | | +| ACCESS_TYPE_NOBODY | 1 | | +| ACCESS_TYPE_ONLY_ADDRESS | 2 | | +| ACCESS_TYPE_EVERYBODY | 3 | | + + + + + +### ContractCodeHistoryOperationType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED | 0 | | +| CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT | 1 | | +| CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE | 2 | | +| CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS | 3 | | + + + + + + + + + + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | +| double | | double | double | float | float64 | double | float | Float | +| float | | float | float | float | float32 | float | float | Float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | +| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | + diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 492b31abfd..187e0ec113 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -1,23 +1,19 @@ -#!/usr/bin/env bash +#!/bin/sh set -eo pipefail -project_dir=x/wasm/internal/types/ -cosmos_sdk_dir=$(go list -f "{{ .Dir }}" -m github.com/cosmos/cosmos-sdk) -# Generate Go types from protobuf -protoc \ - -I=. \ - -I="$cosmos_sdk_dir/third_party/proto" \ - -I="$cosmos_sdk_dir/proto" \ - --gocosmos_out=Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,plugins=interfacetype+grpc,paths=source_relative:. \ - $(find "${project_dir}" -maxdepth 1 -name '*.proto') +PROJECT_PROTO_DIR=x/wasm/internal/types/ +COSMOS_SDK_DIR=${COSMOS_SDK_DIR:-$(go list -f "{{ .Dir }}" -m github.com/cosmos/cosmos-sdk)} -# Generate gRPC gateway (*.pb.gw.go in respective modules) files +# Generate Go types from protobuf protoc \ -I=. \ - -I="$cosmos_sdk_dir/third_party/proto" \ - -I="$cosmos_sdk_dir/proto" \ + -I="$COSMOS_SDK_DIR/third_party/proto" \ + -I="$COSMOS_SDK_DIR/proto" \ + --gocosmos_out=Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,plugins=interfacetype+grpc,paths=source_relative:. \ --grpc-gateway_out .\ --grpc-gateway_opt logtostderr=true \ - --grpc-gateway_opt paths=source_relative \ - $(find "${project_dir}" -maxdepth 1 -name '*.proto') + --grpc-gateway_opt paths=Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,paths=source_relative \ + --doc_out=./doc \ + --doc_opt=markdown,proto.md \ + $(find "${PROJECT_PROTO_DIR}" -maxdepth 1 -name '*.proto') diff --git a/x/wasm/internal/keeper/genesis_test.go b/x/wasm/internal/keeper/genesis_test.go index 76cc097407..7975594fa6 100644 --- a/x/wasm/internal/keeper/genesis_test.go +++ b/x/wasm/internal/keeper/genesis_test.go @@ -465,7 +465,7 @@ func TestImportContractWithCodeHistoryReset(t *testing.T) { assert.Equal(t, expContractInfo, *gotContractInfo) expHistory := []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeGenesis, + Operation: types.ContractCodeHistoryOperationTypeGenesis, CodeID: firstCodeID, Updated: types.NewAbsoluteTxPosition(ctx), }, diff --git a/x/wasm/internal/keeper/keeper_test.go b/x/wasm/internal/keeper/keeper_test.go index bbb79e54a0..be5d56efb0 100644 --- a/x/wasm/internal/keeper/keeper_test.go +++ b/x/wasm/internal/keeper/keeper_test.go @@ -288,7 +288,7 @@ func TestInstantiate(t *testing.T) { assert.Equal(t, info.Label, "demo contract 1") exp := []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeInit, + Operation: types.ContractCodeHistoryOperationTypeInit, CodeID: codeID, Updated: types.NewAbsoluteTxPosition(ctx), Msg: json.RawMessage(initMsgBz), @@ -850,12 +850,12 @@ func TestMigrate(t *testing.T) { assert.Equal(t, spec.codeID, cInfo.CodeID) expHistory := []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeInit, + Operation: types.ContractCodeHistoryOperationTypeInit, CodeID: originalCodeID, Updated: types.NewAbsoluteTxPosition(ctx), Msg: initMsgBz, }, { - Operation: types.ContractCodeHistoryTypeMigrate, + Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: spec.codeID, Updated: types.NewAbsoluteTxPosition(ctx), Msg: spec.migrateMsg, diff --git a/x/wasm/internal/keeper/legacy_querier_test.go b/x/wasm/internal/keeper/legacy_querier_test.go index 81ffea5860..288ff1cd26 100644 --- a/x/wasm/internal/keeper/legacy_querier_test.go +++ b/x/wasm/internal/keeper/legacy_querier_test.go @@ -230,44 +230,44 @@ func TestLegacyQueryContractHistory(t *testing.T) { }{ "response with internal fields cleared": { srcHistory: []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeGenesis, + Operation: types.ContractCodeHistoryOperationTypeGenesis, CodeID: firstCodeID, Updated: types.NewAbsoluteTxPosition(ctx), Msg: []byte(`"init message"`), }}, expContent: []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeGenesis, + Operation: types.ContractCodeHistoryOperationTypeGenesis, CodeID: firstCodeID, Msg: []byte(`"init message"`), }}, }, "response with multiple entries": { srcHistory: []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeInit, + Operation: types.ContractCodeHistoryOperationTypeInit, CodeID: firstCodeID, Updated: types.NewAbsoluteTxPosition(ctx), Msg: []byte(`"init message"`), }, { - Operation: types.ContractCodeHistoryTypeMigrate, + Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 2, Updated: types.NewAbsoluteTxPosition(ctx), Msg: []byte(`"migrate message 1"`), }, { - Operation: types.ContractCodeHistoryTypeMigrate, + Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 3, Updated: types.NewAbsoluteTxPosition(ctx), Msg: []byte(`"migrate message 2"`), }}, expContent: []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeInit, + Operation: types.ContractCodeHistoryOperationTypeInit, CodeID: firstCodeID, Msg: []byte(`"init message"`), }, { - Operation: types.ContractCodeHistoryTypeMigrate, + Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 2, Msg: []byte(`"migrate message 1"`), }, { - Operation: types.ContractCodeHistoryTypeMigrate, + Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 3, Msg: []byte(`"migrate message 2"`), }}, @@ -275,7 +275,7 @@ func TestLegacyQueryContractHistory(t *testing.T) { "unknown contract address": { srcQueryAddr: otherAddr, srcHistory: []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeGenesis, + Operation: types.ContractCodeHistoryOperationTypeGenesis, CodeID: firstCodeID, Updated: types.NewAbsoluteTxPosition(ctx), Msg: []byte(`"init message"`), diff --git a/x/wasm/internal/keeper/proposal_integration_test.go b/x/wasm/internal/keeper/proposal_integration_test.go index 86845037c9..aecb00e83b 100644 --- a/x/wasm/internal/keeper/proposal_integration_test.go +++ b/x/wasm/internal/keeper/proposal_integration_test.go @@ -104,7 +104,7 @@ func TestInstantiateProposal(t *testing.T) { assert.Equal(t, otherAddress, cInfo.Admin) assert.Equal(t, "testing", cInfo.Label) expHistory := []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeInit, + Operation: types.ContractCodeHistoryOperationTypeInit, CodeID: src.CodeID, Updated: types.NewAbsoluteTxPosition(ctx), Msg: src.InitMsg, @@ -175,11 +175,11 @@ func TestMigrateProposal(t *testing.T) { assert.Equal(t, anyAddress, cInfo.Admin) assert.Equal(t, "testing", cInfo.Label) expHistory := []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeGenesis, + Operation: types.ContractCodeHistoryOperationTypeGenesis, CodeID: firstCodeID, Updated: types.NewAbsoluteTxPosition(ctx), }, { - Operation: types.ContractCodeHistoryTypeMigrate, + Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: src.CodeID, Updated: types.NewAbsoluteTxPosition(ctx), Msg: src.MigrateMsg, diff --git a/x/wasm/internal/keeper/querier.go b/x/wasm/internal/keeper/querier.go index ed6db7343f..6e7cb0af61 100644 --- a/x/wasm/internal/keeper/querier.go +++ b/x/wasm/internal/keeper/querier.go @@ -7,7 +7,7 @@ import ( "github.com/CosmWasm/wasmd/x/wasm/internal/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/golang/protobuf/ptypes/empty" + prototypes "github.com/gogo/protobuf/types" ) type grpcQuerier struct { @@ -133,7 +133,7 @@ func (q grpcQuerier) Code(c context.Context, req *types.QueryCodeRequest) (*type }, nil } -func (q grpcQuerier) Codes(c context.Context, _ *empty.Empty) (*types.QueryCodesResponse, error) { +func (q grpcQuerier) Codes(c context.Context, _ *prototypes.Empty) (*types.QueryCodesResponse, error) { rsp, err := queryCodeList(sdk.UnwrapSDKContext(c), *q.keeper) switch { case err != nil: diff --git a/x/wasm/internal/keeper/querier_test.go b/x/wasm/internal/keeper/querier_test.go index 7301956dae..771f527e4a 100644 --- a/x/wasm/internal/keeper/querier_test.go +++ b/x/wasm/internal/keeper/querier_test.go @@ -227,44 +227,44 @@ func TestQueryContractHistory(t *testing.T) { }{ "response with internal fields cleared": { srcHistory: []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeGenesis, + Operation: types.ContractCodeHistoryOperationTypeGenesis, CodeID: firstCodeID, Updated: types.NewAbsoluteTxPosition(ctx), Msg: []byte(`"init message"`), }}, expContent: []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeGenesis, + Operation: types.ContractCodeHistoryOperationTypeGenesis, CodeID: firstCodeID, Msg: []byte(`"init message"`), }}, }, "response with multiple entries": { srcHistory: []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeInit, + Operation: types.ContractCodeHistoryOperationTypeInit, CodeID: firstCodeID, Updated: types.NewAbsoluteTxPosition(ctx), Msg: []byte(`"init message"`), }, { - Operation: types.ContractCodeHistoryTypeMigrate, + Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 2, Updated: types.NewAbsoluteTxPosition(ctx), Msg: []byte(`"migrate message 1"`), }, { - Operation: types.ContractCodeHistoryTypeMigrate, + Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 3, Updated: types.NewAbsoluteTxPosition(ctx), Msg: []byte(`"migrate message 2"`), }}, expContent: []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeInit, + Operation: types.ContractCodeHistoryOperationTypeInit, CodeID: firstCodeID, Msg: []byte(`"init message"`), }, { - Operation: types.ContractCodeHistoryTypeMigrate, + Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 2, Msg: []byte(`"migrate message 1"`), }, { - Operation: types.ContractCodeHistoryTypeMigrate, + Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 3, Msg: []byte(`"migrate message 2"`), }}, @@ -272,7 +272,7 @@ func TestQueryContractHistory(t *testing.T) { "unknown contract address": { srcQueryAddr: otherAddr, srcHistory: []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryTypeGenesis, + Operation: types.ContractCodeHistoryOperationTypeGenesis, CodeID: firstCodeID, Updated: types.NewAbsoluteTxPosition(ctx), Msg: []byte(`"init message"`), diff --git a/x/wasm/internal/types/msg.pb.go b/x/wasm/internal/types/msg.pb.go index 06cc98b7ae..e39f7ae21c 100644 --- a/x/wasm/internal/types/msg.pb.go +++ b/x/wasm/internal/types/msg.pb.go @@ -35,7 +35,7 @@ type MsgStoreCode struct { // Builder is a valid docker image name with tag, optional Builder string `protobuf:"bytes,4,opt,name=builder,proto3" json:"builder,omitempty"` // InstantiatePermission to apply on contract creation, optional - InstantiatePermission *AccessConfig `protobuf:"bytes,5,opt,name=InstantiatePermission,proto3" json:"InstantiatePermission,omitempty"` + InstantiatePermission *AccessConfig `protobuf:"bytes,5,opt,name=instantiate_permission,json=instantiatePermission,proto3" json:"instantiate_permission,omitempty"` } func (m *MsgStoreCode) Reset() { *m = MsgStoreCode{} } @@ -283,49 +283,49 @@ func init() { func init() { proto.RegisterFile("x/wasm/internal/types/msg.proto", fileDescriptor_22c4d58a052e9e95) } var fileDescriptor_22c4d58a052e9e95 = []byte{ - // 657 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xcf, 0x4e, 0xdb, 0x40, - 0x10, 0xc6, 0x63, 0x42, 0x02, 0x2c, 0x29, 0xaa, 0x2c, 0x40, 0x2e, 0xaa, 0xec, 0x34, 0x5c, 0x72, - 0xc1, 0x06, 0x2a, 0xb5, 0xa7, 0x1e, 0x12, 0xf7, 0x8f, 0x72, 0x30, 0xaa, 0x8c, 0x2a, 0xd4, 0x5e, - 0xa2, 0xb5, 0x77, 0xd9, 0x2e, 0x8d, 0x77, 0x91, 0x67, 0xd3, 0x84, 0x77, 0xe8, 0xa1, 0xea, 0x03, - 0xf4, 0xde, 0x3e, 0x09, 0xea, 0x89, 0x63, 0x4f, 0x69, 0x1b, 0xde, 0x82, 0x53, 0xb5, 0xb6, 0x41, - 0x54, 0xca, 0x21, 0x82, 0x70, 0xe8, 0x25, 0x9b, 0xd1, 0x7c, 0xf3, 0xcd, 0xec, 0xcf, 0x6b, 0x2f, - 0x72, 0x86, 0xde, 0x00, 0x43, 0xe2, 0x71, 0xa1, 0x68, 0x2a, 0x70, 0xcf, 0x53, 0x27, 0xc7, 0x14, - 0xbc, 0x04, 0x98, 0x7b, 0x9c, 0x4a, 0x25, 0xcd, 0x35, 0x9d, 0x26, 0xee, 0xd0, 0xcd, 0xd7, 0x8f, - 0x3b, 0x11, 0x55, 0x78, 0x67, 0x63, 0x95, 0x49, 0x26, 0x33, 0x85, 0xa7, 0xff, 0xe5, 0xe2, 0x0d, - 0x3b, 0x96, 0x90, 0x48, 0xf0, 0x22, 0x0c, 0xd4, 0x2b, 0xa4, 0x5e, 0x2c, 0xb9, 0x28, 0xf2, 0x8f, - 0x26, 0x77, 0xcb, 0x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xa3, 0xec, 0x28, 0xcf, 0x4f, 0x41, 0x1e, 0x15, 0x05, 0x01, 0xb0, 0xc6, 0x85, 0x81, 0x56, - 0x02, 0x60, 0x6f, 0x8e, 0x09, 0x56, 0xb4, 0x95, 0xbd, 0x54, 0x33, 0x04, 0xb2, 0x87, 0x96, 0x04, - 0x1d, 0x74, 0x6f, 0xf9, 0xb2, 0x2f, 0x0a, 0x3a, 0xc8, 0x47, 0xbb, 0x0e, 0xb8, 0x7c, 0x6b, 0xc0, - 0x8d, 0x6f, 0x06, 0xba, 0x17, 0x00, 0xf3, 0x7b, 0x14, 0xa7, 0x33, 0xdf, 0xfb, 0x6c, 0x67, 0x6d, - 0xef, 0x9d, 0xfe, 0xb1, 0x4b, 0xa7, 0x63, 0xdb, 0x38, 0x1b, 0xdb, 0xc6, 0xef, 0xb1, 0x6d, 0x7c, - 0x3e, 0xb7, 0x4b, 0x67, 0xe7, 0x76, 0xe9, 0xe7, 0xb9, 0x5d, 0x7a, 0xb7, 0x7d, 0xcd, 0xd6, 0x97, - 0x90, 0x1c, 0xe8, 0x8b, 0x30, 0xfb, 0xfc, 0x7b, 0xc3, 0x62, 0xfd, 0xf7, 0x5a, 0x8c, 0xaa, 0xd9, - 0x8d, 0xf8, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x01, 0x83, 0x2a, 0xa4, 0x07, 0x00, - 0x00, + // 663 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xcf, 0x4e, 0xdb, 0x4e, + 0x10, 0xc7, 0x63, 0x42, 0x02, 0x2c, 0xf9, 0xa1, 0x9f, 0x2c, 0x40, 0x2e, 0xaa, 0xec, 0x34, 0x5c, + 0x72, 0xc1, 0x06, 0x2a, 0xb5, 0xa7, 0x1e, 0x92, 0xf4, 0x8f, 0x72, 0x30, 0xaa, 0x8c, 0x2a, 0x24, + 0x2e,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x6b, 0x7b, 0xef, 0xf4, 0x97, 0x5d, 0x3a, 0x9d, 0xd8, 0xc6, 0xd9, + 0xc4, 0x36, 0x7e, 0x4e, 0x6c, 0xe3, 0xe3, 0xb9, 0x5d, 0x3a, 0x3b, 0xb7, 0x4b, 0xdf, 0xcf, 0xed, + 0xd2, 0xe1, 0xf6, 0x35, 0xdb, 0x8e, 0x84, 0xe4, 0x40, 0xdf, 0x84, 0xd9, 0xe7, 0xdf, 0x1b, 0x15, + 0xeb, 0xdf, 0xf7, 0x62, 0x54, 0xcd, 0xae, 0xc4, 0xc7, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x86, + 0xec, 0xce, 0x81, 0xa5, 0x07, 0x00, 0x00, } func (m *MsgStoreCode) Marshal() (dAtA []byte, err error) { diff --git a/x/wasm/internal/types/msg.proto b/x/wasm/internal/types/msg.proto index c6101a71bd..87f994eacf 100644 --- a/x/wasm/internal/types/msg.proto +++ b/x/wasm/internal/types/msg.proto @@ -19,7 +19,7 @@ message MsgStoreCode { // Builder is a valid docker image name with tag, optional string builder = 4; // InstantiatePermission to apply on contract creation, optional - AccessConfig InstantiatePermission = 5; + AccessConfig instantiate_permission = 5; } message MsgInstantiateContract { diff --git a/x/wasm/internal/types/params.go b/x/wasm/internal/types/params.go index fa8da65495..6c7de1d633 100644 --- a/x/wasm/internal/types/params.go +++ b/x/wasm/internal/types/params.go @@ -53,7 +53,7 @@ func (a AccessType) String() string { case AccessTypeEverybody: return "Everybody" } - return "Undefined" + return "Unspecified" } func (a *AccessType) UnmarshalText(text []byte) error { @@ -63,7 +63,7 @@ func (a *AccessType) UnmarshalText(text []byte) error { return nil } } - *a = AccessTypeUndefined + *a = AccessTypeUnspecified return nil } func (a AccessType) MarshalText() ([]byte, error) { @@ -143,7 +143,7 @@ func validateAccessType(i interface{}) error { if !ok { return fmt.Errorf("invalid parameter type: %T", i) } - if a == AccessTypeUndefined { + if a == AccessTypeUnspecified { return sdkerrors.Wrap(ErrEmpty, "type") } for _, v := range AllAccessTypes { @@ -167,7 +167,7 @@ func validateMaxWasmCodeSize(i interface{}) error { func (v AccessConfig) ValidateBasic() error { switch v.Permission { - case AccessTypeUndefined: + case AccessTypeUnspecified: return sdkerrors.Wrap(ErrEmpty, "type") case AccessTypeNobody, AccessTypeEverybody: if len(v.Address) != 0 { diff --git a/x/wasm/internal/types/params_test.go b/x/wasm/internal/types/params_test.go index f42126be5f..abbe8b2cd1 100644 --- a/x/wasm/internal/types/params_test.go +++ b/x/wasm/internal/types/params_test.go @@ -93,7 +93,7 @@ func TestValidateParams(t *testing.T) { }, "reject undefined permission in CodeUploadAccess": { src: Params{ - CodeUploadAccess: AccessConfig{Permission: AccessTypeUndefined}, + CodeUploadAccess: AccessConfig{Permission: AccessTypeUnspecified}, InstantiateDefaultPermission: AccessTypeOnlyAddress, MaxWasmCodeSize: DefaultMaxWasmCodeSize, }, @@ -124,11 +124,11 @@ func TestAccessTypeMarshalJson(t *testing.T) { src AccessType exp string }{ - "Undefined": {src: AccessTypeUndefined, exp: `"Undefined"`}, + "Unspecified": {src: AccessTypeUnspecified, exp: `"Unspecified"`}, "Nobody": {src: AccessTypeNobody, exp: `"Nobody"`}, "OnlyAddress": {src: AccessTypeOnlyAddress, exp: `"OnlyAddress"`}, "Everybody": {src: AccessTypeEverybody, exp: `"Everybody"`}, - "unknown": {src: 999, exp: `"Undefined"`}, + "unknown": {src: 999, exp: `"Unspecified"`}, } for msg, spec := range specs { t.Run(msg, func(t *testing.T) { @@ -144,11 +144,11 @@ func TestAccessTypeUnmarshalJson(t *testing.T) { src string exp AccessType }{ - "Undefined": {src: `"Undefined"`, exp: AccessTypeUndefined}, + "Unspecified": {src: `"Unspecified"`, exp: AccessTypeUnspecified}, "Nobody": {src: `"Nobody"`, exp: AccessTypeNobody}, "OnlyAddress": {src: `"OnlyAddress"`, exp: AccessTypeOnlyAddress}, "Everybody": {src: `"Everybody"`, exp: AccessTypeEverybody}, - "unknown": {src: `""`, exp: AccessTypeUndefined}, + "unknown": {src: `""`, exp: AccessTypeUnspecified}, } for msg, spec := range specs { t.Run(msg, func(t *testing.T) { diff --git a/x/wasm/internal/types/proposal.pb.go b/x/wasm/internal/types/proposal.pb.go index 6c084e445f..abc83e0a12 100644 --- a/x/wasm/internal/types/proposal.pb.go +++ b/x/wasm/internal/types/proposal.pb.go @@ -39,7 +39,7 @@ type StoreCodeProposal struct { // Builder is a valid docker image name with tag, optional Builder string `protobuf:"bytes,6,opt,name=builder,proto3" json:"builder,omitempty"` // InstantiatePermission to apply on contract creation, optional - InstantiatePermission *AccessConfig `protobuf:"bytes,7,opt,name=InstantiatePermission,proto3" json:"InstantiatePermission,omitempty"` + InstantiatePermission *AccessConfig `protobuf:"bytes,7,opt,name=instantiate_permission,json=instantiatePermission,proto3" json:"instantiate_permission,omitempty"` } func (m *StoreCodeProposal) Reset() { *m = StoreCodeProposal{} } @@ -255,50 +255,50 @@ func init() { } var fileDescriptor_00b43267813130fb = []byte{ - // 679 bytes of a gzipped FileDescriptorProto + // 684 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcd, 0x4e, 0xdb, 0x4a, - 0x18, 0x8d, 0x13, 0x92, 0xc0, 0x24, 0xba, 0xe2, 0xfa, 0xc2, 0xbd, 0xbe, 0xb4, 0xb2, 0x53, 0xd3, - 0x45, 0x36, 0xd8, 0x40, 0xa5, 0x56, 0xaa, 0xd4, 0x45, 0x92, 0xfe, 0xb1, 0x88, 0x84, 0x8c, 0x5a, - 0xd4, 0x6e, 0xa2, 0xb1, 0x67, 0x70, 0x87, 0xda, 0x33, 0xd1, 0xcc, 0xa4, 0x21, 0xbb, 0x3e, 0x42, - 0xf7, 0x7d, 0x81, 0xaa, 0x4f, 0x92, 0x55, 0xc5, 0x12, 0x75, 0x91, 0x96, 0xf0, 0x06, 0x5d, 0xb2, - 0xaa, 0x66, 0x6c, 0x50, 0x2a, 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 0x62, 0x17, 0x0e, 0x4f, 0xec, 0xc2, 0xd1, 0x89, 0x5d, - 0x78, 0xbb, 0x3e, 0x43, 0xdf, 0x61, 0x22, 0xdd, 0x55, 0xf7, 0x8d, 0x7e, 0x53, 0xfa, 0x07, 0xf9, - 0xfa, 0xe7, 0xed, 0x13, 0x56, 0xf4, 0xc5, 0xf3, 0xe0, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, - 0xce, 0x48, 0x5a, 0x10, 0x07, 0x00, 0x00, + 0x18, 0x8d, 0x13, 0x92, 0xc0, 0x24, 0xba, 0xe2, 0xfa, 0x02, 0xd7, 0x97, 0x5b, 0x39, 0x69, 0xe8, + 0x22, 0x1b, 0x6c, 0xa0, 0x52, 0x2b, 0x55, 0xea, 0x22, 0x49, 0xff, 0x58, 0x44, 0x42, 0x46, 0x2d, + 0x12, 0x9b, 0x68, 0xec, 0x19, 0xdc, 0xa1, 0xf6, 0x8c, 0x35, 0x33, 0x69, 0xc8, 0xae, 0x8f, 0xd0, + 0x7d, 0x5f, 0xa0, 0xea, 0x93, 0x64, 0x55, 0xb1, 0x44, 0xaa, 0x94, 0x96, 0xf0, 0x06, 0x5d, 0xb2, + 0xaa, 0x66, 0x6c, 0xd2, 0x54, 0x62, 0x81, 0x80, 0x05, 0x9b, 0x4c, 0xbe, 0x7c, 0xe7, 0x3b, 0x39, + 0x73, 0xce, 0xd8, 0x03, 0x1e, 0x1c, 0xb9, 0x03, 0x28, 0x62, 0x97, 0x50, 0x89, 0x39, 0x85, 0x91, + 0x2b, 0x87, 0x09, 0x16, 0x6e, 0xc2, 0x59, 0xc2, 0x04, 0x8c, 0x9c, 0x84, 0x33, 0xc9, 0xcc, 0x65, + 0x85, 0x41, 0xce, 0x91, 0x93, 0xae, 0xef, 0x37, 0x7d, 0x2c, 0xe1, 0xe6, 0xea, 0x52, 0xc8, 0x42, + 0xa6, 0x11, 0xae, 0xfa, 0x96, 0x82, 0x57, 0xed, 0x80, 0x89, 0x98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xcd, 0x18, 0xbb, 0x60, 0x3e, 0xc8, 0x54, 0x5d, + 0x3f, 0xc9, 0x29, 0xc5, 0xd5, 0xc2, 0x7c, 0x0a, 0x2a, 0x71, 0x6a, 0x88, 0x4e, 0xae, 0x74, 0x85, + 0xe4, 0x40, 0x36, 0xd0, 0x15, 0x61, 0xe3, 0x43, 0x1e, 0xfc, 0xf3, 0x3a, 0x41, 0x50, 0xe2, 0x96, + 0x3a, 0x40, 0x37, 0x36, 0xd3, 0x07, 0x0b, 0x14, 0x0f, 0x7a, 0xe9, 0x69, 0x4e, 0xfd, 0x7c, 0xfe, + 0x73, 0x5c, 0x5b, 0x1c, 0xc2, 0x38, 0x7a, 0xd2, 0x98, 0xb6, 0x1a, 0xd7, 0xf0, 0x85, 0xe2, 0x81, + 0xd6, 0x78, 0xcb, 0x36, 0x37, 0x3e, 0x19, 0xc0, 0xec, 0x44, 0x18, 0xf2, 0xdb, 0x71, 0x60, 0x56, + 0x5d, 0xe1, 0xc6, 0xea, 0xda, 0x6f, 0x46, 0xa7, 0x76, 0xee, 0xe4, 0xd4, 0xce, 0x7d, 0x9e, 0xd8, + 0xc6, 0x68, 0x62, 0x1b, 0xc7, 0x13, 0xdb, 0xf8, 0x31, 0xb1, 0x8d, 0x8f, 0x67, 0x76, 0xee, 0xf8, + 0xcc, 0xce, 0x9d, 0x9c, 0xd9, 0xb9, 0xfd, 0x8d, 0x19, 0xfa, 0x0e, 0x13, 0xf1, 0x9e, 0xba, 0x70, + 0xf4, 0x9b, 0xd2, 0x3d, 0xca, 0xd6, 0x3f, 0xaf, 0x1f, 0xbf, 0xa4, 0x6f, 0x9e, 0x87, 0xbf, 0x02, + 0x00, 0x00, 0xff, 0xff, 0x4f, 0xeb, 0x52, 0x56, 0x11, 0x07, 0x00, 0x00, } func (this *StoreCodeProposal) Equal(that interface{}) bool { diff --git a/x/wasm/internal/types/proposal.proto b/x/wasm/internal/types/proposal.proto index a1a6d30d20..eea5db0b31 100644 --- a/x/wasm/internal/types/proposal.proto +++ b/x/wasm/internal/types/proposal.proto @@ -22,7 +22,7 @@ message StoreCodeProposal { // Builder is a valid docker image name with tag, optional string builder = 6; // InstantiatePermission to apply on contract creation, optional - AccessConfig InstantiatePermission = 7; + AccessConfig instantiate_permission = 7; } // InstantiateContractProposal gov proposal content type to instantiate a contract. diff --git a/x/wasm/internal/types/query.pb.go b/x/wasm/internal/types/query.pb.go index b09d45aacf..12b34f2433 100644 --- a/x/wasm/internal/types/query.pb.go +++ b/x/wasm/internal/types/query.pb.go @@ -12,7 +12,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" + types "github.com/gogo/protobuf/types" github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" @@ -77,7 +77,7 @@ var xxx_messageInfo_QueryContractInfoRequest proto.InternalMessageInfo type QueryContractInfoResponse struct { // address is the address of the contract Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` - *ContractInfo `protobuf:"bytes,2,opt,name=ContractInfo,proto3,embedded=ContractInfo" json:""` + *ContractInfo `protobuf:"bytes,2,opt,name=contract_info,json=contractInfo,proto3,embedded=contract_info" json:""` } func (m *QueryContractInfoResponse) Reset() { *m = QueryContractInfoResponse{} } @@ -228,7 +228,7 @@ var xxx_messageInfo_QueryContractsByCodeRequest proto.InternalMessageInfo // ContractInfoWithAddress adds the address (key) to the ContractInfo representation type ContractInfoWithAddress struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` - *ContractInfo `protobuf:"bytes,2,opt,name=ContractInfo,proto3,embedded=ContractInfo" json:""` + *ContractInfo `protobuf:"bytes,2,opt,name=contract_info,json=contractInfo,proto3,embedded=contract_info" json:""` } func (m *ContractInfoWithAddress) Reset() { *m = ContractInfoWithAddress{} } @@ -704,74 +704,75 @@ func init() { func init() { proto.RegisterFile("x/wasm/internal/types/query.proto", fileDescriptor_845473e9a3330642) } var fileDescriptor_845473e9a3330642 = []byte{ - // 1071 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xa4, 0x8e, 0x13, 0x4f, 0x03, 0x98, 0x51, 0x69, 0x8d, 0xeb, 0xae, 0xc3, 0x82, 0xa8, - 0x0b, 0xea, 0x6e, 0x12, 0xb7, 0x15, 0x3f, 0x4e, 0x71, 0x5a, 0x29, 0x15, 0x14, 0xd4, 0x8d, 0x50, + // 1074 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xa4, 0x8e, 0x13, 0x4f, 0x53, 0x30, 0xa3, 0xd2, 0x1a, 0xd7, 0x5d, 0x87, 0x05, 0x51, + 0x17, 0xd4, 0xdd, 0x24, 0x6e, 0x2b, 0xfe, 0x9c, 0xe2, 0xb4, 0x52, 0x2a, 0x28, 0x88, 0x8d, 0x50, 0x25, 0x7a, 0x88, 0xc6, 0xbb, 0x13, 0x7b, 0x5b, 0x7b, 0xc7, 0xdd, 0x19, 0x93, 0x58, 0x51, 0x84, - 0xe0, 0x88, 0x38, 0x20, 0xf5, 0x82, 0xc4, 0x3f, 0x80, 0x10, 0xdc, 0x41, 0x5c, 0x38, 0xe6, 0x18, - 0x89, 0x0b, 0x27, 0x0b, 0x1c, 0x4e, 0xf9, 0x13, 0x72, 0x42, 0x3b, 0xfb, 0x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0x0f, 0x1b, 0x6e, 0x55, - 0x98, 0xd5, 0x8e, 0x64, 0xc2, 0x58, 0x63, 0xdb, 0x95, 0x60, 0x60, 0xcd, 0x05, 0xa1, 0xd6, 0xa8, - 0xa8, 0x93, 0x8b, 0x38, 0x2d, 0x78, 0xdb, 0xb7, 0x59, 0x2e, 0xb5, 0x80, 0x4a, 0x19, 0x0b, 0x66, - 0x24, 0x87, 0x67, 0xab, 0x6d, 0xb7, 0xe1, 0x30, 0x3f, 0x37, 0xa3, 0x16, 0xa2, 0xa9, 0xfe, 0x05, - 0xc2, 0x2f, 0xc7, 0x34, 0x04, 0x59, 0x3e, 0xc2, 0x99, 0x50, 0x96, 0xa0, 0x2a, 0x21, 0x55, 0x95, - 0xae, 0x26, 0x16, 0x88, 0x41, 0x49, 0x63, 0x95, 0x69, 0xce, 0x86, 0x35, 0x52, 0x80, 0x57, 0x1b, - 0x0a, 0x37, 0x77, 0xd8, 0x2d, 0xaa, 0x39, 0xbc, 0xc6, 0x2a, 0x26, 0x7d, 0x08, 0xa2, 0x8f, 0xe1, - 0x43, 0x8c, 0xfb, 0x18, 0xa2, 0x23, 0x3c, 0x31, 0x88, 0xf0, 0x34, 0x67, 0x22, 0x00, 0x62, 0xf9, - 0x5b, 0x8c, 0x67, 0x54, 0x12, 0xf2, 0x1d, 0x1a, 0xac, 0xba, 0x24, 0xa9, 0xcd, 0x24, 0x7d, 0x3f, - 0xe4, 0x17, 0x27, 0x77, 0x08, 0xe1, 0xe8, 0xa5, 0x2f, 0x7f, 0xff, 0xfb, 0xe9, 0xb4, 0x4e, 0x16, - 0xc2, 0x4f, 0x1e, 0x70, 0x30, 0xa3, 0xea, 0x69, 0xee, 0xc0, 0x29, 0xda, 0x25, 0x3f, 0x22, 0xfc, - 0xd2, 0x50, 0x83, 0x24, 0xcb, 0x93, 0xe4, 0x1b, 0xec, 0xdc, 0xf9, 0xf2, 0xa9, 0x7c, 0x00, 0xe6, - 0xa2, 0x82, 0xf9, 0x16, 0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3b, 0x95, 0xd4, 0x5e, 0xa0, 0x30, 0xaa, + 0xa2, 0xdf, 0x1e, 0x12, 0x27, 0x2a, 0x9d, 0x20, 0x25, 0x12, 0x77, 0x19, 0xcf, 0xda, 0xdc, 0x61, + 0x1b, 0xae, 0xa3, 0xc4, 0xa5, 0xac, 0x74, 0xb0, 0xbc, 0xe7, 0xe8, 0xbf, 0x20, 0x7c, 0x39, 0xee, + 0xde, 0x03, 0x57, 0xd6, 0x41, 0xcd, 0xf3, 0xff, 0x46, 0x77, 0x86, 0x5c, 0xee, 0x8b, 0x06, 0x97, + 0x1f, 0xe2, 0x17, 0x06, 0x30, 0x23, 0xb3, 0x8d, 0x09, 0x40, 0x63, 0x46, 0x80, 0xd7, 0x17, 0xe2, + 0xd8, 0x42, 0x7f, 0x0c, 0xe0, 0x2b, 0x8d, 0x46, 0x94, 0xb7, 0x2e, 0xa9, 0x64, 0x67, 0xb2, 0x9f, + 0x1e, 0xe2, 0xab, 0x09, 0x60, 0x20, 0xf5, 0x5d, 0x9c, 0x6e, 0x72, 0x87, 0x35, 0x22, 0x89, 0x85, + 0x04, 0x89, 0xf7, 0x83, 0x20, 0x10, 0x04, 0x19, 0xfa, 0x57, 0x08, 0xa4, 0x58, 0x74, 0xeb, 0xcc, + 0xa5, 0x90, 0xab, 0x18, 0xab, 0x46, 0xba, 0xe1, 0x50, 0x49, 0xd5, 0x2e, 0x98, 0xb7, 0x32, 0xea, + 0x3f, 0x77, 0xa8, 0xa4, 0x7a, 0x19, 0x94, 0x1e, 0xe7, 0x02, 0x4a, 0x09, 0x4e, 0xa9, 0x4c, 0xc5, + 0xc4, 0x52, 0xf7, 0xfa, 0xd7, 0x08, 0x6b, 0x2a, 0x6b, 0xbd, 0x49, 0x7d, 0xf9, 0xbf, 0x6b, 0x58, + 0xc7, 0xc5, 0x44, 0x36, 0xa0, 0x62, 0x31, 0xae, 0xa2, 0x52, 0x38, 0xea, 0x16, 0x73, 0xcc, 0xb3, + 0xb9, 0xe3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9, 0xfa, 0x74, 0xcb, + 0xdc, 0x79, 0xd6, 0xfe, 0x77, 0xc9, 0x6f, 0x08, 0x93, 0xe3, 0xad, 0x9e, 0xdc, 0x1a, 0xc5, 0x23, + 0x71, 0x50, 0xe5, 0x6f, 0x9f, 0x36, 0x0d, 0x04, 0xbc, 0xa7, 0x04, 0xdc, 0x22, 0xe5, 0xf1, 0x86, + 0x07, 0x45, 0x06, 0x25, 0x7c, 0x8e, 0x53, 0x6a, 0x3b, 0x5f, 0x1b, 0xbd, 0x35, 0x9f, 0xed, 0xe1, + 0xd2, 0xf8, 0x40, 0xe0, 0xf5, 0xba, 0xe2, 0xa5, 0x91, 0xc2, 0xa8, 0x8d, 0x4b, 0x36, 0xf1, 0x8c, + 0xea, 0x88, 0xe4, 0x92, 0x11, 0x7e, 0xec, 0x18, 0xd1, 0x97, 0x90, 0x71, 0x37, 0xf8, 0x12, 0xca, + 0x5f, 0x1f, 0x07, 0xd8, 0x6f, 0xa6, 0x7a, 0x5e, 0x21, 0x5e, 0x24, 0xe4, 0x38, 0x62, 0xc5, 0xda, + 0xfb, 0x4b, 0x9b, 0xfa, 0xbe, 0xa7, 0xa1, 0xbd, 0x9e, 0x86, 0xf6, 0x7b, 0x1a, 0xfa, 0xb3, 0xa7, + 0xa1, 0x6f, 0x0e, 0xb4, 0xa9, 0xfd, 0x03, 0x6d, 0xea, 0x8f, 0x03, 0x6d, 0xea, 0xd3, 0xc5, 0xd8, + 0x58, 0x5a, 0xe5, 0xa2, 0xf9, 0x20, 0xa8, 0xa1, 0x30, 0xcd, 0x6d, 0xb8, 0x0e, 0x7e, 0xc7, 0x55, + 0xd3, 0x8a, 0x6a, 0xf9, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x5e, 0x6a, 0x4f, 0x37, 0x0e, + 0x00, 0x00, } func (this *QueryContractInfoRequest) Equal(that interface{}) bool { @@ -1249,7 +1250,7 @@ type QueryClient interface { RawContractState(ctx context.Context, in *QueryRawContractStateRequest, opts ...grpc.CallOption) (*QueryRawContractStateResponse, error) SmartContractState(ctx context.Context, in *QuerySmartContractStateRequest, opts ...grpc.CallOption) (*QuerySmartContractStateResponse, error) Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error) - Codes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*QueryCodesResponse, error) + Codes(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*QueryCodesResponse, error) } type queryClient struct { @@ -1323,7 +1324,7 @@ func (c *queryClient) Code(ctx context.Context, in *QueryCodeRequest, opts ...gr return out, nil } -func (c *queryClient) Codes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*QueryCodesResponse, error) { +func (c *queryClient) Codes(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*QueryCodesResponse, error) { out := new(QueryCodesResponse) err := c.cc.Invoke(ctx, "/wasmd.x.wasmd.v1beta1.Query/Codes", in, out, opts...) if err != nil { @@ -1341,7 +1342,7 @@ type QueryServer interface { RawContractState(context.Context, *QueryRawContractStateRequest) (*QueryRawContractStateResponse, error) SmartContractState(context.Context, *QuerySmartContractStateRequest) (*QuerySmartContractStateResponse, error) Code(context.Context, *QueryCodeRequest) (*QueryCodeResponse, error) - Codes(context.Context, *empty.Empty) (*QueryCodesResponse, error) + Codes(context.Context, *types.Empty) (*QueryCodesResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1369,7 +1370,7 @@ func (*UnimplementedQueryServer) SmartContractState(ctx context.Context, req *Qu func (*UnimplementedQueryServer) Code(ctx context.Context, req *QueryCodeRequest) (*QueryCodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Code not implemented") } -func (*UnimplementedQueryServer) Codes(ctx context.Context, req *empty.Empty) (*QueryCodesResponse, error) { +func (*UnimplementedQueryServer) Codes(ctx context.Context, req *types.Empty) (*QueryCodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Codes not implemented") } @@ -1504,7 +1505,7 @@ func _Query_Code_Handler(srv interface{}, ctx context.Context, dec func(interfac } func _Query_Codes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) + in := new(types.Empty) if err := dec(in); err != nil { return nil, err } @@ -1516,7 +1517,7 @@ func _Query_Codes_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: "/wasmd.x.wasmd.v1beta1.Query/Codes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Codes(ctx, req.(*empty.Empty)) + return srv.(QueryServer).Codes(ctx, req.(*types.Empty)) } return interceptor(ctx, in, info, handler) } diff --git a/x/wasm/internal/types/query.pb.gw.go b/x/wasm/internal/types/query.pb.gw.go index 9335f0fb6c..593eadbd98 100644 --- a/x/wasm/internal/types/query.pb.gw.go +++ b/x/wasm/internal/types/query.pb.gw.go @@ -13,9 +13,9 @@ import ( "io" "net/http" + types_1 "github.com/gogo/protobuf/types" "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/empty" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/grpc-ecosystem/grpc-gateway/utilities" "google.golang.org/grpc" @@ -457,7 +457,7 @@ func local_request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler } func request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq empty.Empty + var protoReq types_1.Empty var metadata runtime.ServerMetadata msg, err := client.Codes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -466,7 +466,7 @@ func request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshaler, cli } func local_request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq empty.Empty + var protoReq types_1.Empty var metadata runtime.ServerMetadata msg, err := server.Codes(ctx, &protoReq) diff --git a/x/wasm/internal/types/query.proto b/x/wasm/internal/types/query.proto index c861f877eb..ded7271434 100644 --- a/x/wasm/internal/types/query.proto +++ b/x/wasm/internal/types/query.proto @@ -47,7 +47,7 @@ message QueryContractInfoRequest { message QueryContractInfoResponse { // address is the address of the contract bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; - ContractInfo ContractInfo = 2 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""]; + ContractInfo contract_info = 2 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""]; } message QueryContractHistoryRequest { @@ -66,7 +66,7 @@ message QueryContractsByCodeRequest { // ContractInfoWithAddress adds the address (key) to the ContractInfo representation message ContractInfoWithAddress { bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; - ContractInfo ContractInfo = 2 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""]; + ContractInfo contract_info = 2 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""]; } message QueryContractsByCodeResponse { diff --git a/x/wasm/internal/types/types.go b/x/wasm/internal/types/types.go index 6e2e159730..ba04502d1a 100644 --- a/x/wasm/internal/types/types.go +++ b/x/wasm/internal/types/types.go @@ -46,7 +46,7 @@ func NewCodeInfo(codeHash []byte, creator sdk.AccAddress, source string, builder } } -var AllCodeHistoryTypes = []ContractCodeHistoryOperationType{ContractCodeHistoryTypeGenesis, ContractCodeHistoryTypeInit, ContractCodeHistoryTypeMigrate} +var AllCodeHistoryTypes = []ContractCodeHistoryOperationType{ContractCodeHistoryOperationTypeGenesis, ContractCodeHistoryOperationTypeInit, ContractCodeHistoryOperationTypeMigrate} func (c *ContractHistory) AppendCodeHistory(newEntries ...ContractCodeHistoryEntry) { c.CodeHistoryEntries = append(c.CodeHistoryEntries, newEntries...) @@ -83,7 +83,7 @@ func (c *ContractInfo) ValidateBasic() error { func (c ContractInfo) InitialHistory(initMsg []byte) ContractCodeHistoryEntry { return ContractCodeHistoryEntry{ - Operation: ContractCodeHistoryTypeInit, + Operation: ContractCodeHistoryOperationTypeInit, CodeID: c.CodeID, Updated: c.Created, Msg: initMsg, @@ -92,7 +92,7 @@ func (c ContractInfo) InitialHistory(initMsg []byte) ContractCodeHistoryEntry { func (c *ContractInfo) AddMigration(ctx sdk.Context, codeID uint64, msg []byte) ContractCodeHistoryEntry { h := ContractCodeHistoryEntry{ - Operation: ContractCodeHistoryTypeMigrate, + Operation: ContractCodeHistoryOperationTypeMigrate, CodeID: codeID, Updated: NewAbsoluteTxPosition(ctx), Msg: msg, @@ -105,7 +105,7 @@ func (c *ContractInfo) AddMigration(ctx sdk.Context, codeID uint64, msg []byte) func (c *ContractInfo) ResetFromGenesis(ctx sdk.Context) ContractCodeHistoryEntry { c.Created = NewAbsoluteTxPosition(ctx) return ContractCodeHistoryEntry{ - Operation: ContractCodeHistoryTypeGenesis, + Operation: ContractCodeHistoryOperationTypeGenesis, CodeID: c.CodeID, Updated: c.Created, } diff --git a/x/wasm/internal/types/types.pb.go b/x/wasm/internal/types/types.pb.go index 3f75467eed..6a4c8fbb20 100644 --- a/x/wasm/internal/types/types.pb.go +++ b/x/wasm/internal/types/types.pb.go @@ -30,24 +30,24 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type AccessType int32 const ( - AccessTypeUndefined AccessType = 0 + AccessTypeUnspecified AccessType = 0 AccessTypeNobody AccessType = 1 AccessTypeOnlyAddress AccessType = 2 AccessTypeEverybody AccessType = 3 ) var AccessType_name = map[int32]string{ - 0: "UNDEFINED", - 1: "NOBODY", - 2: "ONLY_ADDRESS", - 3: "EVERYBODY", + 0: "ACCESS_TYPE_UNSPECIFIED", + 1: "ACCESS_TYPE_NOBODY", + 2: "ACCESS_TYPE_ONLY_ADDRESS", + 3: "ACCESS_TYPE_EVERYBODY", } var AccessType_value = map[string]int32{ - "UNDEFINED": 0, - "NOBODY": 1, - "ONLY_ADDRESS": 2, - "EVERYBODY": 3, + "ACCESS_TYPE_UNSPECIFIED": 0, + "ACCESS_TYPE_NOBODY": 1, + "ACCESS_TYPE_ONLY_ADDRESS": 2, + "ACCESS_TYPE_EVERYBODY": 3, } func (AccessType) EnumDescriptor() ([]byte, []int) { @@ -57,24 +57,24 @@ func (AccessType) EnumDescriptor() ([]byte, []int) { type ContractCodeHistoryOperationType int32 const ( - Undefined ContractCodeHistoryOperationType = 0 - ContractCodeHistoryTypeInit ContractCodeHistoryOperationType = 1 - ContractCodeHistoryTypeMigrate ContractCodeHistoryOperationType = 2 - ContractCodeHistoryTypeGenesis ContractCodeHistoryOperationType = 3 + ContractCodeHistoryOperationTypeUnspecified ContractCodeHistoryOperationType = 0 + ContractCodeHistoryOperationTypeInit ContractCodeHistoryOperationType = 1 + ContractCodeHistoryOperationTypeMigrate ContractCodeHistoryOperationType = 2 + ContractCodeHistoryOperationTypeGenesis ContractCodeHistoryOperationType = 3 ) var ContractCodeHistoryOperationType_name = map[int32]string{ - 0: "Undefined", - 1: "Init", - 2: "Migrate", - 3: "Genesis", + 0: "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED", + 1: "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT", + 2: "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE", + 3: "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS", } var ContractCodeHistoryOperationType_value = map[string]int32{ - "Undefined": 0, - "Init": 1, - "Migrate": 2, - "Genesis": 3, + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED": 0, + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT": 1, + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE": 2, + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS": 3, } func (x ContractCodeHistoryOperationType) String() string { @@ -407,9 +407,9 @@ var xxx_messageInfo_AbsoluteTxPosition proto.InternalMessageInfo // Model is a struct that holds a KV pair type Model struct { // hex-encode key to read it better (this is often ascii) - Key github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=Key,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"Key,omitempty"` + Key github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=key,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"key,omitempty"` // base64-encode raw value - Value []byte `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } func (m *Model) Reset() { *m = Model{} } @@ -462,76 +462,80 @@ func init() { func init() { proto.RegisterFile("x/wasm/internal/types/types.proto", fileDescriptor_45de2b3fc8aff6aa) } var fileDescriptor_45de2b3fc8aff6aa = []byte{ - // 1096 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0xc5, - 0x1b, 0xf6, 0xda, 0x8e, 0x9d, 0x4c, 0xfd, 0x6b, 0xdc, 0xf9, 0x25, 0xe0, 0xb8, 0x65, 0xd7, 0xd9, - 0x0a, 0x94, 0x14, 0xd5, 0x26, 0x01, 0x09, 0xd4, 0x5b, 0xfc, 0x87, 0xc6, 0x2d, 0xf9, 0xa3, 0x4d, - 0x53, 0x1a, 0x24, 0x64, 0x8d, 0x77, 0x27, 0xf6, 0xd0, 0xdd, 0x19, 0x6b, 0x67, 0x9c, 0xda, 0x39, - 0x71, 0x44, 0xe1, 0x82, 0x38, 0x71, 0x89, 0x84, 0x44, 0x0f, 0xfd, 0x02, 0x7c, 0x03, 0x0e, 0xb9, - 0x20, 0xf5, 0xc8, 0xc9, 0x82, 0x44, 0x7c, 0x81, 0x1c, 0x73, 0x42, 0x33, 0xb3, 0xc6, 0x86, 0x34, - 0x21, 0x54, 0x5c, 0x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 0x22, 0xde, - 0x86, 0x0f, 0x41, 0xda, 0x0d, 0x31, 0x12, 0x2c, 0x8c, 0xb6, 0x7d, 0xe9, 0x35, 0x36, 0x39, 0x52, - 0x80, 0x6f, 0x80, 0x14, 0x67, 0xdd, 0xd0, 0xd5, 0x8b, 0x9f, 0x72, 0xa2, 0x11, 0xcc, 0x81, 0x74, - 0xb3, 0x4b, 0x7c, 0x0f, 0x87, 0xb9, 0xa4, 0x9a, 0x18, 0x0e, 0xe1, 0x13, 0x00, 0xc7, 0xbd, 0x73, - 0xd5, 0xd6, 0xe6, 0x26, 0xae, 0xde, 0x05, 0x49, 0xd9, 0x05, 0xce, 0x8d, 0x31, 0x11, 0x3d, 0x61, - 0x3f, 0x8f, 0x83, 0x4c, 0x85, 0x51, 0x11, 0x22, 0x57, 0x28, 0x1b, 0x6e, 0x83, 0xb4, 0xb2, 0x81, - 0x78, 0xca, 0x84, 0x64, 0x19, 0x1c, 0x0f, 0xac, 0x94, 0x72, 0xa9, 0xea, 0xa4, 0xe4, 0x54, 0xdd, - 0xfb, 0x6f, 0xed, 0xb8, 0x0f, 0x26, 0x90, 0x17, 0x10, 0xaa, 0xdc, 0x78, 0x2d, 0x29, 0xcd, 0x87, - 0x33, 0x60, 0xc2, 0x47, 0x4d, 0xec, 0x47, 0xee, 0xe9, 0x01, 0xac, 0x44, 0x6b, 0xc5, 0x5e, 0x64, - 0xd8, 0xe2, 0x45, 0x86, 0x35, 0x39, 0xf3, 0xbb, 0x02, 0x3f, 0xea, 0x6d, 0x32, 0x4e, 0x04, 0x61, - 0xd4, 0x19, 0x32, 0xed, 0x7d, 0x30, 0x3d, 0x74, 0x69, 0x95, 0x70, 0xc1, 0xc2, 0x3e, 0x6c, 0x81, - 0x19, 0xdd, 0x2f, 0x7a, 0xdc, 0xc0, 0x54, 0x84, 0x04, 0xcb, 0xb3, 0x99, 0x58, 0xb8, 0xb6, 0x5c, - 0xba, 0x20, 0xc9, 0x50, 0x45, 0x1a, 0x1a, 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, 0xdc, 0xc7, 0x14, 0x73, 0xc2, 0xb3, 0x89, 0x4b, 0x09, 0x11, 0x2a, 0x9f, 0x94, 0xa5, - 0x94, 0x9d, 0xa3, 0xdf, 0xcc, 0xd8, 0x8b, 0x63, 0xd3, 0x38, 0x3a, 0x36, 0x8d, 0x97, 0xc7, 0xa6, - 0xf1, 0xeb, 0xb1, 0x69, 0x7c, 0x73, 0x62, 0xc6, 0x5e, 0x9e, 0x98, 0xb1, 0x5f, 0x4e, 0xcc, 0xd8, - 0x67, 0xef, 0x8d, 0xed, 0x78, 0x85, 0xf1, 0x40, 0xfe, 0x6d, 0xa8, 0x1b, 0x91, 0x57, 0xea, 0x45, - 0xcf, 0xbf, 0x5e, 0x8d, 0x9a, 0x29, 0x75, 0xd1, 0x79, 0xff, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x6b, 0xe9, 0x46, 0x0d, 0x3a, 0x09, 0x00, 0x00, + // 1165 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x8f, 0xdb, 0xc4, + 0x17, 0x8f, 0x93, 0xfd, 0xd5, 0x69, 0xd4, 0xa6, 0xf3, 0xdd, 0xfd, 0x36, 0x0d, 0x25, 0xc9, 0xba, + 0x20, 0xb6, 0xbf, 0x92, 0x76, 0x41, 0x14, 0xf5, 0x96, 0x38, 0x66, 0xd7, 0x85, 0x4d, 0x56, 0x93, + 0x2c, 0xed, 0x22, 0x55, 0xd6, 0xc4, 0x9e, 0x4d, 0x86, 0xda, 0x9e, 0xc8, 0x33, 0x69, 0x93, 0x9e, + 0x38, 0xa2, 0x70, 0x41, 0x9c, 0xb8, 0x44, 0x42, 0xa2, 0x42, 0xfd, 0x53, 0x7a, 0x41, 0xea, 0x91, + 0x53, 0x04, 0x5b, 0x71, 0xe0, 0xba, 0xc7, 0x9e, 0x90, 0xc7, 0x8e, 0x62, 0x68, 0xb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x0d, 0xb4, 0x6f, 0x36, 0x76, 0x75, 0x54, + 0x69, 0x19, 0x8d, 0xfa, 0xeb, 0xa4, 0x29, 0x8f, 0xc6, 0xc5, 0xab, 0x27, 0x71, 0xc7, 0x05, 0xbb, + 0x0b, 0x2e, 0xcf, 0x15, 0xc6, 0xa8, 0x1b, 0xad, 0x8c, 0x92, 0xdb, 0x18, 0x8d, 0x8b, 0xef, 0x9d, + 0xc4, 0x6f, 0x78, 0x54, 0xc0, 0xfb, 0xe0, 0xda, 0x5c, 0xc4, 0x3b, 0xc6, 0x16, 0xaa, 0xb4, 0xf4, + 0x4c, 0x32, 0x77, 0x75, 0x34, 0x2e, 0x7e, 0x70, 0x12, 0xf7, 0x0e, 0xed, 0xf8, 0x58, 0x90, 0xb9, + 0xe9, 0xb7, 0xf4, 0xba, 0xde, 0x34, 0x9a, 0x99, 0xd4, 0x7c, 0xf4, 0x5b, 0xc4, 0x23, 0x9c, 0xf2, + 0xdc, 0x42, 0x50, 0xac, 0x2a, 0x7a, 0xf6, 0x7b, 0x3e, 0xf1, 0xf4, 0x30, 0xaf, 0x3c, 0x3b, 0xcc, + 0x2b, 0xcf, 0x0f, 0xf3, 0xca, 0x6f, 0x87, 0x79, 0xe5, 0xbb, 0x17, 0xf9, 0xc4, 0xf3, 0x17, 0xf9, + 0xc4, 0xaf, 0x2f, 0xf2, 0x89, 0x2f, 0x6f, 0xc4, 0xe6, 0x40, 0x63, 0xdc, 0x0d, 0x3e, 0xa6, 0xf2, + 0x3f, 0xd1, 0x2e, 0x0f, 0xa2, 0xfb, 0xdf, 0x7f, 0x18, 0xdb, 0x4b, 0xf2, 0xf7, 0xef, 0xc3, 0xbf, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x52, 0xdd, 0xfe, 0x50, 0x0a, 0x00, 0x00, } func (this *AccessTypeParam) Equal(that interface{}) bool { diff --git a/x/wasm/internal/types/types.proto b/x/wasm/internal/types/types.proto index 1f170b385b..b23ab3a6b4 100644 --- a/x/wasm/internal/types/types.proto +++ b/x/wasm/internal/types/types.proto @@ -10,10 +10,10 @@ option (gogoproto.equal_all) = true; enum AccessType { option (gogoproto.goproto_enum_prefix) = false; option (gogoproto.goproto_enum_stringer) = false; - UNDEFINED = 0 [(gogoproto.enumvalue_customname) = "AccessTypeUndefined"]; - NOBODY = 1 [(gogoproto.enumvalue_customname) = "AccessTypeNobody"]; - ONLY_ADDRESS = 2 [(gogoproto.enumvalue_customname) = "AccessTypeOnlyAddress"]; - EVERYBODY = 3 [(gogoproto.enumvalue_customname) = "AccessTypeEverybody"]; + ACCESS_TYPE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "AccessTypeUnspecified"]; + ACCESS_TYPE_NOBODY = 1 [(gogoproto.enumvalue_customname) = "AccessTypeNobody"]; + ACCESS_TYPE_ONLY_ADDRESS = 2 [(gogoproto.enumvalue_customname) = "AccessTypeOnlyAddress"]; + ACCESS_TYPE_EVERYBODY = 3 [(gogoproto.enumvalue_customname) = "AccessTypeEverybody"]; } message AccessTypeParam { @@ -57,10 +57,10 @@ message ContractInfo { enum ContractCodeHistoryOperationType { option (gogoproto.goproto_enum_prefix) = false; - Undefined = 0; - Init = 1 [(gogoproto.enumvalue_customname) = "ContractCodeHistoryTypeInit"]; - Migrate = 2 [(gogoproto.enumvalue_customname) = "ContractCodeHistoryTypeMigrate"]; - Genesis = 3 [(gogoproto.enumvalue_customname) = "ContractCodeHistoryTypeGenesis"]; + CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ContractCodeHistoryOperationTypeUnspecified"]; + CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = 1 [(gogoproto.enumvalue_customname) = "ContractCodeHistoryOperationTypeInit"]; + CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = 2 [(gogoproto.enumvalue_customname) = "ContractCodeHistoryOperationTypeMigrate"]; + CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = 3 [(gogoproto.enumvalue_customname) = "ContractCodeHistoryOperationTypeGenesis"]; } message ContractHistory { @@ -87,7 +87,7 @@ message AbsoluteTxPosition { // Model is a struct that holds a KV pair message Model { // hex-encode key to read it better (this is often ascii) - bytes Key = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes key = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; // base64-encode raw value - bytes Value = 2; + bytes value = 2; } \ No newline at end of file